Bug 1737449
| Summary: | Can not associate a button to the button set when separately created using REST API | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Rahul Chincholkar <rchincho> | ||||
| Component: | API | Assignee: | drew uhlmann <duhlmann> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Nikhil Dhandre <ndhandre> | ||||
| Severity: | medium | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||
| Priority: | medium | ||||||
| Version: | 5.10.5 | CC: | mshriver, ndhandre, obarenbo, simaishi, yrudman | ||||
| Target Milestone: | GA | Keywords: | TestOnly, ZStream | ||||
| Target Release: | 5.11.0 | Flags: | ndhandre:
automate_bug+
mfeifer: mirror+ |
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 5.11.0.21 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1745198 (view as bug list) | Environment: | |||||
| Last Closed: | 2019-12-13 14:57:03 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | Bug | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | CFME Core | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1745198 | ||||||
| Attachments: |
|
||||||
|
Description
Rahul Chincholkar
2019-08-05 11:35:26 UTC
By way of https://github.com/ManageIQ/manageiq/pull/18368, this is fixed on master. So if we were to backport that to H, we would also need the following: https://github.com/ManageIQ/manageiq-ui-classic/pull/5319 and https://github.com/ManageIQ/manageiq-api/pull/563 With those three backported, this should be fixed. New commit detected on ManageIQ/manageiq/ivanchuk: https://github.com/ManageIQ/manageiq/commit/c4b2d8aa0425fa12649c7b9a1d772e7da596a98e commit c4b2d8aa0425fa12649c7b9a1d772e7da596a98e Author: Brandon Dunne <bdunne> AuthorDate: Tue Aug 20 13:15:40 2019 -0400 Commit: Brandon Dunne <bdunne> CommitDate: Tue Aug 20 13:15:40 2019 -0400 Merge pull request #19169 from d-m-u/fixing_custom_button_set_copy_children Fix the custom button set set_data hash links to the original buttons on copy (cherry picked from commit 68f281d47fe19f84f0aacff9e8d764d69e315416) https://bugzilla.redhat.com/show_bug.cgi?id=1740556 https://bugzilla.redhat.com/show_bug.cgi?id=1737449 app/models/custom_button_set.rb | 8 +- spec/models/custom_button_set_spec.rb | 3 +- spec/models/service_template/copy_spec.rb | 10 +- 3 files changed, 18 insertions(+), 3 deletions(-) Tested with 5.11.0.21 Now its possible to associate unassigned button with group using REST API. Verification steps: 1. Create group (tested with service) POST - https://192.168.122.231/api/custom_button_sets { "name" : "MyGroup1", "description" : "MyGroup1", "set_data" : { "button_icon" : "ff ff-manageiq", "button_color" : "#4727ff", "display" : true, "applies_to_class" : "Service" } } # response id = 28 2. Create two unassigned buttons POST - https://192.168.122.231/api/custom_buttons { "name" : "MyButton_1", "description" : "MyButton_2", "applies_to_class" : "Service", "options" : { "button_icon" : "ff ff-manageiq", "button_color" : "#4727ff", "display" : true }, "resource_action" : { "ae_namespace" : "SYSTEM", "ae_class" : "PROCESS" }, "visibility" : { "roles" : ["_ALL_"] } } # response id = 5 and 6 Step 3 : Set the button_order for button_set using button ID (Because we want to assign button to button_set), Under RESPONSE the button_order has been properly assigned. POST - https://192.168.122.231/api/custom_button_sets/28 { "action" : "edit", "resource" : { "set_data" : { "button_order": [ 6, 5 ], "button_icon": "ff ff-manageiq", "button_color": "#4727ff", "display": true, "applies_to_class": "Service" } } } Verify with UI and REST It assigned to group. |