From 023af0ce26caa7ffb2cdb150e70da9012c55e71e Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 25 Jul 2025 14:36:18 +0100 Subject: [PATCH] Bug 40516: Restore falsy boolean filter values Test plan: 1) Navigate to ERM agreements and create an agreement 2) In the agreements table, click on the filter for Is Perpetual 3) Only the option for 'Yes' will be shown 4) Apply patch 5) yarn js:build 6) Hard refresh the browser and repeat step 2 7) Filter options for Yes and No should be available 8) Check the filtering works appropriately Signed-off-by: Pedro Amorim Signed-off-by: Laura_Escamilla Signed-off-by: Lucas Gass (cherry picked from commit 5594945339415a5e5ca895875e215d6fa5c2a061) Signed-off-by: Paul Derscheid (cherry picked from commit cf1464d2901dcc8dcc2f82b0c34f4e47c0220aec) Signed-off-by: Fridolin Somers --- 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 dace4a257d..0660ddaf31 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -908,7 +908,7 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) { } $(filters_options[i]) .filter(function () { - return this._id && this._str; + return this._id !== "" && this._str !== ""; }) .each(function () { let optionValue =