[Bug 27402] New: Add column filtering to the Datatables REST API wrapper
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Bug ID: 27402 Summary: Add column filtering to the Datatables REST API wrapper Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Templates Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 24561 Blocks: 20212 Bug 24561 added a wrapper to use easily all the DataTables functionalities when a REST API route was used within Koha. The filtering method used is working for the global search filter, but not if we have a filter on top of each column. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212 [Bug 20212] Slowness in receiving in acquisitions https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 [Bug 24561] Add a datatables API wrapper -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27353 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27353 [Bug 27353] Return the number of total records -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 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=27402 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 115051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115051&action=edit Bug 27402: Add DT column filtering to the cities admin page Bug 24561 added a wrapper to use easily all the DataTables functionalities when a REST API route was used within Koha. The filtering method used is working for the global search filter, but not if we have a filter on top of each column. This patchset is going to, first, add the filters on top of each column of the cities table, then the code will be moved to the DT REST API wrapper to make it reusable easily. Test plan: Generate some cities: use Koha::Cities; for ( 1 .. 42 ) { Koha::City->new({city_name => "name_$_", city_state => "state_$_", city_country => "country_$_", city_zipcode => "zipcode_$_" })->store; } Hit /admin/cities.pl Use the filters The general filter must do a OR query on each of the cities' attributes, when column filters must use AND -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 115052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115052&action=edit Bug 27402: Move to datatables.js To make it reusable we need to move the code to datatables.js So far only the cities table is using the column filters so there is no other view to test. Note that the existing implementation didn't work at all, and were base on what is done on the detail.pl page (using table_filters.js) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 115053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115053&action=edit add fixedHeader -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 115054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115054&action=edit Bug 27402: Column filters must AND, not OR Test plan: Use the column filters and the global filter Confirm that the rows are filtered as you expect QA Note: There is more code on top of this, see bug 20212. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115053|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=27402 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27465 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27465 [Bug 27465] Add column visibility to the admin/cities.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27467 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27467 [Bug 27467] Provide a static URL for tables -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Needs Signoff |Signed Off --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I can't say I'm impressed by your skills, Jonathan. But this is super cool. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115051|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=27402 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115052|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=27402 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115054|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=27402 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 115813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115813&action=edit Bug 27402: Add DT column filtering to the cities admin page Bug 24561 added a wrapper to use easily all the DataTables functionalities when a REST API route was used within Koha. The filtering method used is working for the global search filter, but not if we have a filter on top of each column. This patchset is going to, first, add the filters on top of each column of the cities table, then the code will be moved to the DT REST API wrapper to make it reusable easily. Test plan: Generate some cities: use Koha::Cities; for ( 1 .. 42 ) { Koha::City->new({city_name => "name_$_", city_state => "state_$_", city_country => "country_$_", city_zipcode => "zipcode_$_" })->store; } Hit /admin/cities.pl Use the filters The general filter must do a OR query on each of the cities' attributes, when column filters must use AND 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=27402 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 115814 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115814&action=edit Bug 27402: Move to datatables.js To make it reusable we need to move the code to datatables.js So far only the cities table is using the column filters so there is no other view to test. Note that the existing implementation didn't work at all, and were base on what is done on the detail.pl page (using table_filters.js) 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=27402 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 115815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115815&action=edit Bug 27402: Column filters must AND, not OR Test plan: Use the column filters and the global filter Confirm that the rows are filtered as you expect QA Note: There is more code on top of this, see bug 20212. 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=27402 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #5)
I can't say I'm impressed by your skills, Jonathan. But this is super cool.
This tried to mean I'm already used to seeing you do smart things :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115813|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 115935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115935&action=edit Bug 27402: Add DT column filtering to the cities admin page Bug 24561 added a wrapper to use easily all the DataTables functionalities when a REST API route was used within Koha. The filtering method used is working for the global search filter, but not if we have a filter on top of each column. This patchset is going to, first, add the filters on top of each column of the cities table, then the code will be moved to the DT REST API wrapper to make it reusable easily. Test plan: Generate some cities: use Koha::Cities; for ( 1 .. 42 ) { Koha::City->new({city_name => "name_$_", city_state => "state_$_", city_country => "country_$_", city_zipcode => "zipcode_$_" })->store; } Hit /admin/cities.pl Use the filters The general filter must do a OR query on each of the cities' attributes, when column filters must use AND Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=27402 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115814|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 115936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115936&action=edit Bug 27402: Move to datatables.js To make it reusable we need to move the code to datatables.js So far only the cities table is using the column filters so there is no other view to test. Note that the existing implementation didn't work at all, and were base on what is done on the detail.pl page (using table_filters.js) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=27402 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115815|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 115937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115937&action=edit Bug 27402: Column filters must AND, not OR Test plan: Use the column filters and the global filter Confirm that the rows are filtered as you expect QA Note: There is more code on top of this, see bug 20212. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=27402 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This is really nice, and clearly well thought through. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 115942 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115942&action=edit Bug 27402: Reverse search filter texts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115942|0 |1 is obsolete| | --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 115966 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115966&action=edit Bug 27402: Reverse search filter texts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 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=27402 --- Comment #16 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=27402 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This development adds release notes| |native DataTables column | |filtering to the REST API | |wrapper. This allows easily | |adding column filters to | |DataTables using the REST | |API. | |A sample | |implementation is added to | |the cities admin page, for | |reference. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 20.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org