Bug 1628727 - Button enablement and visibility by tag not working for buttons on Ansible services
Summary: Button enablement and visibility by tag not working for buttons on Ansible se...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.9.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Yuri Rudman
QA Contact: Nikhil Dhandre
URL:
Whiteboard:
Depends On:
Blocks: 1634809
TreeView+ depends on / blocked
 
Reported: 2018-09-13 19:52 UTC by Saif Ali
Modified: 2022-03-13 15:33 UTC (History)
11 users (show)

Fixed In Version: 5.10.0.18
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1634809 (view as bug list)
Environment:
Last Closed: 2019-02-12 16:50:54 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:
ndhandre: automate_bug+


Attachments (Terms of Use)
Button (17.67 KB, image/png)
2018-09-13 19:52 UTC, Saif Ali
no flags Details
Button2 (34.94 KB, image/png)
2018-09-13 19:53 UTC, Saif Ali
no flags Details

Description Saif Ali 2018-09-13 19:52:37 UTC
Created attachment 1483153 [details]
Button

Description of problem:
Expressions configured on a button for enablement and visibility are not working when used against Ansible services.  If I'm understanding this correctly, I should be able to build the expression as shown in attached images and then tag the service with the same and the button should only be available when the expression is true.  However as you can see in the other attached image, the tag is set on the service but the button is disabled still.

Version-Release number of selected component (if applicable):
Tested on both 4.6.2 and 4.6.4 with same results.


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Saif Ali 2018-09-13 19:53:12 UTC
Created attachment 1483154 [details]
Button2

Comment 4 CFME Bot 2018-10-01 13:21:07 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/b74e3df296c80520a0469adaba4a7c131105e8e0
commit b74e3df296c80520a0469adaba4a7c131105e8e0
Author:     Yuri Rudman <yrudman>
AuthorDate: Tue Sep 25 17:13:20 2018 -0400
Commit:     Yuri Rudman <yrudman>
CommitDate: Tue Sep 25 17:13:20 2018 -0400

    MiqExpression defined on Service does not evaluate tag correctly when instance of class descendent from Service passed: class descendent from Service has `service` method and string "service" passed to MiqExpression as reference, so MiqExpression trying to obtaine 'real' object using passed reference by invoking `service` method on instance of class descendent from Service, which is wrong. Passed object should not be subsrituted using reference if reference is "service" and object < ... <  Service
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1628727

 app/models/condition.rb | 9 +-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comment 6 CFME Bot 2018-10-01 16:57:32 UTC
New commit detected on ManageIQ/manageiq/hammer:

https://github.com/ManageIQ/manageiq/commit/5d30389b1fbda1627073b466f344eb3059d3dd1c
commit 5d30389b1fbda1627073b466f344eb3059d3dd1c
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Oct  1 09:17:44 2018 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Oct  1 09:17:44 2018 -0400

    Merge pull request #18020 from yrudman/fixed-expression-with-tag-on-service

    Fixed MiqExpression evaluation on tagged Services

    (cherry picked from commit d670fe8fa67f1cd6acb1c3405016062592fbeb6d)

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

 app/models/condition.rb | 9 +-
 spec/models/condition_spec.rb | 8 +
 2 files changed, 16 insertions(+), 1 deletion(-)

Comment 7 Angelina Vasileva 2018-10-11 07:55:48 UTC
Fixed and verified in 5.10.0.19.20181009184346_1c8bf5d


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