From d8ddb82a26b1a2e3b447e3821ef9d22ef6a6f0d5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 20 May 2025 14:27:15 +0200 Subject: [PATCH] Bug 37334: Fix conflict with bug 39473 Bug 39473 added ^ and $ to options of the dropdown lists from the column filters. They are removed and replaced with "exact" later in the code (using build_query). But in the case of "_status", we do no get this code as it's not a regular column (it does not have "data" attribute), but an additional filters. I don't think this fix is ideal, but we are too close to the release to rework datatables.js --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index 121d9cf3548..8a691f0616a 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -714,7 +714,9 @@ function _dt_default_ajax(params) { } else if (f == "-and") { if (v) and_query_parameters.push(v); } else if (v) { - additional_filters[k] = v; + additional_filters[k] = v + .replace(/^\^/, "") + .replace(/\$$/, ""); } } if (Object.keys(additional_filters).length) { -- 2.34.1