Bug #36883
closedKatello showing the wrong date when using a filter when the 'end date'
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2245455
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:
Updated by The Foreman Bot about 1 year ago
- Status changed from New to Ready For Testing
- Assignee set to Samir Jha
- Pull request https://github.com/Katello/katello/pull/10786 added
Updated by The Foreman Bot about 1 year ago
- Fixed in Releases Katello 4.11.0 added
Updated by Samir Jha about 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|7af2316758fc448fcb219b924cd156a85cf91e75.
Updated by Chris Roberts about 1 year ago
- Subject changed from Satellite showing the wrong date when using a filter when the 'end date' to Satellite showing the wrong date when using a filter when the 'end date'
- Target version set to Katello 4.11.0
- Triaged changed from No to Yes
Updated by Ian Ballou about 1 year ago
- Subject changed from Satellite showing the wrong date when using a filter when the 'end date' to Katello showing the wrong date when using a filter when the 'end date'