Bug 1785940

Summary: [RFE] Reporting template should allow host filtering based on applicable errata issue date
Product: Red Hat Satellite Reporter: dgupte
Component: ReportingAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6.0CC: bkearney, egolov, inecas, mhulan, oprazak, vgunasek
Target Milestone: 6.8.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.16.0-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:59:52 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:
Bug Depends On: 1846317    
Bug Blocks:    

Description dgupte 2019-12-22 16:27:28 UTC
- Proposed title of this feature request
>>>
[RFE] Reporting template should show outstanding errata for errata filter. 

- What is the nature and description of the request?
>>> 
Generating a report of hosts based on the outstanding erratas, does not seem to be currently available.
Customer wants to generate the report using "Registered Hosts Template". However, by adding "errata filter" he would like to report only critical patches and packages that have not been updated for 1 month.
When doing this he want to get the "Registered Hosts Template" pattern. When generating the report, errata filter doesn't work properly. 

Customer can able to filter using errata filter while generating Registered Hosts Template.

For example, when we write issued <"10 days ago", we just wants it to bring him the relevant system.

Monitor -> Report Template -> Select the Cloned Template -> Select the `Inputs` tab. Now create a new filter by clicking on '+Add Input'. In the new form add Name as 'Errata filter' and Input Type as 'User Input'. Save this and generate the report using errata filter parameter: issued <"10 days ago".

when we add above parameters to errata filter section, we able to generate the template. But my report shows all hosts.

- Do you have specific timeline dependencies?
>>>No

- Can you please explain us the what are the functional requirements? If test cases can be provided this would be even more ideal.
Reporting template should show outstanding errata for errata filter. 

- Would you be able to assist in testing this functionality if implemented?
>>> Yes

Comment 3 Marek Hulan 2020-01-03 10:17:07 UTC
It seems you didn't update the content of the template after you added a filter input. Just adding input will not have any effect. The registered hosts does not allow searching by erratas and it's not easy to allow it. You should probably use "Applicable errata" report. That already allows filtering based on errata attributes. If you wanted to base the customization on Registered hosts due to additional host attributes, just add those attributes to clone of Applicable errata report. E.g. just add lines like

'Owner': host.owner,
'Ip': host.ip,

Note that you may need to also add include/preload definitions to keep the report performing well. E.g. the owner would need to be preloaded like in Registered hosts report.

I'd start with checking with the customer, whether the Applicable errata fits the need and gathering potential customizations requests.

Comment 8 Bryan Kearney 2020-01-16 21:03:49 UTC
Upstream bug assigned to mhulan

Comment 9 Bryan Kearney 2020-01-16 21:03:51 UTC
Upstream bug assigned to mhulan

Comment 10 Bryan Kearney 2020-01-21 17:03:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28780 has been resolved.

Comment 11 dgupte 2020-02-18 13:18:54 UTC
Hi Marek,

Customer has closed the case, also the upstream PR is closed hence I will close this bugzilla.

Comment 12 Lukáš Hellebrandt 2020-09-04 12:00:38 UTC
Verified with Sat 6.8 snap 14.

Used steps from comment 6 - it's now possible to filter hosts like this: "applicable_errata_issued > "10 days ago""

Comment 15 errata-xmlrpc 2020-10-27 12:59:52 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.8 release), 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-2020:4366