Bug 1198792

Summary: CFME 5.3.2 - dialog field with single item in dropdown box does not permit that single element to be selected causing dialog to fail.
Product: Red Hat CloudForms Management Engine Reporter: Thomas Hennessy <thenness>
Component: ProvisioningAssignee: eclarizi
Status: CLOSED CURRENTRELEASE QA Contact: Dave Johnson <dajohnso>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3.0CC: gmccullo, jdeubel, jhardy, jocarter, mfeifer, obarenbo, sshveta, thenness
Target Milestone: GA   
Target Release: 5.4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-06 21:41:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
customer provided sample dialog display showing single item in dropdown box none

Description Thomas Hennessy 2015-03-04 20:21:13 UTC
Created attachment 998043 [details]
customer provided sample dialog display showing single item in dropdown box

Description of problem:  Catalog dialog with single element dropdown box fails to allow the single element to be selected causing dialog to fail


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


How reproducible: sample dialog screen is provided to show context.  


Steps to Reproduce:
1.
2.
3.

Actual results: single item in dropdown box is not selectable


Expected results: item in dropdown box should be selectable regardless of number of items in dropdown box.


Additional info:

Comment 3 Thomas Hennessy 2015-03-05 14:22:02 UTC
In response to the question "Is this a dynamic dialog?" the customer has responded
=====
Yes, this is a dialog element of type "Drop Down Dynamic List" with Entry Point /AEXP/Migration/Dialogs/get_failed_vms

with "Load Values on init" checked


what the get_failed_vms method does is retrieves a list of VMs with a set of specific tags.
========
the method.zip attachment above contains a screen image of the "Editing Dialog"  and the ruby code to populate the dropdown element of the panel.

Comment 4 Greg McCullough 2015-03-05 15:46:46 UTC
Suggest setting the default_value when then list only contains 1 item.

Code change would look something like this:
  dialog_field['values'] = list
  dialog_field['default_value'] = list[0].first if list.length == 1

Tom - Can you suggest this work-around and let us know if this works for them?

Comment 5 Thomas Hennessy 2015-03-05 16:36:10 UTC
Greg,
Thanks for the fast response.  Jared is back and is covering Josh's cases while he is in class so he will be responding to the customer.

Tom Hennessy

Comment 6 Dave Johnson 2015-03-05 16:44:58 UTC
Shveta, can you please try to reproduce this and create a trello card for getting an automated test around it

Comment 7 Thomas Hennessy 2015-03-05 16:52:59 UTC
Greg,
Again, thanks for the code to address the issue, but I guess the question still is, is this a usage bug (customer usage) or should the dialog still allow for manual selection regardless of the number of elements in the dropdown box?

Tom Hennessy

Comment 8 Greg McCullough 2015-03-05 17:02:02 UTC
I proposed the default_value as a work-around, the dialog should still allow for the manual selection.

Comment 9 Thomas Hennessy 2015-03-06 03:21:01 UTC
Greg,
Customer has implemented your suggested work-around and reports positive results.  SF case may be closed next week.  Just wanted to provide feedback on your suggestion.  thanks.

Tom Hennessy

Comment 10 Greg McCullough 2015-03-06 14:19:12 UTC
Tom - Thanks for the feedback.  I am going to drop the priority and severity to medium since we have a work-around.

Comment 11 Greg McCullough 2015-03-06 19:26:54 UTC
Erik - As a possible fix it would make sense for the model to set the value if the values returned from automate is a single item.

Comment 12 Shveta 2015-03-06 21:25:51 UTC
Working in build 5.3.3.2.20150217120931_a465215

Comment 13 Greg McCullough 2015-03-06 21:41:55 UTC
QE has confirmed this is not an issue in the current release.