From 1a3084e79f7a8220009fd7d3a119819182dec3ad 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 --- 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 bdfe317ddaa..28d1cf5eee8 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 = -- 2.39.5