Description of problem: You can add an embedded method to itself. The UI should not allow this. Version-Release number of selected component (if applicable): 5.10.0.16 How reproducible: 100% Steps to Reproduce: 1. Edit a method 2. Select 'Add Method' button 3. Navigate and select the method you are editing. 4. Save method Actual results: It will allow you to add embedded method to itself Expected results: You should be stopped from adding the method to itself. Additional info:
You can have the same embedded method in different domains so we need to handle this condition. There is an existing method to check all domains so you may need this. Will add a screenshot. Hope this helps ... Thanks Billy
Created attachment 1492978 [details] Embedded method in multiple domains
https://github.com/ManageIQ/manageiq-ui-classic/pull/4753
David, Madhu made this comment in the PR A user can copy the methods into their own domain, so now we would have the same named methods in multiple domains and none of these methods can be embedded. There is a method called MiqAeMethod.get_homonymic_across_domains(@user, '/DOM1/A/B/C/CLASS1/method1') Which gets a list of all the places where this method exists and we should prevent it from being embedded. The UI currently uses this to display a list of methods and instances across domains Is this what your looking for ?
Yes, thanks!
Merged commit fcbbc9052c1cb0e1feb0bcc018f292f6a9010a5e
Verified in 5.11.0.11 Steps of verification: 1) Navigate to Automate->Explorer 2) Create local domain 3) Copy a method from the MIQ domain 4) Edit the method 5) Try to add the method to itself 6) Verified that nothing happens when you click on the same method so you cannot add the method to itself