Bug 1471947 - Configuration Management Reports csv export does not respect org/loc context
Summary: Configuration Management Reports csv export does not respect org/loc context
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Reporting
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: Unspecified
Assignee: Tomer Brisker
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-17 18:21 UTC by Perry Gagne
Modified: 2019-08-12 16:35 UTC (History)
6 users (show)

Fixed In Version: foreman-1.15.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:


Attachments (Terms of Use)
Screen shot of reports page. (deleted)
2017-07-17 18:21 UTC, Perry Gagne
no flags Details
Exported CSV of reports page (18.46 KB, text/plain)
2017-07-17 18:25 UTC, Perry Gagne
no flags Details
foreman-debug (2.89 MB, application/x-xz)
2017-07-17 19:46 UTC, Perry Gagne
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20327 0 None None None 2017-07-18 13:33:36 UTC

Description Perry Gagne 2017-07-17 18:21:33 UTC
Description of problem:

 Did a CSV export via the UI of the configuration management report page. Set the filter to "eventful=false". 

2 reports were listed (see the attached screenshot). 

When I did the CSV export the resulting file had entries for all reports, including ones that did not belong to the "Default Organization", event though I was in this context. 




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


How reproducible: Always


Steps to Reproduce:
1. Create a host, and cause a puppet report to be generated.
2. Click "Export" button to export to CSV

Actual results: All Reports included in exported CSV


Expected results: Only the reports that are visible via the filter. 


Additional info: Attached resulting CSV and screen shot, as well as foreman-debug

Comment 1 Perry Gagne 2017-07-17 18:25:42 UTC
Created attachment 1300029 [details]
Exported CSV of reports page

Comment 2 Perry Gagne 2017-07-17 19:44:57 UTC
I did some additional testing on this an noticed that when there was no filter, it produces the full list of hosts. 

It seems to be that the export is not taking into account the Organization/Location context when there in some cases when either:

1. There is no filter.
2. The filter is " eventful = false"

In these cases the CSV contains hosts that are not in the "Default Organization"

There could be other filters that trigger this as well.

Comment 3 Perry Gagne 2017-07-17 19:46:36 UTC
Created attachment 1300070 [details]
foreman-debug

Comment 4 Tomer Brisker 2017-07-18 13:32:59 UTC
It seems the filter field is respected, but the org/loc context isn't. Changing title accordingly and cloning to redmine.

Comment 5 Tomer Brisker 2017-07-18 13:33:33 UTC
Created redmine issue http://projects.theforeman.org/issues/20327 from this bug

Comment 7 Satellite Program 2017-07-31 12:07:38 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20327 has been resolved.

Comment 8 Peter Ondrejka 2017-08-31 14:25:41 UTC
Verified on sat 6.3 snap 13, the csv export from config management reports now honors both the filter and the present organization.

Comment 9 Satellite Program 2018-02-21 16:51:07 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


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