[Mantis ref. MT2062]
In Home › Patrons › Search Results, the results are always sorted by name.
There is a listbox "order by" allowing 2 choices:
When searching with this choice, the results are indeed sorted by surname.
When searching with this choice, the results seem to be sorted by first name.
What is exactly the problem then?
A) Should we be able to sort by first name/surname and then Cardnumber must be renamed to First name?
B) Should we be able to sort by surname/cardnumber and then the sorting must be repaired for the cardnumber option?
C) Should we be able to sort by first name/surname/cardnumber and then we add a new choice and repair cardnumber?
Didn't think I would find a client-side sort here!! I don't see the point, I'll thus delete the following part:
(it seems to work ok without it)
Created attachment 6752 [details] [review]
Removed the tablesort JS.
We lose something with this patch, the widget ['zebra'] is needed to give a different color to uneven lines.
I'll make another patch deleting only the "sortList: [[1,0]]," line.
Why not move the table row coloring to the markup instead?
[% IF ( loop.even ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
Actually, there is already something like that in the template, the highlights look ok.
No problem then, the patch is fine.
Created attachment 6809 [details] [review]
[SIGNED-OFF] Bug 7349: corrects sort order for Patron search
Sorting by cardnumber now works (removed a client-side
sort, the server-side sort is enough).
Signed-off-by: Koustubha Kale <email@example.com>
1) Verified that before applying this patch, when searching patrons with cardnumber as order by preference, patrons are sorted ny name.
2) Verified that after applying this patch, when searching with cardnumber as order by preference, patrons are correctly sorted by cardnumber.
Template only change, removes JS block only. Marking as Passed QA
QA comment: this patch removes code only, that can't be wrong ;-)
patch pushed, please test
*** Bug 7066 has been marked as a duplicate of this bug. ***