Bug 1599313 - Sort order different between Subscriptions and Add Subscriptions page
Summary: Sort order different between Subscriptions and Add Subscriptions page
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.7.0
Assignee: satellite6-bugs
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On: 1600588
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-09 13:29 UTC by Corey Welton
Modified: 2020-04-14 13:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:23:24 UTC
Target Upstream Version:


Attachments (Terms of Use)
Verification screenshot (87.47 KB, image/png)
2019-11-20 21:20 UTC, Cole Higgins
no flags Details


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 24308 Low Closed Sort order different between Subscriptions and Add Subscriptions page 2020-03-05 14:50:01 UTC
Red Hat Product Errata RHSA-2020:1454 None None None 2020-04-14 13:23:37 UTC

Description Corey Welton 2018-07-09 13:29:35 UTC
Description of problem:

The ordering of the subscriptions appears to be different between the two pages. Add Subscriptions seems to be sorted based on Contract #, whereas Subscriptions seems to be sorted by sub name.

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

6.4 snap 10

How reproducible:


Steps to Reproduce:
1. Use a manifest, preferably one containing a large # of subscriptions
2. Note ordering (based on contract number). Navigate to Add Subscriptions and add one sub from those available to you.
3. Navigate back to your Subscriptions page. Look for the subscription you just added.

Actual results:
The ordering is different, and whatever you added will show in the list based on where it lands alphabetically.

Expected results:

Congruent sorting across the two pages, or possibly just documentation noting sort orders.

Additional info:
I don't think this is a critical issue but it's worth looking into.

Comment 3 Walden Raines 2018-07-19 14:28:57 UTC
Created redmine issue https://projects.theforeman.org/issues/24308 from this bug

Comment 4 Walden Raines 2018-08-08 13:49:48 UTC
Neither the subscriptions nor upstream subscriptions API will allow the requested sorting.

When attempting to sort by name on the upstream subscriptions API:

13:41:11 rails.1   | 2018-08-08T13:41:11 [E|app|00b13] exception when talking to a remote client: 500 Internal Server Error RestClient::InternalServerError: 500 Internal Server Error
13:41:11 rails.1   |  | Body: {"displayMessage":"Runtime Error could not resolve property: name of: org.candlepin.model.Pool at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException:62","requestUuid":"c4c5504f-254c-4116-8c7b-ef9a8e3d8cc0"}

When attempting to sort by contract_number on the subscriptions API:

{"displayMessage":"undefined method `to_sym' for nil:NilClass\nDid you mean?  to_m","errors":["undefined method `to_sym' for nil:NilClass\nDid you mean?  to_m"]}

Comment 5 Jonathon Turel 2018-08-08 18:10:09 UTC
Hey Corey,

We're tracking this issue upstream and when Christine was last looking into it she found we need support from (hosted) Candlepin in order to do the sorting for 'Add Subscriptions' properly: https://bugzilla.redhat.com/show_bug.cgi?id=1600588

The above RFE tracks that effort. We could work around that, but we would be sorting on the server side and not relying on the database - and so there could be performance impacts. Probably not much since we are using pretty small pages (default 20) from the API, but worth mentioning. I'm inclined to wait until we have official Candlepin support before making any changes since this is not critical. What do you think?

Comment 8 Bryan Kearney 2019-08-05 12:22:48 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 9 Bryan Kearney 2019-08-30 20:01:41 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24308 has been resolved.

Comment 10 Cole Higgins 2019-11-20 21:18:28 UTC
Bug verified in 6.7 snap 2. 

Both the subscriptions page and add subscriptions page are sorted by subscription name, not contract number.

Comment 11 Cole Higgins 2019-11-20 21:20:39 UTC
Created attachment 1638224 [details]
Verification screenshot

Comment 14 errata-xmlrpc 2020-04-14 13:23:24 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-2020:1454


Note You need to log in before you can comment on or make changes to this bug.