https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44152 --- Comment #2 from Andrii Nugged <nugged@gmail.com> --- Created attachment 211999 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211999&action=edit Bug 44152: Apply the selected call number order to the holds queue The holds queue orders call numbers as plain text, which differs from classification shelf order for call numbers such as JC43 and JC330. Apply HoldsCallnumberSortQueue in the queue result set before pagination. Classification mode uses the related item's cn_sort and falls back to the displayed call number for a missing or empty key. Alphabetical mode, missing preferences and unknown values preserve plain-text ordering. Preserve other requested ordering fields and resolve call number ties by item number after those fields. Keep the existing API fields, filtering and permissions unchanged. Exercise both directions, pagination, missing keys, configuration fallbacks and existing multi-column ordering with the actual API. Test plan: Prepare three available LCC items with call numbers JC43 .G6 1890, JC330 .F74 2000 and JC480 .R63 2006, place holds on them, and rebuild the holds queue using the normal queue-building job. Before applying the patch: 1. Open Circulation > Holds queue. 2. Select the holding library and submit the report. 3. Sort Call number ascending. Confirm JC330, JC43, JC480. Apply the series and run the database updater. After applying the patch: 1. Repeat the report and confirm the default ordering is unchanged. 2. Set HoldsCallnumberSortQueue to classification in system preferences. 3. Reopen the report and sort Call number ascending. Confirm JC43, JC330, JC480, and the reverse order when sorting descending. 4. Save alphabetical and confirm the original ordering returns. 5. Run prove -v t/db_dependent/api/v1/holds_queue.t. Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are watching all bug changes.