Bug 1242534
Summary: | API List content_view_filters rules error | |||
---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Peter Vreman <peter.vreman> | |
Component: | Content Views | Assignee: | Tom McKay <tomckay> | |
Status: | CLOSED ERRATA | QA Contact: | jcallaha | |
Severity: | medium | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 6.1.8 | CC: | bbuckingham, bkearney, cwelton, inecas, jaudet, jcallaha, lpramuk, stkachen, tasander, tomckay | |
Target Milestone: | Unspecified | Keywords: | Reopened, Triaged | |
Target Release: | Unused | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
URL: | http://projects.theforeman.org/issues/11920 | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1391042 (view as bug list) | Environment: | ||
Last Closed: | 2016-11-02 13:09:16 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1122832, 1391042 |
Description
Peter Vreman
2015-07-13 14:03:25 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. Issue is that Filter rules do not have a name field to sort on Quick patch is below to use the id instead /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.51/app/controllers/katello/api/v2# diff -u content_view_filter_rules_controller.rb.150714-1 content_view_filter_rules_controller.rb --- content_view_filter_rules_controller.rb.150714-1 2015-07-14 09:37:34.626750747 +0000 +++ content_view_filter_rules_controller.rb 2015-07-14 09:38:25.849705473 +0000 @@ -99,6 +99,10 @@ private + def sort_params + {sort_by: 'id'} + end + def find_filter @filter = ContentViewFilter.find(params[:content_view_filter_id]) end Better would be to have a rule_order field that also allows to specify the order of the rules to be applied Tested https://sat-perf-04.idm.lab.bos.redhat.com/katello/api/v2/content_view_filters?content_view_id=11&per_page=5 and https://sat-perf-04.idm.lab.bos.redhat.com/katello/api/v2/content_view_filters/1/rules?per_page=5 and neither gave an error in 6.1.1 Listing a content view's filters succeeds when the content view is of type "rpm" or "package_group". It fails when the content view is of type "erratum". I've written a new automated test that verifies this fact, and the traceback in the first comment also mentions errata. Sorry. That should say "succeeds when the content view **filter** is of type 'rpm' or...". See the automated test at: https://github.com/SatelliteQE/robottelo/pull/2724 Created redmine issue http://projects.theforeman.org/issues/11920 from this bug Upstream bug component is WebUI Upstream bug assigned to tomckay Upstream bug assigned to tomckay Per upstream, this was related to elastic search which has been removed. I am moving this to ON_QA for verification. Verified in Satellite 6.2 Beta Snap 19. GET https://rhsm-qe-1.rhq.lab.eng.bos.redhat.com/katello/api/v2/content_view_filters/6/rules/ { "total": 5, "subtotal": 5, "page": null, "per_page": null, "error": null, "search": null, "sort": { "by": null, "order": null }, "results": [ { "content_view_filter_id": 6, "errata_id": "RHBA-2016:1349", "date_type": "updated", "id": 1, "created_at": "2016-06-30 19:47:56 UTC", "updated_at": "2016-06-30 19:47:56 UTC" }, { "content_view_filter_id": 6, "errata_id": "RHBA-2016:1253", "date_type": "updated", "id": 2, "created_at": "2016-06-30 19:47:56 UTC", "updated_at": "2016-06-30 19:47:56 UTC" }, { "content_view_filter_id": 6, "errata_id": "RHBA-2016:1251", "date_type": "updated", "id": 3, "created_at": "2016-06-30 19:47:56 UTC", "updated_at": "2016-06-30 19:47:56 UTC" }, { "content_view_filter_id": 6, "errata_id": "RHBA-2016:1305", "date_type": "updated", "id": 4, "created_at": "2016-06-30 19:47:56 UTC", "updated_at": "2016-06-30 19:47:56 UTC" }, { "content_view_filter_id": 6, "errata_id": "RHBA-2016:1259", "date_type": "updated", "id": 5, "created_at": "2016-06-30 19:47:56 UTC", "updated_at": "2016-06-30 19:47:56 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/RHBA-2016:1501 |