Bug 1514457

Summary: Filtering by repository is not working in Packages view
Product: Red Hat Satellite Reporter: Oleg Dovzhenko <odovzhen>
Component: Content ManagementAssignee: Partha Aji <paji>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, bkearney, ehelms, nkathole, odovzhen, oshtaier, paji, rballang, walden
Target Milestone: UnspecifiedKeywords: PrioBumpQA, Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.4.5.51-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 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
Group of scrrenshots for issue
none
RH Sat Tools packages
none
Zoo packages
none
Not filtered custom repository
none
Gofer package from RH Sat Tools
none
Can not found package from custom repository
none
foreman log
none
screenrecord none

Description Oleg Dovzhenko 2017-11-17 13:43:23 UTC
Created attachment 1354182 [details]
Group of scrrenshots for issue

Description of problem:
Packages view always show packages from first selected (filtered) repository


Version-Release number of selected component (if applicable):
Satellite 6.3.0 snap 24
satellite-6.3.0-21.0.beta.el7sat.noarch
foreman-1.15.6.3-1.el7sat.noarch
katello-3.4.5-6.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create product.
2. Add custom repository 'zoo' to product, sync it.
3. Add Red Hat subscription.
4. Add Red Hat repository with Satellite too, sync it.
5. Navigate to packages.
6. Select Red Hat repository. RPMs related to it may be shown
7. Select custom repository 'zoo'.

Actual results:
Packages related to Red Hat repository shown

Expected results:
Packages related to 'zoo' repository should be shown

Comment 1 Brad Buckingham 2017-11-17 16:26:53 UTC
Oleg, is this a regression?

Comment 2 Oleg Dovzhenko 2017-11-20 08:27:41 UTC
Think this is a regression as working as expected on 6.2

Comment 3 Oleg Dovzhenko 2017-11-20 08:29:05 UTC
Created attachment 1355574 [details]
RH Sat Tools packages

Comment 4 Oleg Dovzhenko 2017-11-20 08:29:22 UTC
Created attachment 1355576 [details]
Zoo packages

Comment 5 Oleg Dovzhenko 2017-11-20 08:29:41 UTC
Created attachment 1355577 [details]
Not filtered custom repository

Comment 6 Oleg Dovzhenko 2017-11-20 08:29:57 UTC
Created attachment 1355578 [details]
Gofer package from RH Sat Tools

Comment 7 Oleg Dovzhenko 2017-11-20 08:43:29 UTC
Created attachment 1355604 [details]
Can not found package from custom repository

Comment 8 Oleg Dovzhenko 2017-11-20 10:51:25 UTC
Created attachment 1355675 [details]
foreman log

Comment 11 Oleksandr Shtaier 2017-12-19 15:19:14 UTC
Yes, that is a regression

'Package' page seems completely broken as once you select any repository you  cannot back to previous state even 'All repositories' selected

Pagination functionality is also stop to work

Comment 15 Partha Aji 2018-01-10 21:47:40 UTC
Connecting redmine issue http://projects.theforeman.org/issues/22241 from this bug

Comment 16 Satellite Program 2018-01-11 15:02:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22241 has been resolved.

Comment 18 Nikhil Kathole 2018-01-18 11:19:56 UTC
VERIFIED

Version tested:
Satellite 6.3 snap 32

Steps:
1. Sync repos from manifest
2. Created custom product and sync it
3. Navigated to packages page

Filtering custom repo as well as red hat repositories works.

2018-01-18 06:13:29 5075d316 [app] [I] Started GET "/katello/api/v2/packages?organization_id=1&page=1&paged=true&per_page=20&repository_id=57&search=" for IP at 2018-01-18 06:13:29 -0500
2018-01-18 06:13:29 5075d316 [app] [I] Processing by Katello::Api::V2::PackagesController#index as JSON
2018-01-18 06:13:29 5075d316 [app] [I]   Parameters: {"organization_id"=>"1", "page"=>"1", "paged"=>"true", "per_page"=>"20", "repository_id"=>"57", "search"=>"", "api_version"=>"v2"}
2018-01-18 06:13:29 5075d316 [app] [I] Current user: admin (administrator)
2018-01-18 06:13:29 5075d316 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.1ms)
2018-01-18 06:13:30 5075d316 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.51/app/views/katello/api/v2/packages/index.json.rabl within katello/api/v2/layouts/collection (122.1ms)
2018-01-18 06:13:30 5075d316 [app] [I] Completed 200 OK in 143ms (Views: 100.7ms | ActiveRecord: 27.5ms)

Comment 19 Nikhil Kathole 2018-01-18 11:20:37 UTC
Created attachment 1382859 [details]
screenrecord

Comment 20 Satellite Program 2018-02-21 16:54:37 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, 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-2018:0336