Bug 1595254 - Unable to set multiple default selected values at once through automation
Summary: Unable to set multiple default selected values at once through automation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.0
Hardware: All
OS: All
high
medium
Target Milestone: GA
: 5.10.2
Assignee: William Fitzgerald
QA Contact: Dmitry Misharov
URL:
Whiteboard:
Depends On:
Blocks: 1595269
TreeView+ depends on / blocked
 
Reported: 2018-06-26 12:37 UTC by Felix Dewaleyne
Modified: 2021-12-10 16:28 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 13:59:54 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sample ruby method used (683 bytes, text/plain)
2018-06-26 12:37 UTC, Felix Dewaleyne
no flags Details
sample_mselect_dialog.yml (2.75 KB, text/x-vhdl)
2018-07-31 09:57 UTC, Felix Dewaleyne
no flags Details

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.


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