Open przemkalit opened 4 weeks ago
Ok the problem is related to survey that are migrated from ansible tower, in the UI survey is working after migration but in the API is in the old state. Closing the issue.
Reopen it, we identified that the issue is produced by this part of the code: templates/job_template.j2 (the same for WF)
{% set survey_spec_contents = query(controller_api_plugin, current_job_templates_asset_value.related.survey_spec,
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs)[0] |
from_yaml | to_nice_yaml(indent=2,width=500) | regex_replace("\n\n[ ]*", "\\\\n") | indent(width=6, first=False) | replace("'{{", "!unsafe \'{{") | replace("^$", "") | replace("$encrypted$", "") | replace("'", '"')
-%}
Somehow saving to file, modify the survey in a way that when it is loaded with filetree_read and dispatch, it import into controller multiselect objects like in the first post.
Summary
I've discovered that when a survey with multiple-choice questions is exported with JT/WF and then imported, the multiple-choice gets broken - it has only one choice.
Issue Type
Ansible, Collection, Controller details
OS / ENVIRONMENT
RH 9.4
Desired Behavior
Survey has a list of choices:
Actual Behavior
Survey has a one choice:
STEPS TO REPRODUCE
Remark: the object with survey must be migrated from ATP to AAP using upgrade method.