Bug 1707614 - CFME creates a single select Ansible dialog from a multi select Ansible template
Summary: CFME creates a single select Ansible dialog from a multi select Ansible template
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.0
Assignee: Roman Blanco
QA Contact: Nandini Chandra
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1761581
TreeView+ depends on / blocked
 
Reported: 2019-05-07 22:45 UTC by Nandini Chandra
Modified: 2019-12-13 14:54 UTC (History)
10 users (show)

Fixed In Version: 5.11.0.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1761581 (view as bug list)
Environment:
Last Closed: 2019-12-13 14:54:25 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screen shot of Ansible job template with a multi select field (52.13 KB, image/png)
2019-05-07 22:45 UTC, Nandini Chandra
no flags Details

Description Nandini Chandra 2019-05-07 22:45:46 UTC
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:
----------------

Comment 2 Nandini Chandra 2019-05-07 22:46:33 UTC
Please let me know  if you need an appliance on which this issue has been reproduced.

Comment 4 William Fitzgerald 2019-05-08 19:06:50 UTC
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

Comment 6 Bill Wei 2019-05-29 19:35:27 UTC
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.

Comment 7 Tina Fitzgerald 2019-05-30 21:04:07 UTC
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

Comment 10 CFME Bot 2019-06-03 11:06:53 UTC
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(-)

Comment 11 Nandini Chandra 2019-07-02 20:14:03 UTC
Verified in 5.11.0.11

Comment 12 Nandini Chandra 2019-07-02 20:16:18 UTC
Could this BZ be cloned to 510 ?


Note You need to log in before you can comment on or make changes to this bug.