Bug 2167146

Summary: The "Export" button in "All Hosts" page does not exports the visible columns as expected
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: HostsAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.13.0CC: aruzicka, ashipati, ehelms, jbhatia, lhellebr, onerleka, pcreech, zhunting
Target Milestone: 6.14.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: rubygem-foreman_rh_cloud-8.0.47 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:18:30 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:

Description Sayan Das 2023-02-05 06:27:56 UTC
Description of problem:

Feel free to consider this an RFE or BUG as applicable but I am reporting this as a bug here.

We have two Export buttons available in 

Hosts --> Content Hosts page

    ( This works and exports the same data we can see in UI )

Hosts --> All Hosts page  

    ( This one does not exports the same set of data as visible in UI )




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

Satellite 

  6.13 ( Snap 9 )
  6.12
  6.11
  6.10


How reproducible:

Easily 


Steps to Reproduce:

1. Install a Satellite 6.13 ( or any other versions mentioned )
2. Go to Hosts --> All Hosts page and note down the column names. 
3. Click on Export and Check the columns downloaded CSV file
4. Click on "Manage Columns" and make the following modifications before saving it.

    ** Unselect the Comment, Owner and RH Cloud options.
    ** Select the IPv4 Address inside Network category 

5. Note the change in columns in the All Hosts page now. 

6. Repeat Step 3



Actual results:

On Step 2:

Power	Recommendations	Name	Operating system	Model	Owner	Host group	Last report	Comment

On Step 3:

Name	Operatingsystem	Compute Resource Or Model	Hostgroup	Last Report

On Step 5:

Power	Name	IPv4 address	Operating system	Model	Host group	Last report

On Step 6:

Name	Operatingsystem	Compute Resource Or Model	Hostgroup	Last Report



Expected results:

Whatever Columns we can see for Hosts in "All Hosts" page, Those SHOULD BE exported in the CSV instead of only exporting a fixed set of data i.e.

Name	Operatingsystem	Compute Resource Or Model	Hostgroup	Last Report

Specifically when we give users the choice to customize what they want to see on that page via "Manage Columns", I am positive that users will try to export that data as well, and for that "Export" button needs to be able to fetch the expected data properly. 


Additional info:

NA

Comment 4 Bryan Kearney 2023-02-22 16:03:27 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35701 has been resolved.

Comment 5 Adam Ruzicka 2023-02-22 16:05:00 UTC
I won't argue with automation, but some changes are still not merged yet

Comment 6 Patrick Creech 2023-02-28 21:00:33 UTC
Attaching issue for https://github.com/Katello/katello/pull/10460 to prevent this from moving to POST prematurely

Comment 7 Bryan Kearney 2023-03-02 16:03:25 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35701 has been resolved.

Comment 8 Adam Ruzicka 2023-03-02 16:06:38 UTC
Again, I won't argue with the automation, but the rh cloud changes are not merged yet.

Comment 12 Lukáš Hellebrandt 2023-07-17 13:54:20 UTC
Verified with Sat 6.14.0 snap 7.0.

The exported CSV now contains the columns that are chosen to display in the WebUI. The column order doesn't match neither WebUI column order nor the Manage Columns checkboxes order (and these two don't match either) but that's just weird, not a bug IMO.

Also, I must disagree with OPs statement that in Content Hosts, the columns match. They don't. But that's out of scope of this BZ.

Comment 15 Adam Ruzicka 2023-08-31 10:43:37 UTC
*** Bug 2236451 has been marked as a duplicate of this bug. ***

Comment 18 errata-xmlrpc 2023-11-08 14:18:30 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 (Important: Satellite 6.14 security and bug fix update), 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-2023:6818