Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1510064

Summary: /statistics page does not respect organization context for admin user
Product: Red Hat Satellite 6 Reporter: Roman Plevka <rplevka>
Component: DashboardAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: bbuckingham, ehelms, mhulan, pcreech, tbrisker
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.15.6.26-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Roman Plevka 2017-11-06 16:18:54 UTC
Description of problem:
this seems to worked prior snap #21:

when i access the /statistics page as admin user, the widget seem to contain data from all orgs&locs, not respecting the chosen context.
- e.g. OS distribution across hosts, or Architectures - if i have some hosts belonging to Org A, I still can see them counted in the chart even if i have Org B selected.

When i access the page using another user with Manager role assigned, this seems to perform correctly.

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

How reproducible:


Steps to Reproduce:
1. have some hosts created in orgA
2. as admin, navigate to dashboard -> statistics
3. switch between organization contexts and notice, the stats are not changing (at least for OS and arch distributions over hosts)

[4.] try all the above with a custom user with Manager role and all orgs assigned.

Comment 1 Roman Plevka 2017-11-06 16:20:44 UTC
note: this might not be a problem for a whole page, but the individual widgets. Please, correct the title accordingly, if that is the case

Comment 4 Marek Hulan 2017-11-06 17:38:27 UTC
Created redmine issue http://projects.theforeman.org/issues/21584 from this bug

Comment 6 pm-sat@redhat.com 2017-11-07 17:24:53 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 7 pm-sat@redhat.com 2017-11-07 17:24:55 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 8 pm-sat@redhat.com 2017-11-26 11:25:03 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21584 has been resolved.

Comment 9 Patrick Creech 2017-11-30 16:22:57 UTC
Marek,

This didn't cherry-pick cleanly, and I'm not that familiar with foreman's codebase.  Could you do the pick for me?

Thanks,
Patrick

Comment 10 Marek Hulan 2017-12-07 20:58:20 UTC
In fact it seems this won't be needed as we'll fix it by BZ 1502725, let's keep it modified until it's resolved.

Comment 11 Roman Plevka 2018-01-08 20:07:41 UTC
VERIFIED
on sat6.3.0-31
by automation:
StatisticTestCase.test_positive_display_arch_chart_title
StatisticTestCase.test_positive_display_os_chart_title

Comment 12 pm-sat@redhat.com 2018-02-21 16:54:37 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/RHSA-2018:0336