Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1198792 - 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.
Summary: CFME 5.3.2 - dialog field with single item in dropdown box does not permit th...
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.3.0
Hardware: x86_64
OS: Linux
Target Milestone: GA
: 5.4.0
Assignee: eclarizi
QA Contact: Dave Johnson
Depends On:
TreeView+ depends on / blocked
Reported: 2015-03-04 20:21 UTC by Thomas Hennessy
Modified: 2019-07-11 08:44 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-03-06 21:41:55 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)
customer provided sample dialog display showing single item in dropdown box (78.67 KB, image/png)
2015-03-04 20:21 UTC, Thomas Hennessy
no flags Details

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):

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

Steps to Reproduce:

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
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
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
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

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

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