Bug 1641012

Summary: undefined method `find_tagged_with' for #<Class:0x000000000b5e3228> [miq_request/show_list]
Product: Red Hat CloudForms Management Engine Reporter: Niladri Roy <niroy>
Component: ApplianceAssignee: Joe Rafaniello <jrafanie>
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.9.4CC: abellott, hkataria, ikaur, jrafanie, kthiyaga, lavenel, mfeifer, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.21 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1641810 (view as bug list) Environment:
Last Closed: 2019-02-12 16:50:06 UTC Type: Bug
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:    
Bug Blocks: 1641810    

Description Niladri Roy 2018-10-19 12:42:48 UTC
Description of problem:
Below error is seen when user clicks on Services > Requests

Error caught: [NoMethodError] undefined method `find_tagged_with' for #<Class:0x000000000b5e3228>

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

How reproducible:
Everytime at Cu environment

Steps to Reproduce:
1. Restore DB dump of Cu
2. Click on Services> Requests
3.

Actual results:
User sees "Unexpected Error encountered"

Expected results:
the list of miq_requests should be shown

Additional info:
This started happening after recent update to 5.9.4.7 (from 5.9.2.4) , so this seems to be regression

Comment 8 CFME Bot 2018-10-22 15:30:47 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/ed5fbff7c264c6b3862c0552634234ec4a0bfebc
commit ed5fbff7c264c6b3862c0552634234ec4a0bfebc
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Fri Oct 19 16:07:51 2018 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Fri Oct 19 16:07:51 2018 -0400

    Check if class is taggable before attempting to process tag expression

    This eliminates an error being raised when a tag expression was used in RBAC and is
    applied to a class that is not taggable

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

 lib/rbac/filterer.rb | 2 +-
 spec/lib/rbac/filterer_spec.rb | 18 +
 2 files changed, 19 insertions(+), 1 deletion(-)

Comment 10 CFME Bot 2018-10-22 21:00:53 UTC
New commit detected on ManageIQ/manageiq/hammer:

https://github.com/ManageIQ/manageiq/commit/371a21f17a26376ccd8e473b645f8988ed61c5f1
commit 371a21f17a26376ccd8e473b645f8988ed61c5f1
Author:     Joe Rafaniello <jrafanie.github.com>
AuthorDate: Mon Oct 22 11:26:24 2018 -0400
Commit:     Joe Rafaniello <jrafanie.github.com>
CommitDate: Mon Oct 22 11:26:24 2018 -0400

    Merge pull request #18114 from gtanzillo/fix-tag-expression-on-not-taggable-class

    Check if class is taggable before attempting to process tag expression

    (cherry picked from commit 6fa29c26a8dbb3c8935dfc4d521b6971073d3655)

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

 lib/rbac/filterer.rb | 2 +-
 spec/lib/rbac/filterer_spec.rb | 18 +
 2 files changed, 19 insertions(+), 1 deletion(-)

Comment 11 Shveta 2018-10-25 18:13:49 UTC
Verification blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1643250

Comment 12 Shveta 2018-11-08 18:08:34 UTC
Took an empty database.  Created a new user role, from an existing one, add a Managed -> environment -> production tag for that user role, assigned a group to this role, and added a user into this group.  As an admin, created a request, then logged in as the user with this production tag.  

No error on seeing requests.User is able to see requests

verified in 5.10.0.23.20181106165157_92dd189