Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Survey issue multichoice default missing #68

Open
przemkalit opened this issue Feb 4, 2025 · 1 comment
Open

Survey issue multichoice default missing #68

przemkalit opened this issue Feb 4, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@przemkalit
Copy link
Contributor

Summary

Hey,
The issue is related to the recent changes #46, if you export the workflow or job template when multichoice does not have set default choice, the default won't be exported and after import the question cannot be edited.

Image

Issue Type

  • Bug Report

Ansible, Collection, Controller details

AAP 2.4

OS / ENVIRONMENT

N/A

Desired Behavior

Filetree_create should always export default for multichoice.

Actual Behavior

Filetree_create does not export default for multchoice when default is not set.

STEPS TO REPRODUCE

  1. Create JT with survey and multchoice question - don't set the default choice
  2. Export the JT with filetree_create
  3. Import the JT.
  4. Edit the question from survey.
@przemkalit przemkalit added the bug Something isn't working label Feb 4, 2025
@przemkalit
Copy link
Contributor Author

I found out that this piece of code is making default disappear.

{%     for survey_item_content in (survey_item | dict2items) if ((survey_item_content.value | string | length) > 0 and (survey_item_content.value | string) is not match('None')) %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant