Bug 1312049 - <Choose> Won't Display on Refresh of Dynamic Dropdown
Summary: <Choose> Won't Display on Refresh of Dynamic Dropdown
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.5.3
Assignee: Martin Hradil
QA Contact: luke couzens
URL:
Whiteboard:
Depends On: 1311308
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-25 15:42 UTC by Chris Pelland
Modified: 2017-08-30 02:01 UTC (History)
10 users (show)

Fixed In Version: 5.5.3.2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1311308
Environment:
Last Closed: 2016-04-13 18:45:22 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0616 0 normal SHIPPED_LIVE CFME 5.5.3 bug fixes and enhancement update 2016-04-13 22:38:44 UTC

Comment 4 luke couzens 2016-04-01 10:13:23 UTC
Hi Martin, 

can I have some more info on creating this bug. I have followed the steps the best I can but can't even reproduce this on a 5.5.2.4 appliance.

Thanks,

Luke

Comment 5 Martin Hradil 2016-04-01 11:33:02 UTC
Hi Luke..

I'm not sure how to reproduce *exactly*, you would need some automate method generating data for that.. (and I no longer have the method).


However, given the issue is really about bad escaping of the sent values in JS, you can do this:

* create a service dialog with a dynamic dropdown, enable both autorefresh and the refresh button
* assign that dialog to a button, for example on VMs & Templates
* trigger that button in a toolbar
* you should see <None> in the select
* click the Refresh button

.. in 5.5.2.4, you will see "Nothing selected" in the dropdown, even though the server response (from dynamic_radio_button_refresh) includes `refreshed_values: [[null, "<None>"]]`

.. in 5.5.3.2, the server response will be the same, but you should keep seeing "<None>" in the dropdown (becasue those angle brackets are now escaped correctly and don't break the select).

Comment 6 luke couzens 2016-04-01 16:14:37 UTC
Verified in 5.5.3.2 using this code for the automate method: 

dialog_field = $evm.object

# sort_by: value / description / none
dialog_field["sort_by"] = "value"

# sort_order: ascending / descending
dialog_field["sort_order"] = "ascending"

# data_type: string / integer
dialog_field["data_type"] = "integer"

# required: true / false
dialog_field["required"] = "true"

dialog_field["values"] = {nil => "<Choose>", 1 => "one", 2 => "two", 10 => "ten", 50 => "fifty"}
dialog_field["default_value"] = "<Choose>"

the choose value shows on 5.5.3.2 but not on 5.5.2.4

Comment 8 errata-xmlrpc 2016-04-13 18:45:22 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/RHBA-2016:0616


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