Bug 1672691

Summary: UI allows adding embedded method to itself.
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: UI - OPSAssignee: Dávid Halász <dhalasz>
Status: CLOSED ERRATA QA Contact: John Dupuy <jdupuy>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.0CC: bmidwood, hkataria, jdupuy, lavenel, mpovolny, obarenbo, smallamp
Target Milestone: GAKeywords: ZStream
Target Release: 5.10.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.1.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1633815 Environment:
Last Closed: 2019-03-06 09:50:42 UTC Type: ---
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: 1633815    
Bug Blocks:    

Comment 2 Satoe Imaishi 2019-02-05 23:09:35 UTC
Backported to Hammer branch:

commit c35a21caf7d74bc29d2637fba6d6c648fa3e2a21
Author: Harpreet Kataria <hkataria>
Date:   Mon Jan 21 16:35:37 2019 -0500

    Merge pull request #4753 from skateman/embedded-method-selectable
    
    Do not allow to embed a method into itself in automate
    
    (cherry picked from commit 617a341ed6c8bf0e1055dec565017493891d339f)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1672691

Comment 3 CFME Bot 2019-02-13 03:28:32 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/c35a21caf7d74bc29d2637fba6d6c648fa3e2a21
commit c35a21caf7d74bc29d2637fba6d6c648fa3e2a21
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Jan 21 16:35:37 2019 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Jan 21 16:35:37 2019 -0500

    Merge pull request #4753 from skateman/embedded-method-selectable

    Do not allow to embed a method into itself in automate

    (cherry picked from commit 617a341ed6c8bf0e1055dec565017493891d339f)

    https://bugzilla.redhat.com/show_bug.cgi?id=1672691

 app/assets/javascripts/controllers/miq_ae_class/ae_inline_method_selection_controller.js | 1 -
 app/controllers/miq_ae_class_controller.rb | 9 +
 app/views/miq_ae_class/_embedded_methods.html.haml | 2 +-
 spec/controllers/miq_ae_class_controller_spec.rb | 36 +
 4 files changed, 46 insertions(+), 2 deletions(-)

Comment 4 John Dupuy 2019-03-01 15:21:37 UTC
Verified in CFME 5.10.1.2.20190219165527_7a4a22b

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

Comment 6 errata-xmlrpc 2019-03-06 09:50:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0453