From 1786a636ac28ec28c9b6de51da4e9552ca8a11e6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 27 Apr 2022 12:33:03 +0200 Subject: [PATCH] Bug 30626: DT REST API wrapper - Fix general search The general search query is not built correctly. Say you have a table with column filters, like the main patron search: General filter: henry Specific filter on the 'Name' column: h The generated query will be (= are actually LIKE): { Column1="henry" AND Column3="henry", ...} AND { Column2="h" } The first term does not contain the Column2 attribute. --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index b8c54e7e768..8be29d51282 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -597,7 +597,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { // Build query for the global search filter var or_query_parameters = settings.aoColumns .filter(function(col) { - return col.bSearchable && typeof col.data == 'string' && data.columns[col.idx].search.value == '' && filter != '' + return col.bSearchable }) .map(function(col) { var value = filter; -- 2.25.1