From c2d00a807c6c1c6dda6fab873d6423194b1323a1 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 26 Aug 2025 20:04:02 +0000 Subject: [PATCH] Bug 40709: Fix offset for status column To test: 1. Set the 'item-level_itypes' system preference to 'Bibliographic record' 2. Go to any record that contains items and look at the holdings table. 3. Click 'Show filters'. 4. Notice that the Status column doesn't appear to have a filter. 5. APPLY PATCH 6. Try again, the Status filter should appear correctly. Make sure all other filters appear correct. 7. Set 'item-level_itypes' back to 'specific item'. 8. Make sure the filter still appears correctly. Make sure all other filters appear correct. --- .../includes/html_helpers/tables/items/catalogue_detail.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index fdbfec2cef3..ec3201a03d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -328,11 +328,15 @@ let offset = 2; [% UNLESS Koha.Preference('LocalCoverImages') %]offset--;[% END %] + + let status_column = offset + 7; + [% UNLESS item_level_itypes %]status_column--;[% END %] + let filters_options = { [offset] : () => all_item_types, [offset+1] : () => all_libraries, [offset+2] : () => all_libraries, - [offset+7] : () => all_statuses, + [status_column] : () => all_statuses, }; var items_table = $("#" + tab_id + '_table').kohaTable({ -- 2.39.5