https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198038|0 |1 is obsolete| | --- Comment #11 from Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> --- Created attachment 198095 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198095&action=edit Fix hold actions incorrectly toggling select-all checkbox state (rebased) 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 Suspend button in Suspend? column, then Suspend on the modal 5. Notice selection boxes are unchecked and holds selected count is zero 6. Repeat steps 3-5 using the trash can icon in the 'Delete?' column and clicking "Confirm cancellation' in the modal 7. Repeat steps 3-5 using the 'Cancel selected' button underneath the holds table clicking "Confirm cancellation' in the modal 8. Select a hold. Click on a trash can icon the 'Delete?' column. Use the X to dismiss modal or click cancel. Confirm selections maintain selected and count of holds selected is correct 9. Select an unsuspended hold. Click the 'Suspend 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. Select a 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 Sponsored-by: CLAMS Assisted by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.