https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #7 from Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> --- Created attachment 198038 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198038&action=edit Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (follow up) Adjust behavior so that cancel or closing "Cancel" modal does not clear selections. Ensures after canceling a hold 'Holds' tab badge shows the current count. While this patch standardizes the .click() toggle pattern associated with #group-modal for consistency, I am going to remove group holds info from the testing because group modal adjustments seem out of scope for this update as additional adjustments would be required elsewhere. - Remove premature deletion of localStorage.selectedHolds from the 'Cancel selected' click handler; selections were being lost before the user confirmed the action - Remove the select_hold_all guard in the cancelModalConfirmBtn done handler so selections are always cleared after a confirmed cancel, not only when select-all was used - Remove the holdsTable reload from the cancelModal hidden.bs.modal handler; it was rebuilding the DOM on dismiss (wiping visual checkbox state) and was redundant on confirm since .success() already reloads - Apply the same fixes in the load_patron_holds_table context, also replacing the .click() toggle pattern with direct prop manipulation - Update the holds tab badge count on draw.dt so it reflects the current row count after any table reload Revised test plan: 1. Go to a patron with 2 or more active holds 2. Navigate to Details -> Holds tab 3. Select one or more unsuspended holds and verify count on holds selected is correct 4. Select Suspect, then Suspend on the modal 5. Notice selection boxes are unchecked and holds selected count is zero 6. Repeat steps 3-5 pressing the trash can under the Delete column instead 7. Repeat steps 3-5 using the 'Cancel selected' button underneath the holds table 8. Repeat steps 3-5 using the 'Suspend Selected' button under the holds table 9. Select an unsuspended hold. Click the 'Cancel selected' button under the holds table. Use the X to dismiss modal or click cancel. Confirm selections maintain selected and count of holds selected is correct 10. Repeat step 9 using 'Suspend selected' button Sponsored-by: CLAMS Assisted by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.