Bug 2245455

Summary: Satellite showing the wrong date when using a filter when the 'end date'
Product: Red Hat Satellite Reporter: Aldrey Souza <alsouza>
Component: Content ViewsAssignee: Samir Jha <sajha>
Status: CLOSED ERRATA QA Contact: Cole Higgins <chiggins>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.13.0CC: ahumbe, chiggins, dwoodruf, rlavi, sajha, sbible, wpinheir
Target Milestone: 6.15.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-23 17:15:27 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:
Attachments:
Description Flags
Content-View Filter Rule with wrong date none

Description Aldrey Souza 2023-10-21 16:24:28 UTC
Created attachment 1995018 [details]
Content-View Filter Rule with wrong date

Description of problem:
 Creating Content-View and using a filter it's showing the wrong date in the 'end data'

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

How reproducible:
 Create a new Content-View and use the filter by date

Steps to Reproduce:
 1. Creating the variables on the Satellite terminal:
   ~~~
   ORGNAME="EXAMPLE"
   CVNAME="RHEL8.8_FY24-1"
   REPOSID=""
   REPOS=('Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8' 'Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8' 'Red Hat Enterprise Linux 8 for x86_64 - Supplementary RPMs 8' 'Red Hat Enterprise Linux 8 for x86_64 - High Availability RPMs 8' 'Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart 8.8' 'Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.8')
   ~~~

 2. Get the Repos ID from the variable REPOS:
   ~~~
   for REPO in "${REPOS[@]}"
   do
     echo "REPO: ${REPO}"
     REPOID=$(hammer --csv --no-headers repository list --fields id --organization "${ORGNAME}" --search "name=\"${REPO}\"")
     echo "REPOID: ${REPOID}"
     if [ "${REPOSID}" == "" ]
     then
       [ -n "${REPOID}" ] && REPOSID="${REPOID}"
     else 
       [ -n "${REPOID}" ] && REPOSID="${REPOSID},${REPOID}"
     fi
   done
   echo "REPOSID: ${REPOSID}"
   ~~~

 3. Create the Content-View from ${CVNAME} variable:
   ~~~
   hammer content-view create --name "${CVNAME}" --organization "${ORGNAME}" --repository-ids "${REPOSID}"
   ~~~

 4. Create the first filter:
   ~~~
   hammer content-view filter create --content-view "${CVNAME}" --name "All packages without errata" --description "All packages without errata" --type "rpm" --original-packages "true" --inclusion "true" --organization "${ORGNAME}" --repository-ids "${REPOSID}"
   ~~~

 5. Create the second filter:
   ~~~
   hammer content-view filter create --content-view "${CVNAME}" --name "Enable ALL Modules" --description "Enable ALL Module Streams" --type "modulemd" --original-module-streams "true" --inclusion "true" --organization "${ORGNAME}" --repository-ids "${REPOSID}"
   ~~~

 6. Create the third filter:
   ~~~
   hammer content-view filter create --content-view "${CVNAME}" --name "Errata through 10/01/2023" --description "Errata through 10/01/2023" --type "erratum" --inclusion "true" --organization "${ORGNAME}" --repository-ids "${REPOSID}"
   ~~~

 7. Using the filter rule on the third filter:
   ~~~
   hammer content-view filter rule create --content-view "${CVNAME}" --content-view-filter "Errata through 10/01/2023" --end-date "2023-10-01" --organization "${ORGNAME}"
   ~~~

 8. Getting the information from the third filter:
   ~~~
   hammer content-view filter info --content-view "${CVNAME}" --name "Errata through 10/01/2023" --organization "${ORGNAME}"
   ~~~

 9. Via Satellite WebUI getting the information from the third filter (file: CV_FilterRule.png)

Actual results:
 Getting the correct date via hammer:
 ~~~
 Filter ID:    11
 Name:         Errata through 10/01/2023
 Type:         erratum
 Inclusion:    true
 Description:  Errata through 10/01/2023
 Repositories: 
  1) Id:    55
     Name:  Red Hat Enterprise Linux 8 for x86_64 - High Availability RPMs 8
     Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_High_Availability_RPMs_8
  2) Id:    54
     Name:  Red Hat Enterprise Linux 8 for x86_64 - Supplementary RPMs 8
     Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_Supplementary_RPMs_8
  3) Id:    15
     Name:  Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8
     Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_BaseOS_RPMs_8
  4) Id:    33
     Name:  Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart 8.8
     Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_AppStream_Kickstart_8_8
  5) Id:    34
     Name:  Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.8
     Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_BaseOS_Kickstart_8_8
  6) Id:    9
     Name:  Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8
     Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_AppStream_RPMs_8
 Rules:        
  1) Id:       4
     End Date: 2023-10-01
     Types:    bugfix, enhancement, security
     Created:  2023/10/21 15:50:55
     Updated:  2023/10/21 15:50:55
 ~~~

 But the wrong date from Satellite WebUI


Expected results:
 See the correct date from hammer and Satellite WebUI

Additional info:

Comment 1 Brad Buckingham 2023-10-23 12:06:13 UTC
Hello,

Is this a regression from Satellite 6.12 or earlier?

Thanks!

Comment 6 Samir Jha 2023-11-01 18:41:49 UTC
Created redmine issue https://projects.theforeman.org/issues/36883 from this bug

Comment 7 Bryan Kearney 2023-11-07 20:02:53 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36883 has been resolved.

Comment 12 errata-xmlrpc 2024-04-23 17:15:27 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.15.0 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-2024:2010