Created attachment 1565371 [details] screen shot of Ansible job template with a multi select field Description of problem: ----------------------- I have an Ansible job template with a survey. The survey has a multiple select Answer type field. See attached screen shot.When I tried creating a dialog from this template on CFME, the newly created dialog had a single select field instead of multi select field. When I run this job through CFME, the job fails with this error : [----] E, [2019-05-06T16:19:28.663515 #15145:6553164] ERROR -- : Q-task_id([r4_service_template_provision_task_4]) <AEMethod provision> Template automation_survey_template launching failed. Reason: {"variables_needed_to_start":["'Department' value is expected to be a list."]} (MiqException::MiqOrchestrationProvisionError) Version-Release number of selected component (if applicable): ------------------------------------------------------------- 5.10.4 How reproducible: ----------------- Always Steps to Reproduce: ------------------- 1. 2. 3. Actual results: --------------- CFME creates a single select Ansible dialog from a multi select Ansible template. Expected results: ----------------- CFME should create a multi select Ansible dialog from a multi select Ansible template. Additional info: ----------------
Please let me know if you need an appliance on which this issue has been reproduced.
Ansible Tower surveys has two types of Multiple Choice, single select and multiple select. When we create the dialog from a Multiple Choice survey, it creates a single select. This works. We need to fix this to work with multiple select. As a workaround for multiple select, Edit the dialog. Set the Multiselect to 'Yes' and select a default value. Save the dialog
At the time of developing the tool to auto generate a dialog from survey we don't have multi-selected dropbox. Since now our dropbox can do multi-selection, we can just update the backend code. It will not however amend dialogs that already exist.
Hi Roman, Bill pointed us here to modify the dialog code: https://github.com/ManageIQ/manageiq/blob/euwe/app/services/ansible_tower_job_template_dialog_service.rb#L74 Thanks, Tina
https://github.com/ManageIQ/manageiq-ui-classic/pull/5663
New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/3dcd2b877eeeaa1584de82ad067e02cacd1fc3f3 commit 3dcd2b877eeeaa1584de82ad067e02cacd1fc3f3 Author: Roman Blanco <rblanco> AuthorDate: Fri May 31 09:27:23 2019 -0400 Commit: Roman Blanco <rblanco> CommitDate: Fri May 31 09:27:23 2019 -0400 Correct multiselect default value for Ansible Job template survey Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1707614 app/services/ansible_tower_job_template_dialog_service.rb | 8 +- spec/services/ansible_tower_job_template_dialog_service_spec.rb | 4 +- 2 files changed, 8 insertions(+), 4 deletions(-)
Verified in 5.11.0.11
Could this BZ be cloned to 510 ?