Created attachment 1470918 [details] Dynamic dropdown extra data Description of problem: In the Service dialog dropdown, a dynamic dropdown which has "hash" data as values and data type as a string show some extra data. Please see the attached screenshots. Version-Release number of selected component (if applicable): cfme-5.9.3.4 version How reproducible: Always Steps to Reproduce: 1. Create a dynamic dropdown method which has "hash" data as values and data type as a string: ~~~ fruit_code = {} fruit_code["{:code=>\"APP01\", :name=>\"Apple01\"}"] = "Apple01" dialog_field = $evm.object dialog_field["sort_by"] = "value" dialog_field["sort_order"] = "ascending" dialog_field["data_type"] = "string" dialog_field["required"] = "true" dialog_field["values"] = fruit_code ~~~ 2. Create a Service dialog with a Dynamic Drop down list. 3. Use above service dialog in a catalog and try to order. Actual results: It is showing extra data in the dropdown. Expected results: It should only display values. Additional info: It works fine in Red Hat Cloudforms 4.5 version.
Created attachment 1470919 [details] Dynamic dropdown extra data inspect
I took a quick look at this on the reproducer and was able to change the automate method to get things working again. The simplest fix is to change this line: fruit_code["{:code=>\"APP01\", :name=>\"Apple01\"}"] = "Apple01" I haven't had time to dive much into the exact reason why this doesn't work anymore, but basically if the above line doesn't use escaped double quotes and uses single quotes instead, it behaves as expected. fruit_code["{:code=>'APP01', :name=>'Apple01'}"] = "Apple01"
I checked the values for the hash coming back from Automate, screenshot attached we seem to be preserving the keys like they are defined in the Automate Method. The UI might be having issues with the hash keys. Another way to accomplish the same thing is to base64 encode the key and use that key. It might be worth investigating why the UI doesn't like those key values when running the dialogs.
Created attachment 1472148 [details] Raw Automate Output after running the dialog method