Bug 14222

Summary: Sort holds in OPAC by priority
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, jzairo, martin.renvoize, nick, nkeener
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 14222: Sort holds in OPAC by priority
Bug 14222: Sort holds in OPAC by priority
Bug 14222: Sort holds in OPAC by priority

Description Nicole C. Engard 2015-05-19 15:16:12 UTC
I got this feedback from a patron today: It would be nice if the patron's holds list in the OPAC was sorted by priority by default so that the waiting items show at the top.
Comment 1 NancyK. 2018-05-07 21:18:39 UTC
This has been fixed in the staff side, but in the OPAC, Koha sorts by looking at the leftmost digit in each number so 14 will come before 4.

We have unlimited holds, so this is a problem that patrons are complaining about.

NancyK
Comment 2 Owen Leonard 2018-06-21 14:39:20 UTC
Created attachment 76237 [details] [review]
Bug 14222: Sort holds in OPAC by priority

This patch modifies the markup of the users's holds table in the OPAC so
that if hold priority is displayed, the table will be sorted by that
number.

To test, apply the patch and set the OPACShowHoldQueueDetails system
preference to "Show priority level" or "Show holds and their priority
level."

 - Log in to the OPAC as a user who has multiple holds with various
   priorities. Include priorities which could be sorted incorrectly
   using a text sort, e.g. 1, 10.
 - View the holds tab on the "your summary" page. Confirm that the
   priority column is sorted by default with the lowest priority holds
   first.
 - Set the  OPACShowHoldQueueDetails preference to "Show holds" and
   confirm that the holds table still displays correctly, sorted by
   "Placed on" ascending.
Comment 3 Maryse Simard 2018-06-22 21:23:40 UTC
Created attachment 76311 [details] [review]
Bug 14222: Sort holds in OPAC by priority

This patch modifies the markup of the users's holds table in the OPAC so
that if hold priority is displayed, the table will be sorted by that
number.

To test, apply the patch and set the OPACShowHoldQueueDetails system
preference to "Show priority level" or "Show holds and their priority
level."

 - Log in to the OPAC as a user who has multiple holds with various
   priorities. Include priorities which could be sorted incorrectly
   using a text sort, e.g. 1, 10.
 - View the holds tab on the "your summary" page. Confirm that the
   priority column is sorted by default with the lowest priority holds
   first.
 - Set the  OPACShowHoldQueueDetails preference to "Show holds" and
   confirm that the holds table still displays correctly, sorted by
   "Placed on" ascending.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.
Comment 4 Jonathan Druart 2018-06-25 19:03:42 UTC
Created attachment 76408 [details] [review]
Bug 14222: Sort holds in OPAC by priority

This patch modifies the markup of the users's holds table in the OPAC so
that if hold priority is displayed, the table will be sorted by that
number.

To test, apply the patch and set the OPACShowHoldQueueDetails system
preference to "Show priority level" or "Show holds and their priority
level."

 - Log in to the OPAC as a user who has multiple holds with various
   priorities. Include priorities which could be sorted incorrectly
   using a text sort, e.g. 1, 10.
 - View the holds tab on the "your summary" page. Confirm that the
   priority column is sorted by default with the lowest priority holds
   first.
 - Set the  OPACShowHoldQueueDetails preference to "Show holds" and
   confirm that the holds table still displays correctly, sorted by
   "Placed on" ascending.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Nick Clemens (kidclamp) 2018-06-29 21:03:02 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize (ashimema) 2018-07-02 08:31:50 UTC
Minor enhancement, but the change could be unexpected for unsuspecting users. Choosing not to backport.
Comment 7 Nick Clemens (kidclamp) 2018-11-21 13:08:22 UTC
*** Bug 21863 has been marked as a duplicate of this bug. ***