Bug 1753338
| Summary: | Generic object custom button configured to execute playbook does not execute playbook | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | John Dupuy <jdupuy> | |
| Component: | UI - OPS | Assignee: | Harpreet Kataria <hkataria> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Tasos Papaioannou <tpapaioa> | |
| Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | |
| Priority: | medium | |||
| Version: | 5.11.0 | CC: | bmidwood, duhlmann, gmccullo, hkataria, jdupuy, lavenel, lgalis, mfeifer, mkanoor, mpovolny, obarenbo, sbulage, tfitzger, tpapaioa | |
| Target Milestone: | GA | Keywords: | TestOnly, ZStream | |
| Target Release: | 5.12.0 | Flags: | mfeifer:
mirror+
|
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1784190 (view as bug list) | Environment: | ||
| Last Closed: | 2020-10-26 16:13:29 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | Bug | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | Ansible | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1784190 | |||
|
Description
John Dupuy
2019-09-18 15:53:17 UTC
Note that for step 11., the custom button must be made under: Automation > Automate > Generic Objects > All Generic Object Classes Can the associated logs be attached for analysis? Hey John, has that appliance been updated? I'm not seeing services or custom buttons on it. Drew, the original appliance was deleted and likely that IP was assigned to a different appliance. Ah, then may I please have another reproducer? `:attrs=>{"request"=>"Order_Ansible_Playbook"` vs `:attrs=>{:request=>"Order_Ansible_Playbook"`
The nonworking one looks like it's using keys that are strings, not symbols.
I guess comment 15 is a symptom of the fact that we're storing uri_attributes for custom_buttons like this: CustomButton.find(3).uri_attributes => {"request"=>"Order_Ansible_Playbook", :service_template_name=>"list VMs playbook", :hosts=>"localhost"} as both strings and symbols, which certainly can't be great in the UI when hitting, for example, https://github.com/ManageIQ/manageiq-ui-classic/blob/cec300bbea3bb7ab4e46b17400b07bdc4b593804/app/controllers/miq_ae_customization_controller/custom_buttons.rb#L70. Hey Harpreet, based on comment 17 and comment 18, could I get you to please take a look at this one? New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/1048a770cd9a862543f1daec2f76e2a10995fa13 commit 1048a770cd9a862543f1daec2f76e2a10995fa13 Author: Harpreet Kataria <hkataria> AuthorDate: Wed Dec 11 16:03:23 2019 -0500 Commit: Harpreet Kataria <hkataria> CommitDate: Wed Dec 11 16:03:23 2019 -0500 Fixed code to pass in `service_template` in ae_attributes hash When creating a new GO Playbook custom button, code expects service_template to be included in the ae_attributes hash in order to save the value correctly inside uri_attributes. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1753338 app/assets/javascripts/components/generic_object/main-custom-button-form.js | 1 + spec/javascripts/components/generic_object_definition/main-custom-button-form_spec.js | 1 + 2 files changed, 2 insertions(+) The method was missing the service template name in the root object, we provided that, it all ran well. I believe that Harpreet's original fix addresses a valid issue. |