Description of problem: ======================= When referencing dialog information from another dialog, pulling information from a "parent" dialog, child dialogs do not update in the UI however logging shows they are returning the right hash in the $evm.object['values'] hash. If you create a dialog entry and have two drop-down menus, and create an automate method for the first that lists some option, if you have your second menu/automate method try to utilize the output of the first it will never change from the initial value, despite any refreshes performed on the dialogs. Note that logs show that we are retrieving the correct values from the first dialog, but anything passed to the 'values' hash of the $evm.object object on the second dialog is ignored entirely. Examples below. Version-Release number of selected component (if applicable): ============================================================= 5.9.1.2 How reproducible: ================= Every time Steps to Reproduce: =================== - Create a parent dialog utilizing an automate method like so: $evm.object['values'] = {'' => 'Empty Set', 1 => 'Burger', 2 => 'Fries', 3 => 'Shake'} - Then have a dialog rely on the above dialog's selections in another method: parent_selection = $evm.root.attributes["dialog_dynamic_dialog_parent"] $evm.log(:info, "DIALOG_DEBUG: child_dialog received #{parent_selection} from parent! #{parent_selection.class}") menu = {'Burger' => 1, 'Fries' => 2, 'Shake' => 3} value = {} case parent_selection when menu['Burger'].to_s value[1] = 'Black Bean' when menu['Fries'].to_s value[1] = 'Sweet Potato' when menu['Shake'].to_s value[1] = 'Vanilla' else value[1] = 'Nothing selected for parent dialog' end $evm.log(:info, "DIALOG_DEBUG: child_dialog is returning values hash of #{value}") $evm.object['values'] = value - Observe as the 'child' dialog will never properly update, and forever show the output of "Nothing selected for parent dialog" when attempting to refresh the button. Note that in the automate logs we do get the updated [----] I, [2018-05-21T13:18:42.415183 #2696:378933c] INFO -- : Updated namespace [TestDialogs/TestDyanamicDialogs/child_dialog TEST/TestDialogs] [----] I, [2018-05-21T13:18:42.427181 #2696:378933c] INFO -- : Invoking [inline] method [/TEST/TestDialogs/TestDyanamicDialogs/child_dialog] with inputs [{}] [----] I, [2018-05-21T13:18:42.428334 #2696:378933c] INFO -- : <AEMethod [/TEST/TestDialogs/TestDyanamicDialogs/child_dialog]> Starting [----] I, [2018-05-21T13:18:43.047862 #2696:51dbc8] INFO -- : <AEMethod child_dialog> DIALOG_DEBUG: child_dialog received 1 from parent! [----] I, [2018-05-21T13:18:43.048743 #2696:51dbc8] INFO -- : <AEMethod child_dialog> DIALOG_DEBUG: child_dialog is returning values hash of {1=>"Black Bean"} [----] I, [2018-05-21T13:18:43.081597 #2696:378933c] INFO -- : <AEMethod [/TEST/TestDialogs/TestDyanamicDialogs/child_dialog]> Ending [----] I, [2018-05-21T13:18:43.081775 #2696:378933c] INFO -- : Method exited with rc=MIQ_OK Despite the above log, observe that no change happens in the UI or via selection, in both the classic UI and the self-service UI. Actual results: =============== Child dialog never updates with new information from parent despite refreshing. Expected results: ================= Child dialog should update with new options based on option of parent dialog upon refreshing.
We think issue has been fixed with latest PRs. Waiting for QE to validate.
Not fixed in master.20180531005435_f827149 Appliance : https://10.8.199.197 Service - generic
Shveta, I adjusted the automate method in your master reproducer and it appears to work to me. The automate method was referencing "dialog_dynamic_dialog_parent" but the name of the dialog field was simply "menu". After changing that, it behaves as expected.
The dialog works now after the changes made by Erik. Method used ==================== #parent_selection = $evm.root.attributes["dialog_dynamic_dialog_parent"] parent_selection = $evm.root.attributes["dialog_menu"] $evm.log(:info, "DIALOG_DEBUG: child_dialog received #{parent_selection} from parent! #{parent_selection.class}") menu = {'Burger' => 1, 'Fries' => 2, 'Shake' => 3} value = {} case parent_selection when menu['Burger'].to_s value[1] = 'Black Bean' when menu['Fries'].to_s value[1] = 'Sweet Potato' when menu['Shake'].to_s value[1] = 'Vanilla' else value[1] = 'Nothing selected for parent dialog' end $evm.log(:info, "DIALOG_DEBUG: child_dialog is returning values hash of #{value}") $evm.object['values'] = value
Created attachment 1447583 [details] disabled submit There is one issue though . After pressing the second refresh , Refresh button for 'topping' dropdown, The submit button gets disabled . master.20180531005435_f827149
Hi Shveta, Thanks for the update. We would track the new issue you encountered separately. I'm going to update this issue as working in master, and we can retest on 5.9 when the new build is available. Thanks, Tina
Created attachment 1448898 [details] dialog
Fixed in 5.9.3.1.20180606184006_8d120c0
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/RHSA-2018:2184