Bug 1388659

Summary: Auto-tagging tag categories can't be used in reports
Product: Red Hat CloudForms Management Engine Reporter: Beni Paskin-Cherniavsky <cben>
Component: ReportingAssignee: Beni Paskin-Cherniavsky <cben>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Stefanisin <jistefan>
Severity: medium Docs Contact:
Priority: high    
Version: 5.7.0CC: greartes, gtanzill, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: tag:report
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1391978 1391980 (view as bug list) Environment:
Last Closed: 2017-06-12 16:19:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1392379    
Bug Blocks: 1391978, 1391980    

Description Beni Paskin-Cherniavsky 2016-10-25 21:01:56 UTC
Description of problem:
Auto-tagging, soon to be exposed via UI (bug 1383405), uses read_only tags.
Such tag categories can't be used in reports, as the reports editor doesn't list them.

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

How reproducible:
Always

Steps to Reproduce:
1. Use auto-tagging, or `rails console` to create a read_only tag category
   containing at least one tag.  See details under 
   "Steps for Testing/QA" at https://github.com/ManageIQ/manageiq/pull/10459.
2. Enter report editor (Create new or Edit).
3. Look for the tag category in list of columns.

Actual results:
That category is not offered as column.

Expected results:
That category should be offered, along with regular tag categories.

Additional info:

Working on PR https://github.com/ManageIQ/manageiq/pull/10459

Comment 2 Harpreet Kataria 2016-10-26 04:26:32 UTC
Gregg,

I am not sure if this BZ should assigned to Beni Cherniavsky-Paskin (bpaskinc) i see a PR to fix the issue mentioned above that has not been merged yet but has been assigned to JoeR for reviewing. Can you please re-assign this BZ.

~Harpreet.

Comment 3 Beni Paskin-Cherniavsky 2016-10-27 08:15:27 UTC
I'll redo that PR today.

Comment 4 CFME Bot 2016-11-01 17:21:20 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8361bcc095d099dcaa4050230ca029107d4240b9

commit 8361bcc095d099dcaa4050230ca029107d4240b9
Author:     Beni Cherniavsky-Paskin <cben>
AuthorDate: Tue Nov 1 18:22:59 2016 +0200
Commit:     Beni Cherniavsky-Paskin <cben>
CommitDate: Tue Nov 1 18:22:59 2016 +0200

    Reports: include read_only tag categories in filter dropdown
    
    It seems the condition was simply copied from UI for
    editing/assigning/unassigning tags;
    reports merely want to read tags, which should be allowed.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1388659

 .../report_controller/reports/editor.rb            | 26 ++++++++------
 .../miq_report_controller/reports/editor_spec.rb   | 41 ++++++++++++++++++++++
 2 files changed, 57 insertions(+), 10 deletions(-)

Comment 5 CFME Bot 2016-11-01 17:21:25 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/199668bff513a6bb43cc7cecc098287823aa2242

commit 199668bff513a6bb43cc7cecc098287823aa2242
Author:     Beni Cherniavsky-Paskin <cben>
AuthorDate: Tue Nov 1 17:31:44 2016 +0200
Commit:     Beni Cherniavsky-Paskin <cben>
CommitDate: Tue Nov 1 18:10:12 2016 +0200

    Chargeback assigments: include read_only tag categories in filter dropdown
    
    It seems the condition was simply copied from other contexts.
    Here we merely want to read tags, which should be allowed.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1388659

 app/controllers/chargeback_controller.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comment 6 CFME Bot 2016-11-01 17:56:04 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/93ac929123683ea4bcf2d6e001a19ae5c2d1d667

commit 93ac929123683ea4bcf2d6e001a19ae5c2d1d667
Author:     Joe Rafaniello <jrafanie.github.com>
AuthorDate: Tue Nov 1 13:16:29 2016 -0400
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Tue Nov 1 13:54:28 2016 -0400

    Merge pull request #10459 from cben/chargeback-read_only-tags
    
    Reports: include read_only tag categories
    (cherry picked from commit 81b121f00df79afc42c6730ccc16374133473edc)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1388659

 app/controllers/chargeback_controller.rb           |  4 ++-
 .../report_controller/reports/editor.rb            | 26 ++++++++------
 .../miq_report_controller/reports/editor_spec.rb   | 41 ++++++++++++++++++++++
 3 files changed, 60 insertions(+), 11 deletions(-)

Comment 10 Beni Paskin-Cherniavsky 2017-03-23 10:34:00 UTC
QA: Note distinction from new bug 1434856.
This BZ is about mapped tag categories offered among other tag categories in reports editor.
If the whole My Company Tags section disappeared (not even Department, Location, etc.) that's bug 1434856.