An empty report file doesn't show any headers
Description of problem:
When you generate a report template, it doesn't show any CSV headers (name, label, severity, etc...) on the top of the file if no results are found. This is just a blank file and is confusing as it makes one think the file wasn't generated correctly, also it may break automation that users build around this.
We should keep the headers on the file even if its blank
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Navigate to Report Templates
2.Click "Generate" for applicable errata and search with a host that has no errata applicable (name = myhost).
3.view blank report
report is blank
report has headers
Fixes #28637 - set minimal headers for empty reports
When the report does not render any row, resulting file does not have
any headers. This can be confusing for users, so render_headers macro
was added. It should specify column names that user should always see.
In case some columns are added dynamically, and report_row adds some
additional columns, they are added on demand. Meaning, if we iterate
over some data, new columns can be still added.
#3 Updated by Marek Hulán 6 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset community-templates|bc1362bf712971658ac6d63c661f3841ab727046.