Bug 1888667

Summary: "Applied Errata" report template does not consider input "Up to" and "Since" in WebUI, hammer works
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: ReportingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Sam Bible <sbible>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7.0CC: ahumbe, mhulan, sadas, sajha, sbible, thadzhie
Target Milestone: 6.13.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-03 13:20:33 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 Ranjan Kumar 2020-10-15 13:12:01 UTC
Description of problem: Applied errata report doesn't consider input Since and 'Up to'. It returns all the result.

Selected Since 15th Oct and upto 15th Oct But result contains 18th Oct 
date	                  hostname	                     erratum_id	  erratum_type	status
2020-09-18 08:59:33 +0530 rhel7u5-1.gsslab.rdu2.redhat.com   RHBA-2020:3615 bugfix	success


Satellite log also confirm, since and up_to is not in parameter list
here is production log
~~~
2020-10-15T18:22:06 [I|app|b56f2285] Started POST "/templates/report_templates/197-Applied%20Errata/schedule_report" for 10.74.9.242 at 2020-10-15 18:22:06 +0530
2020-10-15T18:22:06 [I|app|b56f2285] Processing by ReportTemplatesController#schedule_report as HTML
2020-10-15T18:22:06 [I|app|b56f2285]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"vqzyuzBcNUhF++JBl7ZpoPHTMo3hq9f6z43VMfALv+Du7hKZTcV7F98biivLDzfNSfCCo9bwBH+kgpSsrBgxqw==", "report_template_report"=>"[FILTERED]", "commit"=>"Submit", "id"=>"197-Applied Errata"}
2020-10-15T18:22:07 [I|app|b56f2285] Enqueued TemplateRenderJob (Job ID: d96240ac-c6d4-4951-a30c-c1d7bd2eff2a) to Dynflow(default) with arguments: {"template_id"=>"197-Applied Errata", "gzip"=>false, "send_mail"=>false, "mail_to"=>"a", "format"=>"csv", "input_values"=>{"55"=>{"value"=>"all"}, "56"=>{"value"=>"no"}, "57"=>{"value"=>"success"}}}, {:user_id=>62}
2020-10-15T18:22:07 [I|app|b56f2285] Redirected to https://dhcp131-99.gsslab.pnq2.redhat.com/templates/report_templates/197-Applied%20Errata/report_data?job_id=d96240ac-c6d4-4951-a30c-c1d7bd2eff2a
2020-10-15T18:22:07 [I|app|b56f2285] Completed 302 Found in 182ms (ActiveRecord: 22.7ms)
~~~

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

How reproducible: Always

Steps to Reproduce:
1. Go to Monitor -> Report Template --> "Host - Applied Errata" --> generate 
2. Fill up Since and Up to
3. It doesn't consider since and upto and list all applied errata

Actual results: Return wrong result


Expected results: Should consider since and upto input value.


Additional info: 
Hammer works fine, here is an exaple
# hammer report-template generate --name "Applied Errata" --inputs 'Filter Errata Type="all",Include Last Reboot="no",Status="success",Since="2020-09-18 00:29:30",Up to="2020-09-18 03:50:33"'
date,hostname,erratum_id,erratum_type,status
2020-09-18 03:29:33 UTC,rhel7u5-1.gsslab.rdu2.redhat.com,RHBA-2020:3615,bugfix,success

Comment 1 Dominik Matoulek 2021-01-28 10:08:20 UTC
Created redmine issue https://projects.theforeman.org/issues/31744 from this bug

Comment 6 Brad Buckingham 2022-11-03 21:47:41 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 7 Brad Buckingham 2022-11-07 14:33:10 UTC
This bugzilla was not reproducible on 6.11 and later.  We are aligning this to 6.13 for QE verification.

Comment 8 Sam Bible 2023-03-01 18:33:42 UTC
Verified on 6.13 - Snap 12

Steps to Verify:
1) Register a host.
2) Enable and Sync a repository that includes applicable erratum.
3) Apply at least 1 errata to a host.
4) Generate a "Applied Errata" report

Expected Results:
When using either Since or Up To options in the template, the report will respect these parameters.

Actual Results:
When using either Since or Up To options in the template, the report will respect these parameters.

Comment 11 errata-xmlrpc 2023-05-03 13:20:33 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.13 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-2023:2097