[Bug 27933] New: Search results tables date of birth sort is broken
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Bug ID: 27933 Summary: Search results tables date of birth sort is broken Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Since bug 15400 the date of birth sorting is broken for the members results and guarantors results tables. See bug 27926 for further details. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (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). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- 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? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Summary|Search results tables date |Order patron search broken |of birth sort is broken |(dateofbirth, cardnumber, | |expirationdate) Depends on| |27715 Status|NEW |ASSIGNED --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think this is different from bug 27926 and is broken since bug 27715. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27715 [Bug 27715] Possibly SQL injection in virtualshelves -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 118359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118359&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com | |, | |fridolin.somers@biblibre.co | |m, victor@tuxayo.net --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This is a regression for stable versions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 118360 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118360&action=edit Bug 27933: [ALTERNATIVE PATCH] Fix patron search result ordering -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #8)
Created attachment 118360 [details] [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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118360|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118359|0 |1 is obsolete| | --- Comment #10 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 118413 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118413&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118413|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118457&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Trivial patch, works as expected.. Thanks Jonathan. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.04 released in| | --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.04 |21.05.00,20.11.04,20.05.10 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Was pushed to oldstable (20.05.x) for v20.05.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27933 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.04,20.05.10 |21.05.00,20.11.04,20.05.10, released in| |19.11.16 Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #16 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 19.11.x branch for 19.11.16 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org