Bug 16334

Summary: Cannot sort checkout search by name
Product: Koha Reporter: Nick Clemens <nick>
Component: CirculationAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P3 CC: gmcharlt, jonathan.druart, kyle.m.hall, veron
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15793
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 16336    
Bug Blocks:    
Attachments: Bug 16334 - Cannot sort checkout search by name
Bug 16334 - Cannot sort checkout search by name

Description Nick Clemens 2016-04-25 12:32:32 UTC
When Bug 15793 removed the radio buttons I think the datatables sort parameters were not updated, you can now not sort based on patrons name

To recreate:
1 - Have borrowers in your system
2 - Do a 'Check out' search to return several
3 - Note you cannot sort by name column
Comment 1 Owen Leonard 2016-04-25 13:15:38 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-04-25 13:55:39 UTC
Created attachment 50635 [details] [review]
Bug 16334 - Cannot sort checkout search by name

This patch corrects the DataTable configuration of the table of patrons
which displays when you search by patron name in circulation.

To test, apply the patch and perform a search by patron name in
circulation which will return multiple results.

In the table of search results the "Name" column should be sortable, and
sorted by default.

Also changed: "Cardnumber" table header changed to "Card number."

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Jonathan Druart 2016-04-25 15:49:28 UTC
(In reply to Owen Leonard from comment #1)
> In the table of search results the "Name" column should be sortable, and
> sorted by default.

In 3.20.x and 3.22.x the table is sorted by card number.
I am not sure we should change this behavior in this patch.
Comment 4 Nick Clemens 2016-04-25 16:02:57 UTC
(In reply to Jonathan Druart from comment #3)
> (In reply to Owen Leonard from comment #1)
> > In the table of search results the "Name" column should be sortable, and
> > sorted by default.
> 
> In 3.20.x and 3.22.x the table is sorted by card number.
> I am not sure we should change this behavior in this patch.

In 3.18, before the datatables here, the default was surname, I think the use of cardnumber was a change introduced when the search was changed and this reverts it to previous standard
Comment 5 Jonathan Druart 2016-04-25 16:10:53 UTC
(In reply to Nick Clemens from comment #4)
> (In reply to Jonathan Druart from comment #3)
> > (In reply to Owen Leonard from comment #1)
> > > In the table of search results the "Name" column should be sortable, and
> > > sorted by default.
> > 
> > In 3.20.x and 3.22.x the table is sorted by card number.
> > I am not sure we should change this behavior in this patch.
> 
> In 3.18, before the datatables here, the default was surname, I think the
> use of cardnumber was a change introduced when the search was changed and
> this reverts it to previous standard

I am ok to change the behavior but on its own bug report, to get more opinions and highlight the change.
Comment 6 Owen Leonard 2016-04-28 13:08:05 UTC
(In reply to Jonathan Druart from comment #3)

> In 3.20.x and 3.22.x the table is sorted by card number.
> I am not sure we should change this behavior in this patch.

Jonathan, in Bug 13926 (now in master) you changed the default sort to be on patron category. Was that intentional?
Comment 7 Jonathan Druart 2016-04-29 12:31:21 UTC
(In reply to Owen Leonard from comment #6)
> (In reply to Jonathan Druart from comment #3)
> 
> > In 3.20.x and 3.22.x the table is sorted by card number.
> > I am not sure we should change this behavior in this patch.
> 
> Jonathan, in Bug 13926 (now in master) you changed the default sort to be on
> patron category. Was that intentional?

I dont' think so
Comment 8 Owen Leonard 2016-05-06 14:05:52 UTC
Instead of resubmitting this patch, I'm incorporating a corrected fix into Bug 16336, "UX of holds patron search with long lists of results."