[Koha-bugs] [Bug 27402] Add column filtering to the Datatables REST API wrapper

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 28 15:34:03 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #115813|0                           |1
        is obsolete|                            |

--- Comment #10 from Martin Renvoize <martin.renvoize at 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 at theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list