Since bug 15400 the date of birth sorting is broken for the members results and guarantors results tables. See bug 27926 for further details.
I had a go at fixing this as part of 27926 but came to the conclusion they should be treated separately as they work in rather different ways. Eventually, I think this table should be moved to the modern REST API datatables wrapper approach.
(In reply to Martin Renvoize from comment #1) > Eventually, I think this table should be moved to the modern REST API > datatables wrapper approach. That's not trivial at all, there are some specific stuffs done with the filters. I'd would recommend to start with the list first (I have started a bit already but haven't submitted yet).
Indeed.. I took a look at it as I submitted this bug... it does not look trivial in the slightest.. there's some really interesting code constructing that table. What do you mean by start with the list?
(In reply to Martin Renvoize from comment #3) > What do you mean by start with the list? % ls C4/Utils/DataTables/ Members.pm TablesSettings.pm VirtualShelves.pm => VirtualShelves.pm will be easier to move to the REST API than Members.pm
I think this is different from bug 27926 and is broken since bug 27715.
Created attachment 118359 [details] [review] Bug 27933: Fix patron search result ordering On bug 27715 we restrict the order by dt params for security reasons. However in some cases the param passed is "columnname" instead of "table.columnname". We should make sure the table is part of the sort fieldname. Test plan: Do a "normal" patron search (from the patrons home page) and another patron search (guarantor for instance). Sort by cardnumber, date of birth, expiration date, asc, desc and confirm it works as expected.
This is a regression for stable versions.
Created attachment 118360 [details] [review] Bug 27933: [ALTERNATIVE PATCH] Fix patron search result ordering
(In reply to Jonathan Druart from comment #8) > Created attachment 118360 [details] [review] [review] > Bug 27933: [ALTERNATIVE PATCH] Fix patron search result ordering I first wrote that version, but I think we should go with the other one. Tests must be done without this patch.
Created attachment 118413 [details] [review] Bug 27933: Fix patron search result ordering On bug 27715 we restrict the order by dt params for security reasons. However in some cases the param passed is "columnname" instead of "table.columnname". We should make sure the table is part of the sort fieldname. Test plan: Do a "normal" patron search (from the patrons home page) and another patron search (guarantor for instance). Sort by cardnumber, date of birth, expiration date, asc, desc and confirm it works as expected. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 118457 [details] [review] Bug 27933: Fix patron search result ordering On bug 27715 we restrict the order by dt params for security reasons. However in some cases the param passed is "columnname" instead of "table.columnname". We should make sure the table is part of the sort fieldname. Test plan: Do a "normal" patron search (from the patrons home page) and another patron search (guarantor for instance). Sort by cardnumber, date of birth, expiration date, asc, desc and confirm it works as expected. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Trivial patch, works as expected.. Thanks Jonathan. PQA
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.04
Was pushed to oldstable (20.05.x) for v20.05.10
Backported: Pushed to 19.11.x branch for 19.11.16