Bug 1289688 - Scheduled reports generate for last group selected by user when user is a member of multiple groups
Scheduled reports generate for last group selected by user when user is a mem...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting (Show other bugs)
5.4.0
Unspecified Unspecified
unspecified Severity medium
: GA
: 5.4.5
Assigned To: Libor Pichler
Aziza Karol
: ZStream
Depends On: 1289676
Blocks: 1289687
  Show dependency treegraph
 
Reported: 2015-12-08 12:59 EST by Chris Pelland
Modified: 2016-03-29 10:15 EDT (History)
8 users (show)

See Also:
Fixed In Version: 5.4.5.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1289676
Environment:
Last Closed: 2016-03-29 10:15:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 CFME Bot 2015-12-09 14:23:17 EST
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d559a7dafbfc5cadc17fe7e6bfd62069e614e847

commit d559a7dafbfc5cadc17fe7e6bfd62069e614e847
Author:     Libor Pichler <lpichler@redhat.com>
AuthorDate: Wed Dec 9 14:48:38 2015 +0100
Commit:     Libor Pichler <lpichler@redhat.com>
CommitDate: Wed Dec 9 14:48:38 2015 +0100

    Save the current group id of the user when creating schedule record
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1289688

 vmdb/app/controllers/report_controller/schedules.rb | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
Comment 3 CFME Bot 2015-12-09 14:23:21 EST
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=3f43860c4f47c6b18e024dc45a1efded95ad3af2

commit 3f43860c4f47c6b18e024dc45a1efded95ad3af2
Author:     Libor Pichler <lpichler@redhat.com>
AuthorDate: Wed Dec 9 14:50:48 2015 +0100
Commit:     Libor Pichler <lpichler@redhat.com>
CommitDate: Wed Dec 9 16:24:15 2015 +0100

    Store current miq_group_id at time when was scheduled into MiqReportResult
    
    It avoids situation when user changes group between scheduling report and
    generating
    https://bugzilla.redhat.com/show_bug.cgi?id=1289688

 vmdb/app/models/miq_report/generator.rb | 3 ++-
 vmdb/app/models/miq_report_result.rb    | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
Comment 4 CFME Bot 2015-12-09 14:23:25 EST
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=e6aa73b7e3ba114ff4a31f4bd3d6350d0853666c

commit e6aa73b7e3ba114ff4a31f4bd3d6350d0853666c
Merge: 4f5d33f d1cb336
Author:     Gregg Tanzillo <gtanzill@redhat.com>
AuthorDate: Wed Dec 9 14:20:17 2015 -0500
Commit:     Gregg Tanzillo <gtanzill@redhat.com>
CommitDate: Wed Dec 9 14:20:17 2015 -0500

    Merge branch 'bz_1289688' into '5.4.z'
    
    Save the current group id of the user when creating schedule record
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1289688
    https://trello.com/c/B7jTan2r
    https://github.com/ManageIQ/manageiq/pull/5681
    
    cherry-pick was not clean because of different structure directories than in upstream, but
    changed parts of code are same as it is in upstream, one exception is accessing to current user and current group, in this version is is thru ```session[:userid]``` and ```session[:group]``` (according this - spec are updated as well)
    
    See merge request !599

 .../app/controllers/report_controller/schedules.rb | 15 +++++---
 vmdb/app/models/miq_report/generator.rb            |  3 +-
 vmdb/app/models/miq_report_result.rb               |  2 +-
 vmdb/spec/controllers/report_controller_spec.rb    | 38 +++++++++++++++++++-
 .../miq_report_result/miq_report_result_spec.rb    | 42 ++++++++++++++++++++++
 5 files changed, 92 insertions(+), 8 deletions(-)
Comment 6 Aziza Karol 2016-02-12 06:28:10 EST
Good to go.

Verified in 5.4.5.0.20160120124945_d8bf7e3 

steps:
1.configure ldap
2.login with the user which is member of multiple groups(say group1 and group2)
3.create a new schedule and schedule a report for user(group1 as current group) 
4.change the current group to group2
5.when report is generated original group should be displayed ie group1.
Comment 8 errata-xmlrpc 2016-03-29 10:15:21 EDT
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://rhn.redhat.com/errata/RHBA-2016-0171.html

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