Bug 1595254

Summary: Unable to set multiple default selected values at once through automation
Product: Red Hat CloudForms Management Engine Reporter: Felix Dewaleyne <fdewaley>
Component: AutomateAssignee: William Fitzgerald <wfitzger>
Status: CLOSED NOTABUG QA Contact: Dmitry Misharov <dmisharo>
Severity: medium Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, dmetzger, dmisharo, duhlmann, fdewaley, jprause, mkanoor, obarenbo, tfitzger, wfitzger
Target Milestone: GA   
Target Release: 5.10.2   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 13:59:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1595269    
Attachments:
Description Flags
sample ruby method used
none
sample_mselect_dialog.yml none

Description Felix Dewaleyne 2018-06-26 12:37:59 UTC
Created attachment 1454645 [details]
sample ruby method used

Description of problem:
on a multiple selection dialog element is it not possible to set more than one default selection through automation

Version-Release number of selected component (if applicable):
5.9.2

How reproducible:
all the time

Steps to Reproduce:
1.create a method based on additional info details
2.create a dialog with two fields, mparent and mselect
3.mparent should be filled with a list of options as in additional infos
4.mselect should be configured to allow multiple selection
5.associate the method with the refresh of mselect (not on initial value, only when mparent is changed)

Actual results:
only the first default selection is ever made, the others are always ignored

Expected results:
when giving a list of option and the element supports multiple selection, all given options should be taken into account

Additional info:
- values for mparent : {"1"=>"one","2"=>"two","3"=>"three"}
- sample method attached

Comment 4 Felix Dewaleyne 2018-07-31 09:57:07 UTC
Created attachment 1471760 [details]
sample_mselect_dialog.yml

sample dialog to use with sample method

Comment 6 Tina Fitzgerald 2018-10-01 15:05:49 UTC
Hi John,


I haven't had the time to look into this issue yet, but will look at it this week.

Thanks,
Tina

Comment 10 drew uhlmann 2018-10-15 15:54:15 UTC
Hey Felix. Taking a look at your reproducer, the reason your automate method wasn't working is because the multiple defaults were being set incorrectly. 

You had: dialog_field["default_value"] = ["a, d"]

You need: dialog_field["default_value"] = ["a","d"]

Please retest on your appliance, you'll find this works fine.

Comment 11 drew uhlmann 2018-10-15 15:57:05 UTC
Your ruby method that's attached to this ticket looks like it has the right format, I'm not sure why there's a discrepancy between the attached code and the code on your reproducer.

Comment 12 Felix Dewaleyne 2018-10-16 16:00:32 UTC
(In reply to drew uhlmann from comment #11)
> Your ruby method that's attached to this ticket looks like it has the right
> format, I'm not sure why there's a discrepancy between the attached code and
> the code on your reproducer.

that is working. I don't know how I missed that. it should have been the exact same as what is attached here. 

well, with the updated method, the dialogs do work. I'll update the customer case as well.