From cc389702f43588c6ad0ba034c25d61e28bd45568 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 11 Jul 2024 14:47:09 +0200 Subject: [PATCH] Bug 37309: Clear itemnumbers array before 'select all' Otherwise the same itemnumber can appear several times in the array. It could be moved to its own bug but this is only code cleaning it seems, there is no impact on the UX Signed-off-by: Pedro Amorim Signed-off-by: Katrin Fischer --- .../en/includes/html_helpers/tables/items/catalogue_detail.inc | 1 + 1 file changed, 1 insertion(+) 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 c70ee53c91..b7439164c8 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 @@ -130,6 +130,7 @@ e.preventDefault(); let tab_id = $(this).data("tab"); let tab = $("#" + tab_id + "_panel" ); + items_selection[tab_id] = []; tab.find("input[name='itemnumber'][type='checkbox']").each( (i, input) => { let itemnumber = parseInt($(input).val()); items_selection[tab_id].push(itemnumber); -- 2.39.5