Bug 14222 - Sort holds in OPAC by priority
Summary: Sort holds in OPAC by priority
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
: 21863 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-19 15:16 UTC by Nicole C. Engard
Modified: 2019-10-14 19:57 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14222: Sort holds in OPAC by priority (3.16 KB, patch)
2018-06-21 14:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 14222: Sort holds in OPAC by priority (3.26 KB, patch)
2018-06-22 21:23 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 14222: Sort holds in OPAC by priority (3.33 KB, patch)
2018-06-25 19:03 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 2018-06-29 21:03:02 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize 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 2018-11-21 13:08:22 UTC
*** Bug 21863 has been marked as a duplicate of this bug. ***