Summary: | Sorting patron search result by cardnumber doesn't work | ||
---|---|---|---|
Product: | Koha | Reporter: | Adrien SAURAT <adrien.saurat> |
Component: | Patrons | Assignee: | Adrien SAURAT <adrien.saurat> |
Status: | CLOSED FIXED | QA Contact: | Ian Walls <koha.sekjal> |
Severity: | normal | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | gmcharlt, kmkale, nengard, paul.poulain |
Version: | 3.6 | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15109 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
proposed patch
[SIGNED-OFF] Bug 7349: corrects sort order for Patron search |
Description
Adrien SAURAT
2011-12-13 10:19:47 UTC
It looks to me like the server-side sort of the whole result set is working fine but the client-side javascript sorts by name by default. I don't think having a client-side sort makes much sense for sorted paged results, so perhaps the answer (pending a conversion to datatables) is to remove the table sorter. Indeed! Didn't think I would find a client-side sort here!! I don't see the point, I'll thus delete the following part: <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> <script type="text/javascript">//<![CDATA[ $(document).ready(function() { $("#memberresultst").tablesorter({ sortList: [[1,0]], widgets: ['zebra'] }); }); //]]> </script> (it seems to work ok without it) Created attachment 6752 [details] [review] proposed patch 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 <kmkale@anantcorp.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. *** |