Bug 1555487 - Dynamic Dropdown Multiselect: By default selects an element
Summary: Dynamic Dropdown Multiselect: By default selects an element
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.8.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.8.4
Assignee: drew uhlmann
QA Contact: Shveta
URL:
Whiteboard:
Keywords: ZStream
Depends On:
Blocks: 1551709
TreeView+ depends on / blocked
 
Reported: 2018-03-14 19:09 UTC by Ryan Spagnola
Modified: 2018-06-25 14:18 UTC (History)
15 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-06-25 14:18:08 UTC


Attachments (Terms of Use)
screenshot (5.53 KB, image/png)
2018-03-14 19:09 UTC, Ryan Spagnola
no flags Details
Required (116.85 KB, image/png)
2018-06-06 18:16 UTC, Shveta
no flags Details
Nothing selected (75.91 KB, image/png)
2018-06-06 18:17 UTC, Shveta
no flags Details
Multiselect None selected by default (83.44 KB, image/png)
2018-06-12 23:50 UTC, Shveta
no flags Details
dialog used for testing (3.56 KB, text/x-vhdl)
2018-06-12 23:51 UTC, Shveta
no flags Details
datastore used for testing (1.96 MB, application/zip)
2018-06-12 23:53 UTC, Shveta
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1972 None None None 2018-06-25 14:18 UTC

Description Ryan Spagnola 2018-03-14 19:09:52 UTC
Created attachment 1408131 [details]
screenshot

Description of problem:
When the "<Choose>" option is available among the elements, it is getting selected by defaulted. See screenshot attached. Customer is requesting to have nothing selected by default.


Version-Release number of selected component (if applicable):
5.7.3, 5.8.2.3

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 drew uhlmann 2018-05-03 15:40:55 UTC
The presence of the <choose> option leads me to infer that this particular field is a required field. If the field isn't required, the <choose> option becomes a <none> option, and in at least 5.9.2.4.20180501195858_35dc609, the element that gets loaded by default (if one isn't already set) is "Nothing selected" which  is what the customer in question was asking for unless I am horribly mistaken. If the field is set to not be required, I expect that this ticket can be closed as not a bug.

Comment 5 Tina Fitzgerald 2018-05-04 15:03:49 UTC
Hi Ryan,

Can you ask the customer to check the dialog configuration based on comment4?

Thanks,
Tina

Comment 6 Ryan Spagnola 2018-05-07 15:12:35 UTC
Hi Tina & Drew,

I relayed the information back to the customer. I'll let you know what they say.

Comment 8 drew uhlmann 2018-05-09 12:09:39 UTC
I still think it would be super-useful to see the dialog and automation code if that's possible.

Comment 16 Tina Fitzgerald 2018-05-14 17:47:34 UTC
Hi Ryan,

We believe this is working as designed.

Since this ticket is marked as a blocker, could you check in with the customer?
If they are not satisfied that it is working properly, could you ask them to supply a reproducer dialog and instructions?  As Drew states in comment 13, their dialogs are complex and we're not able to run them here.

Thanks,
Tina

Comment 19 drew uhlmann 2018-05-15 15:10:10 UTC
https://github.com/ManageIQ/manageiq/pull/17424

Comment 26 Shveta 2018-06-06 18:16 UTC
Created attachment 1448408 [details]
Required

Hi drew , 

I tested this on https://10.12.213.192.
I think the issue Ryan is saying is , The multiselect field vCenter is submitted when no value is selected , that means with "nothing selected" even though the field is set to "required" = True .

Comment 27 Shveta 2018-06-06 18:17 UTC
Created attachment 1448409 [details]
Nothing selected

Comment 28 Shveta 2018-06-12 23:50 UTC
Created attachment 1450720 [details]
Multiselect None selected by default

Used the attached dialog and domain . 
When the dialog loads , None shows selected .
When I select "Contract B" The values are shown in location drop down.

Comment 29 Shveta 2018-06-12 23:51 UTC
Created attachment 1450721 [details]
dialog used for testing

Comment 30 Shveta 2018-06-12 23:53 UTC
Created attachment 1450722 [details]
datastore used for testing

Comment 31 Shveta 2018-06-12 23:54:13 UTC
Also , the location multiselect is set to "required = True" 
but the dialog gets submitted even when no value is selected.

Tested in 5.8.4.4.20180611155620_d2f7ab6

Comment 32 drew uhlmann 2018-06-13 13:32:27 UTC
Hey Ryan! Shveta says that the original issue this ticket was opened for, the on load value of the field being selected, is why this failed QE but since you and I both saw this working I was wondering if you could take another look at it for me please. The being able to submit the value even when it's nil is a different issue that's in the process of being addressed here: https://github.com/ManageIQ/manageiq/pull/17543/files and should've gotten a different ticket, because it's a different issue. The original issue though should have been solved by the PR that got merged and I'm at a loss as to why this failed QE.

Comment 33 drew uhlmann 2018-06-13 16:16:47 UTC
Shveta, none shows selected because you have the field set up to not have the values loaded on init. I'm seeing a text value on load of "Nothing selected" which is the patternfly default for selectboxes like this, but per the customer's request, there is not a value selected and the "nothing selected" is merely a placeholder text. I think my fix worked. 

Can I please have a reproducer?

Comment 34 Shveta 2018-06-13 17:11:35 UTC
Okay . By default "nothing selected" shows .

So if we are fixing the dialog being submitted even if no value is selected in multiselect,  in a separate BZ , then I can verify this.
Let me know .

Thanks, 
Shveta

Comment 35 drew uhlmann 2018-06-13 17:31:22 UTC
I mean the other issue is this thing: https://github.com/ManageIQ/manageiq/pull/17543/files.

Comment 36 drew uhlmann 2018-06-13 17:38:08 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1590949 is for regression

Comment 38 errata-xmlrpc 2018-06-25 14:18:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:1972


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