Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1599313 - Sort order different between Subscriptions and Add Subscriptions page
Summary: Sort order different between Subscriptions and Add Subscriptions page
Status: NEW
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Subscription Management
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: jcallaha
Depends On: 1600588
TreeView+ depends on / blocked
Reported: 2018-07-09 13:29 UTC by Corey Welton
Modified: 2019-04-09 03:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 24308 None None None 2018-07-19 14:28:59 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 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:

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?

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