Hide Forgot
Description of problem: when creating a custom button to request call_instance_with_message, the message attribut override the message of the request Version-Release number of selected component (if applicable): 5.10 How reproducible: every time Steps to Reproduce: 1. create a custom button to request the call_instance_with_message 2. set the message to create 3. set the attributes instance, class, namespace to "whatever" 4. set the attribute message to "my_message" 5. save it Actual results: the message of the request is set to the value of the message attribute "my_message" instead of "create" Expected results: the message is set to "create" and the message attribute is set to "my_message" Additional info:
The UI is changing the value of message in Object Details (see Before Attachment) to the value of message in Attribute/Value Pairs (see After Attachment).
Created attachment 1509206 [details] Before Attachment
Created attachment 1509207 [details] After Attachment
I recreated this on appliance 10.8.196.247. I created a button called 'call instance with message' on VM and Instance.
Hi Billy, I backtraced this to the `MiqAeEngine.create_automation_object` method in the automation engine gem. I added the breakpoint after the [1] call of this method and found out that the generated URI doesn't contain the "create" as the message, but it uses the message from the attribute/value pairs, i.e. "billy%20messages". Then to set the message for the DB record, this URI is being parsed [2]. ``` @edit[:new][:object_message] => "create" @edit[:uri] => "/SYSTEM/PROCESS/Request?MiqServer%3A%3Amiq_server=16&User%3A%3Auser=1&class=Request&instance=TestNotification&message=billy%20messages&namespace=%2FSystem&object_name=Request#billy%20messages" ``` My question: is this a bug or a feature in the `create_automation_object` method, i.e. does it behave wrong or should I work this around? [1] https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller/buttons.rb#L532 [2] https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller/buttons.rb#L865
Hi David, #billy%20messages" - This needs to be create, this is the object message &message=billy%20messages - This is correct, This is the attribute message The attribute message is overriding the object message and it should not. Thanks Billy
For Comment 7
Sorry Dávid, totally giving this back to you since it looks to be wrong before it ever hits Automate.
https://github.com/ManageIQ/manageiq-automation_engine/pull/287