Bug 1594469 - Dialog options are missing when using a custom button and dialog on GenericObject instance
Summary: Dialog options are missing when using a custom button and dialog on GenericOb...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.10.0
Assignee: drew uhlmann
QA Contact: Niyaz Akhtar Ansari
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-23 12:12 UTC by Franck Grosjean
Modified: 2019-02-07 23:03 UTC (History)
11 users (show)

Fixed In Version: 5.10.0.15
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:03:14 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 RHSA-2019:0212 0 None None None 2019-02-07 23:03:24 UTC

Description Franck Grosjean 2018-06-23 12:12:40 UTC
Description of problem:
Dialog options are missing when using a custom button and dialog on GenericObject instance. Only the default value is visible in $evm.root for radio button ou dropbox. Any other option_0_xxx are not in $evm.root as dialog_option_0_xxx

Version-Release number of selected component (if applicable):
5.9.2

How reproducible:
Create a generic object (DRO) and dump $evm.root in method associated with a custom button

Steps to Reproduce:
1. Create a generic object (DRO)
2. Create a custom button
3. Add a dialog
4. Dump root in associated instance/method

Actual results:
dialog_xxx variables are missing

Expected results:
dialog params should be visible as $evm.root["dialog_xxx"]

Additional info:

Comment 2 Franck Grosjean 2018-06-23 12:46:56 UTC
Here after $evm.root with only $evm.root["dialog_option_0_protocol"] (radio button)

[----] I, [2018-06-23T13:38:20.967832 #2027:ec5e8c]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener> -----------------------------------------------------------------------------
[----] I, [2018-06-23T13:38:20.968548 #2027:ec5e8c]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener> Object Attributes:
[----] I, [2018-06-23T13:38:20.969668 #2027:ec5e8c]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener> -----------------------------------------------------------------------------
[----] I, [2018-06-23T13:38:20.970127 #2027:ec5e8c]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener> Root Attributes:
[----] I, [2018-06-23T13:38:20.982669 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - ae_next_state : 
[----] I, [2018-06-23T13:38:20.983747 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - ae_result : ok
[----] I, [2018-06-23T13:38:20.984596 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - ae_retry_server_affinity : false
[----] I, [2018-06-23T13:38:20.985369 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - ae_state : execute
[----] I, [2018-06-23T13:38:20.986098 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - ae_state_max_retries : 0
[----] I, [2018-06-23T13:38:20.986891 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - ae_state_retries : 0
[----] I, [2018-06-23T13:38:20.987608 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - ae_state_started : 2018-06-23 11:38:20 UTC
[----] I, [2018-06-23T13:38:20.988349 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - ae_state_step : main
[----] I, [2018-06-23T13:38:20.989118 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - dialog_option_0_protocol : http           <<------------------------------- Default Value on radio button
[----] I, [2018-06-23T13:38:20.990107 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - generic_object : #<MiqAeMethodService::MiqAeServiceGenericObject:0x000000000b9355c0>
[----] I, [2018-06-23T13:38:20.990810 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - generic_object_id : 92000000000009
[----] I, [2018-06-23T13:38:20.991517 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - method_name : add_listener
[----] I, [2018-06-23T13:38:20.992446 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - miq_group : #<MiqAeMethodService::MiqAeServiceMiqGroup:0x000000000b4f4560>
[----] I, [2018-06-23T13:38:20.993558 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - miq_server : #<MiqAeMethodService::MiqAeServiceMiqServer:0x000000000b736af8>
[----] I, [2018-06-23T13:38:20.994182 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - miq_server_id : 92000000000001
[----] I, [2018-06-23T13:38:20.994847 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - object_name : GenericObject
[----] I, [2018-06-23T13:38:20.995653 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - request : any
[----] I, [2018-06-23T13:38:20.997071 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - tenant : #<MiqAeMethodService::MiqAeServiceTenant:0x000000000b4f4c40>
[----] I, [2018-06-23T13:38:20.998196 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - user : #<MiqAeMethodService::MiqAeServiceUser:0x000000000b4f52f8>
[----] I, [2018-06-23T13:38:20.998894 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - user_id : 92000000000001
[----] I, [2018-06-23T13:38:20.999542 #2027:124c3f8]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener>    - vmdb_object_type : generic_object
[----] I, [2018-06-23T13:38:21.001475 #2027:ec5e8c]  INFO -- : Q-task_id([resource_action_92000000000151]) <AEMethod add_listener> -----------------------------------------------------------------------------

Comment 3 Sudhir Mallamprabhakara 2018-06-25 14:00:56 UTC
@Martin - Can you please run thru the scenario and update the bz with your observations?

Comment 4 Martin Kourim 2018-06-27 14:25:23 UTC
I was able to reproduce it on 5.9.3.2. Only default values of dropdowns and radio buttons are visible in the $evm.root.


Create a dialog
* go to Automation / Automate / Customization / Service Dialogs
* click on Configuration / Add a new Dialog
* add a dropdown and radio buttons, select default values
* copy dialogs names (dropdown_list_1_1 and radio_button_1 in my case)


Create Generic Object Instance
* got to Automation / Automate / Generic Objects
* click on Add a new Generic Object Class
* add button to generic object class that executes method with "System/Process" set to Request and Request set to InspectMe


Create automate method
* got to Automation / Automate / Explorer
* create new domain with System / Request namespaces
* copy the InspectMe instance from the ManageIQ domain
* create InspectMe method with smtg like

$evm.log("info", "Dropdown")
$evm.log("info", $evm.root["dialog_dropdown_list_1_1"])
$evm.log("info", "Radio Button")
$evm.log("info", $evm.root["dialog_radio_button_1"])


Create a generic object instance
POST /api/generic_objects
{
   "generic_object_definition": {
      "href": "https://<addr>/api/generic_object_definitions/1"
   },
   "name":"go_name1"
}


Create new service
POST /api/services
{
    "name": "myservice01",
    "display": true
}


Add instance to the service
POST /api/services/1
{
    "action": "add_resource",
    "resource": { "resource": { "href": "https://<addr>/api/generic_objects/1" } }
}


Execute the InspectMe
* got to Services / My Services
* select "myservice01"
* under "Generic Objects" section, click on number of instances
* click on the "go_name1" instance
* click on the custom button
* in the dialog select the non-default values for dropdown and radio buttons
* click submit


Check automate.log
* log into appliance and execute "vmdb"
* verify that the output in automate.log contains just the default values:
Q-task_id([resource_action_27]) <AEMethod [/myDomain/System/Request/InspectMe]> Starting                    
Q-task_id([resource_action_27]) <AEMethod inspectme> Dropdown                                               
Q-task_id([resource_action_27]) <AEMethod inspectme> ftp                                                    
Q-task_id([resource_action_27]) <AEMethod inspectme> Radio Button                                           
Q-task_id([resource_action_27]) <AEMethod inspectme> 2                                                      
Q-task_id([resource_action_27]) <AEMethod [/myDomain/System/Request/InspectMe]> Ending                      
Q-task_id([resource_action_27]) Method exited with rc=MIQ_OK

Comment 6 drew uhlmann 2018-09-11 15:59:09 UTC
Also https://github.com/ManageIQ/manageiq/pull/17973

Comment 7 Niyaz Akhtar Ansari 2019-01-02 13:14:36 UTC
Verified in Version 5.10.0.30.20181218191323_900a416

I can see details info in automation log

[----] I, [2019-01-02T08:12:27.696208 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) User [admin] with current group ID [2] name [EvmGroup-super_administrator]
[----] I, [2019-01-02T08:12:27.795146 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Instantiating [/SYSTEM/PROCESS/Request?GenericObject%3A%3Ageneric_object=1&MiqServer%3A%3Amiq_server=1&User%3A%3Auser=1&dialog_dropdown_list_1_1=2&dialog_radio_button_1=2&object_name=Request&request=InspectMe&vmdb_object_type=generic_object]
[----] I, [2019-01-02T08:12:27.832579 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Updated namespace [/SYSTEM/PROCESS/Request?GenericObject%3A%3Ageneric_object=1&MiqServer%3A%3Amiq_server=1&User%3A%3Auser=1&dialog_dropdown_list_1_1=2&dialog_radio_button_1=2&object_name=Request&request=InspectMe&vmdb_object_type=generic_object  ManageIQ/SYSTEM]
[----] I, [2019-01-02T08:12:27.924928 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Updated namespace [SYSTEM/PROCESS/parse_provider_category  ManageIQ/SYSTEM]
[----] I, [2019-01-02T08:12:27.932216 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Invoking [builtin] method [/ManageIQ/System/Process/parse_provider_category] with inputs [{}]
[----] I, [2019-01-02T08:12:27.933008 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Setting provider_category to: 
[----] I, [2019-01-02T08:12:27.933609 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Following Relationship [miqaedb:/System/Request/InspectMe#create]
[----] I, [2019-01-02T08:12:27.949166 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Updated namespace [miqaedb:/System/Request/InspectMe#create  Domain1/System]
[----] I, [2019-01-02T08:12:28.004488 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Updated namespace [System/Request/inspectme  Domain1/System]
[----] I, [2019-01-02T08:12:28.010203 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Invoking [inline] method [/Domain1/System/Request/InspectMe] with inputs [{}]
[----] I, [2019-01-02T08:12:28.012251 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) <AEMethod [/Domain1/System/Request/InspectMe]> Starting 
[----] I, [2019-01-02T08:12:28.367155 #15079:609d6ec]  INFO -- : Q-task_id([resource_action_23]) <AEMethod inspectme> Dropdown
[----] I, [2019-01-02T08:12:28.368587 #15079:609d6ec]  INFO -- : Q-task_id([resource_action_23]) <AEMethod inspectme> 2
[----] I, [2019-01-02T08:12:28.368960 #15079:609d6ec]  INFO -- : Q-task_id([resource_action_23]) <AEMethod inspectme> Radio Button
[----] I, [2019-01-02T08:12:28.370007 #15079:609d6ec]  INFO -- : Q-task_id([resource_action_23]) <AEMethod inspectme> 2
[----] I, [2019-01-02T08:12:28.395700 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) <AEMethod [/Domain1/System/Request/InspectMe]> Ending
[----] I, [2019-01-02T08:12:28.395872 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Method exited with rc=MIQ_OK
[----] I, [2019-01-02T08:12:28.396829 #15079:11aef54]  INFO -- : Q-task_id([resource_action_23]) Followed  Relationship [miqaedb:/System/Request/InspectMe#create]

Comment 8 errata-xmlrpc 2019-02-07 23:03:14 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/RHSA-2019:0212


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