From c893f47bb3fe53454c2586ff8d22fe0372232693 Mon Sep 17 00:00:00 2001 From: Lawrence O'Regan-Lloyd Date: Fri, 18 Sep 2026 14:31:43 -0400 Subject: [PATCH] Bug 41445: Fix cleanup after single hold is suspended This fixes information displayed in the holds table for a patron after a single hold is suspended (in the "Check out" and "Details" sections for a patron record in the staff interface). After suspending a hold, no holds are selected in the holds table, the select_hold_all checkbox is unchecked, and the holds select badge counter is 0. Test plan: 0. Apply patch 1. Go to a patron with 2 or more active holds 2. Navigate to Details -> Holds tab 3. Click Suspend on a single hold and confirm 4. Verify the select-all checkbox remains unchecked 5. Verify the selected holds count is set to 0 6. Repeat steps 3-5 from the Check out -> Holds tab Assisted-by: Opus 5 (Anthropic) Sponsored-by: CLAMS Signed-off-by: Lucas Gass Signed-off-by: Pedro Amorim --- koha-tmpl/intranet-tmpl/prog/js/holds.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js index ed6e80cb19..a9edcbfcfc 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js @@ -675,7 +675,10 @@ $(document).ready(function () { $("#suspend-modal-until").flatpickr().clear(); // clean the input } $("#suspend-modal").modal("hide"); - $(".select_hold_all").click(); + $(".select_hold_all").prop("checked", false); + $(".holds_table .select_hold").prop("checked", false); + localStorage.selectedHolds = "[]"; + updateSelectedHoldsButtonCounters(); }); } catch (error) { if (error.status === 404) {