Bug 1312049 - <Choose> Won't Display on Refresh of Dynamic Dropdown
<Choose> Won't Display on Refresh of Dynamic Dropdown
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS (Show other bugs)
5.5.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.5.3
Assigned To: Martin Hradil
luke couzens
: ZStream
Depends On: 1311308
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-25 10:42 EST by Chris Pelland
Modified: 2017-08-29 22:01 EDT (History)
10 users (show)

See Also:
Fixed In Version: 5.5.3.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1311308
Environment:
Last Closed: 2016-04-13 14:45:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 4 luke couzens 2016-04-01 06:13:23 EDT
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 07:33:02 EDT
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 12:14:37 EDT
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 14:45:22 EDT
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.