Bug 15109 - Regression in patron search results ordering
Summary: Regression in patron search results ordering
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-02 16:46 UTC by Kyle M Hall
Modified: 2017-06-14 22:05 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 15109 - Regression in patron search results ordering (1.39 KB, patch)
2015-11-02 16:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15109 - Regression in patron search results ordering (1.57 KB, patch)
2015-11-02 20:36 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15109 - Regression in patron search results ordering (1.52 KB, patch)
2015-11-13 09:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15109: Make name the default sort order for all patron searches (4.29 KB, patch)
2015-11-13 09:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15109 - Regression in patron search results ordering (1.58 KB, patch)
2015-11-13 18:06 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 15109: Make name the default sort order for all patron searches (4.38 KB, patch)
2015-11-13 18:06 UTC, Nicole C. Engard
Details | Diff | Splinter Review
[PASSED QA] Bug 15109 - Regression in patron search results ordering (1.65 KB, patch)
2015-11-16 20:19 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 15109: Make name the default sort order for all patron searches (4.42 KB, patch)
2015-11-16 20:19 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2015-11-02 16:46:18 UTC
In Koha 3.16 or earlier, before the introduction of the ajax datatable for patron searching, the search results were ordered by name. In master, the results are currently ordered by cardnumber, which is not very useful.
Comment 1 Kyle M Hall 2015-11-02 16:48:31 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-11-02 20:36:45 UTC Comment hidden (obsolete)
Comment 3 Héctor Eduardo Castro Avalos 2015-11-02 23:48:22 UTC
Marc you forgot to change bug status.
Comment 4 Jonathan Druart 2015-11-13 09:15:49 UTC
There is already a DT sort parameter in the template:

  'aaSorting': [[1, 'asc']],

This one should be modified.
Moreover this script does not check for the existence of the checkboxes in the first column ([% IF CAN_user_tools_manage_patron_lists %]), which places the cardnumber in 0 or 1.
I will provide a counter patch.
Comment 5 Jonathan Druart 2015-11-13 09:22:44 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2015-11-13 09:22:49 UTC Comment hidden (obsolete)
Comment 7 Nicole C. Engard 2015-11-13 18:06:18 UTC Comment hidden (obsolete)
Comment 8 Nicole C. Engard 2015-11-13 18:06:24 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2015-11-16 20:19:21 UTC
Created attachment 44892 [details] [review]
[PASSED QA] Bug 15109 - Regression in patron search results ordering

In Koha 3.16 or earlier, before the introduction of the ajax datatable
for patron searching, the search results were ordered by name. In
master, the results are currently ordered by cardnumber, which is not
very useful.

Test Plan:
1) Do a "browse by last name" or a patron search
2) Note the results are sorted by card number
3) Apply this patch
4) Reload the page, start a new search
5) Note the results are sorted by name

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2015-11-16 20:19:32 UTC
Created attachment 44893 [details] [review]
[PASSED QA] Bug 15109: Make name the default sort order for all patron searches

Find another place where there is a patron search (add user to a basket,
add users to a fund or edit owner of a fund, set a guarantor to a child,
etc.).
Do a search a confirm that the results are now sorted by name instead of
cardnumber.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Tomás Cohen Arazi 2015-11-17 12:57:21 UTC
Patches pushed to master.

Thanks Jonathan!
Comment 12 Frédéric Demians 2015-11-29 21:08:10 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.
Comment 13 Liz Rea 2016-01-06 21:21:04 UTC
Pushed to 3.18.13, and released.