Bug 1651099
Summary: | Custom button attribute override message | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Cyril Coupel <ccoupel> | ||||||
Component: | Automate | Assignee: | drew uhlmann <duhlmann> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Nikhil Dhandre <ndhandre> | ||||||
Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||||
Priority: | high | ||||||||
Version: | 5.10.0 | CC: | akarol, bmidwood, dhalasz, hkataria, lavenel, mfeifer, mkanoor, mpovolny, obarenbo, simaishi, tfitzger, wfitzger | ||||||
Target Milestone: | GA | Keywords: | TestOnly, ZStream | ||||||
Target Release: | 5.11.0 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 5.11.0.1 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1672693 (view as bug list) | Environment: | |||||||
Last Closed: | 2019-12-13 15:16:08 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | CFME Core | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 1672693 | ||||||||
Attachments: |
|
Description
Cyril Coupel
2018-11-19 08:23:48 UTC
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 Sorry Dávid, totally giving this back to you since it looks to be wrong before it ever hits Automate. |