From cf1464d2901dcc8dcc2f82b0c34f4e47c0220aec 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 --- 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 bdfe317dda..28d1cf5eee 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -1059,7 +1059,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 =