From 54c5c2a9c4e486bda435128b27eb1f9ff0222bbb Mon Sep 17 00:00:00 2001 From: Jan Kissig Date: Tue, 25 Aug 2026 11:42:40 +0000 Subject: [PATCH] Bug 38196: (follow-up) Fix issue with concern filters containing underscores This fixes the issue that a filter for a ticket status is not applied when the underlying authorised value for that ticket status contains an underscore. Also the fa icons are changed to be more intuitive. Signed-off-by: Brendan Lawlor Signed-off-by: Pedro Amorim --- .../prog/en/modules/cataloguing/concerns.tt | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt index 1f3991dff3..3db7031439 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt @@ -36,11 +36,11 @@
- Include resolved + Include resolved [% FOR st IN status %] - Hide [% st.lib | html %] - + Hide [% st.lib | html %] + [% END %]
@@ -89,9 +89,10 @@ source: "catalog", status: function () { let avfilters = ["-and"]; - document.querySelectorAll(".status-filter-checkbox:checked").forEach(el => { - let av = el.id.split("_")[1]; - avfilters.push({ "!=": av }); + statuses.forEach(s => { + if ($(`#hide_${s.authorised_value}`).is(":checked")) { + avfilters.push({ "!=": s.authorised_value }); + } }); if (avfilters.length === 1) { @@ -263,9 +264,9 @@ var txtInactivefilter = _("Hide resolved"); function adjust_filter_label() { if ($("#hide_resolved_concerns").is(":checked")) { - $("#resolved_filter").html(' ' + txtActivefilter); + $("#resolved_filter").html(' ' + txtActivefilter); } else { - $("#resolved_filter").html(' ' + txtInactivefilter); + $("#resolved_filter").html(' ' + txtInactivefilter); } } $("#resolved_filter").on("click", function () { @@ -282,9 +283,9 @@ $(`#${av}_filter`).on("click", function () { if ($(`#hide_${av}`).is(":checked")) { - $(this).html(' ' + _("Hide ") + st.lib); + $(this).html(' ' + _("Hide ") + st.lib); } else { - $(this).html(' ' + _("Include ") + st.lib); + $(this).html(' ' + _("Include ") + st.lib); } $(`#hide_${av}`).prop("checked", !$(`#hide_${av}`).is(":checked")); tickets.DataTable().draw();