Bug 1753281 - Custom buttons: deleting generic object custom button nested under another one deletes both
Summary: Custom buttons: deleting generic object custom button nested under another on...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.11.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.11.z
Assignee: Zita Nemeckova
QA Contact: John Dupuy
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-18 14:09 UTC by John Dupuy
Modified: 2020-03-02 14:37 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-02 14:36:43 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
All buttons deleted (369.56 KB, image/gif)
2019-09-18 14:09 UTC, John Dupuy
no flags Details

Description John Dupuy 2019-09-18 14:09:34 UTC
Created attachment 1616256 [details]
All buttons deleted

Description of problem:
Deleting a custom button that is below another custom button in the accordion tree results in both buttons being deleted. 

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

How reproducible:
100%

Steps to Reproduce:
1. Create a generic object class
2. Create a custom button under this class, name "mybutton"
3. Create another custom button under this class name "abutton"
4. Delete button called "abutton"

Actual results:
All buttons are deleted 

Expected results:
Only "abutton" should be deleted

Additional info:
See attached gif

Comment 2 John Dupuy 2019-09-18 14:13:09 UTC
Note: I am also seeing this BZ in 5.10.10

Comment 3 drew uhlmann 2019-09-24 14:14:44 UTC
So if the first button is deleted, only one gets deleted, but if you pick the second to be deleted they both are. 
This isn't a problem with the API call.

It looks like
https://github.com/ManageIQ/manageiq-ui-classic/blob/dd153fa4ed80c9e544c84765cef79b4538deac25/app/assets/javascripts/components/generic_object/generic-object-definition-toolbar.js#L57

is calling delete for multiple things.

Comment 4 drew uhlmann 2019-09-24 14:15:40 UTC
Sorry, didn't intend to link to that specific line, just that file in general.

Comment 9 John Dupuy 2020-03-02 14:37:59 UTC
I am not seeing this bug on the most recent CFME 5.11.4.1 build. Therefore I've closed this BZ as WORKSFORME.


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