Bug 2073194

Summary: Filter API/ UI doesn't return errata, package group, module stream filter rules if repository has been removed from CV
Product: Red Hat Satellite Reporter: Samir Jha <sajha>
Component: Content ViewsAssignee: Samir Jha <sajha>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: ehelms, sbible
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.3.0.34-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-05 14:35:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Samir Jha 2022-04-07 20:48:52 UTC
katello/api/v2/errata?show_all_for=content_view_filter&filter_id=ID&include_filter_ids=true&per_page=20&page=1&search=&types[]=enhancement&types[]=security&types[]=bugfix&date_type=issued excludes added errata if it doesn't belong to any repo in the CV.

Steps to reproduce.
1. Sync a repo with errata.
2. Create a CV and add the repo to it.
3. Create an errata filter, add any errata from the synced repo to the filter.
4. Remove repo from CV.
5. The Errata filter does not show the added errata from the repo although it is still applied in the backend.

This can be very confusing!

Comment 1 Samir Jha 2022-04-07 20:48:56 UTC
Created from redmine issue https://projects.theforeman.org/issues/34736

Comment 2 Samir Jha 2022-04-07 20:48:57 UTC
Upstream bug assigned to None

Comment 3 Samir Jha 2022-04-07 20:50:03 UTC
This can be seen with Module stream and package group filters as well.

Comment 4 Bryan Kearney 2022-04-13 20:05:02 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34736 has been resolved.

Comment 8 Lai 2022-05-31 22:53:16 UTC
Step to retest:

I was able to follow the steps outline in the description.  Tested with errata, package group, and module streams.

Expected result:
Should still be able to see the filter rule even though the repo is removed.


Actual result:
Am still able to see the filter rule even though the repo is removed.


Verified on 6.11 snap 22 with rubygem-katello-4.3.0.39-1.el8sat.noarch on both rhel7 and rhel8

Comment 11 errata-xmlrpc 2022-07-05 14:35:12 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 (Moderate: Satellite 6.11 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-2022:5498