[Bug 27807] New: API DataTables Wrapper fails for ordered on multiple columns
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Bug ID: 27807 Summary: API DataTables Wrapper fails for ordered on multiple columns Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org One cannot currently sort on more than one datatables column at present. -- 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=27807 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27680 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27680 [Bug 27680] API DataTables Wrapper fails for ordering on multi-data-field columns -- 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=27807 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |tomascohen@gmail.com Keywords| |rel_21_05_candidate Severity|enhancement |normal -- 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=27807 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117502&action=edit Bug 27807: Add multi-column ordering support to datatables wrapper This patch add mutli-column ordering support to the datatables api wrapper. Test plan 1/ Add a series of cities to the system with various combinations of city and state such that you can distinguish sorting on city + state in city ascending + state ascending, city ascending + state descending etc. 2/ Attempt to sort on the two fields in the table (Click the 'City' heading to sort on city name, then Shift Click on 'State' to add 'state' ordering on top.. Shift click again on state to reverse the 'state' ordering but maintain the 'City' ordering. 3/ Confirm the various ordering comes out correctly. 4/ Signoff -- 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=27807 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=27807 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- 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=27807 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |agustinmoyano@theke.io -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I've applied "Bug 27680: [DO NOT PUSH] Example patch on cities" and I managed to generate queries like: _order_by=+me.name,+me.state,+me.name,+me.city_id or even: _order_by=+me.name,+me.state,+me.name,-me.city_id I know it is not an usual case, and certainly only hypothetical, but maybe we should unique orderArray? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good call, I didn't think about the uniqueness challenge -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117504&action=edit Bug 27807: (QA follow-up) Unique values only This patch filters the final _order_by clause such that we only have unique data fields present and we take the first occurence of a field. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=27807 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #2)
I've applied "Bug 27680: [DO NOT PUSH] Example patch on cities" and I managed to generate queries like:
_order_by=+me.name,+me.state,+me.name,+me.city_id or even: _order_by=+me.name,+me.state,+me.name,-me.city_id
I know it is not an usual case, and certainly only hypothetical, but maybe we should unique orderArray?
Good catch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117504|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117506 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117506&action=edit Bug 27807: (QA follow-up) Unique values only This patch filters the final _order_by clause such that we only have unique data fields present and we take the first occurence of a field. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Updated the patch.. I was pushing an array onto an array.. effectively `[ thing2, [ thing2, thing3] ]` I've updated the patch to perform an array merge to we get a single level array back and thus the unique filtering 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=27807 Jonathan Druart <jonathan.druart@bugs.koha-community.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=27807 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117502|0 |1 is obsolete| | Attachment #117506|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 117514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117514&action=edit Bug 27807: Add multi-column ordering support to datatables wrapper This patch add mutli-column ordering support to the datatables api wrapper. Test plan 1/ Add a series of cities to the system with various combinations of city and state such that you can distinguish sorting on city + state in city ascending + state ascending, city ascending + state descending etc. 2/ Attempt to sort on the two fields in the table (Click the 'City' heading to sort on city name, then Shift Click on 'State' to add 'state' ordering on top.. Shift click again on state to reverse the 'state' ordering but maintain the 'City' ordering. 3/ Confirm the various ordering comes out correctly. 4/ Signoff Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 117515 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117515&action=edit Bug 27807: (QA follow-up) Unique values only This patch filters the final _order_by clause such that we only have unique data fields present and we take the first occurence of a field. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Bug 27807 depends on bug 27680, which changed state. Bug 27680 Summary: API DataTables Wrapper fails for ordering on multi-data-field columns https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27680 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 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=27807 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117514|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=27807 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117515|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=27807 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118825 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118825&action=edit Bug 27807: Add multi-column ordering support to datatables wrapper This patch add mutli-column ordering support to the datatables api wrapper. Test plan 1/ Add a series of cities to the system with various combinations of city and state such that you can distinguish sorting on city + state in city ascending + state ascending, city ascending + state descending etc. 2/ Attempt to sort on the two fields in the table (Click the 'City' heading to sort on city name, then Shift Click on 'State' to add 'state' ordering on top.. Shift click again on state to reverse the 'state' ordering but maintain the 'City' ordering. 3/ Confirm the various ordering comes out correctly. 4/ Signoff Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 118826 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118826&action=edit Bug 27807: (QA follow-up) Unique values only This patch filters the final _order_by clause such that we only have unique data fields present and we take the first occurence of a field. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 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=27807 --- Comment #12 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=27807 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|21.05.00 |21.05.00,20.11.05 released in| | Status|Pushed to master |Pushed to stable --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27807 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |victor@tuxayo.net --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org