[Bug 41445] New: Wrong info about holds selection after hold suspending
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Bug ID: 41445 Summary: Wrong info about holds selection after hold suspending Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: roman.dolny@jezuici.pl QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com After suspending a hold at patron's holds tab, incorrect information about holds selection is displayed. To reproduce: 1. Have unsuspended hold(s). 2. Go to patron's account, "Details" or "Check out", and "Holds" tab. 3. Click "Suspend" button in "Suspend?" column and confirm modal. 4. Notice: 4.1 checked header checkbox (first column) - not correct, checkbox(es) below are not checked 4.2 number of holds selected in line below the holds table - not correct, checkbox(es) above are not checked, buttons "Cancel selected" and "Suspend selected" are active -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |loreganlloyd@clamsnet.org Assignee|koha-bugs@lists.koha-commun |loreganlloyd@clamsnet.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #1 from Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> --- Created attachment 192544 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192544&action=edit Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state Replace .click() on select_hold_all with explicit .prop("checked", false) to prevent suspend, resume, cancel, and group hold actions from incorrectly checking the select-all checkbox and showing a wrong selected holds count. Test plan: 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 does not appear 6. Repeat steps 3-5 from the Check out -> Holds tab 7. Repeat using Resume, Cancel, and Group hold actions Sponsored-by: CLAMS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |CLAMS list of Sponsors| | Status|Needs Signoff |Signed Off Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192544|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 192548 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192548&action=edit Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state Replace .click() on select_hold_all with explicit .prop("checked", false) to prevent suspend, resume, cancel, and group hold actions from incorrectly checking the select-all checkbox and showing a wrong selected holds count. Test plan: 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 does not appear 6. Repeat steps 3-5 from the Check out -> Holds tab 7. Repeat using Resume, Cancel, and Group hold actions Sponsored-by: CLAMS Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes the holds table release notes| |for a patron after a hold | |is suspended (in the "Check | |out" and "Details" section | |for a patron record in the | |staff interface). | | | |After suspending a hold, no | |holds are selected in the | |holds table. | | | |Previously, after | |suspending a hold: | |- The tick box in table | |header (the first column) | |was selected | |- There was no tick in any | |of the tick boxes for | |individual | | holds | |- The count at the bottom | |for "holds selected" was | |the total | | number of holds | |- The action buttons were | |active ("Cancel selected" | |and "Suspend selected") --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. It took me a while to understand what the issue was before the patch - "wrong info" didn't help. 8-) 2. Place some holds for a patron. 3. Go to the patron's account, and the holds tab under either the "Check out" or "Details" section. 4. Suspend a hold and then the pop-up window that lets you select a "suspend until" date appears. 5. Immediately after you click "Suspend" from the pop-up window, note that: - The tick box in the holds table header (the first column) is selected - There is no tick in any of the tick boxes for individual holds - The count at the bottom shows the total number of holds - The action buttons are active ("Cancel selected" and "Suspend selected") 6. After the patch, things for step 5 are shown as expected - that is, no holds are selected: - The tick box in the holds table header in the first column is not selected - No individual holds are selected - The count at the bottom for "holds selected" is 0 - None of the action buttons are active ("Cancel selected" and "Suspend selected") -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au Status|Signed Off |Failed QA --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Mmm the behaviour between the "Cancel selected" and "Suspend selected" buttons is inconsistent. If you cancel the "Cancel" modal, it clears the selections. If you cancel the "Suspend" modal, it keeps the selections. After I cancel 1 hold, the "Holds" tab still says 3, it says "1 holds selected" and the "Cancel selected" and "Suspend selected" buttons are still active. I'm not sure how to do the "Group hold actions" in the test plan. Needs more information. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192548|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #5 from Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> --- Created attachment 198036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198036&action=edit Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state Replace .click() on select_hold_all with explicit .prop("checked", false) to prevent suspend, resume, cancel, and group hold actions from incorrectly checking the select-all checkbox and showing a wrong selected holds count. Test plan: 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 does not appear 6. Repeat steps 3-5 from the Check out -> Holds tab 7. Repeat using Resume, Cancel, and Group hold actions Sponsored-by: CLAMS Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198036|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #6 from Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> --- Created attachment 198037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198037&action=edit Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state Replace .click() on select_hold_all with explicit .prop("checked", false) to prevent suspend, resume, cancel, and group hold actions from incorrectly checking the select-all checkbox and showing a wrong selected holds count. Test plan: 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 does not appear 6. Repeat steps 3-5 from the Check out -> Holds tab 7. Repeat using Resume, Cancel, and Group hold actions Sponsored-by: CLAMS Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198037|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #8 from David Nind <david@davidnind.com> --- The patch no longer applies 8-(... Also, I'm not sure that "...(follow up) is required in the commit title (see the commit message guidelines for correct use of "follow-up" https://wiki.koha-community.org/wiki/Commit_messages#Follow-ups) git bz apply 41445 📋 Bug 41445 - Wrong info about holds selection after hold suspending • 198038 - Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (follow up) Apply? [(y)es, (n)o, (i)nteractive] y Preparing 1 patch(es): ✓ Prepared 1 patch(es) Applying 1 patch(es): Patch application failed for attachment 198038 - Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (follow up) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #9 from David Nind <david@davidnind.com> --- git bz apply 41445 📋 Bug 41445 - Wrong info about holds selection after hold suspending • 198038 - Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (follow up) The patch no longer applies 8-(... (pasting the full message - sha1/fake ancestor erros). Also, I'm not sure that "...(follow up) is required in the commit title (see the commit message guidelines for correct use of "follow-up" https://wiki.koha-community.org/wiki/Commit_messages#Follow-ups) Apply? [(y)es, (n)o, (i)nteractive] y Preparing 1 patch(es): ✓ Prepared 1 patch(es) Applying 1 patch(es): Patch application failed for attachment 198038 - Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (follow up) Patches left in /tmp/41DhyqJoWv for manual application if needed To resolve: 1. Fix conflicts (use 'git mergetool' or edit files manually) 2. Stage resolved files with 'git add' 3. Continue with 'git bz apply --continue' or 'git am --continue' 4. Or skip this patch with 'git bz apply --skip' 5. Or abort with 'git bz apply --abort' Error: Apply failed: Git command (git am -3 /tmp/41DhyqJoWv/0001-198038.patch) failed: error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/js/holds.js). error: could not build fake ancestor hint: Use 'git am --show-current-patch=diff' to see the failed patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #10 from David Nind <david@davidnind.com> --- Third time lucky! The patch no longer applies 8-(... Getting a sha1/fake ancestor error. Also, I'm not sure that "...(follow up) is required in the commit title (see the commit message guidelines for correct use of "follow-up" https://wiki.koha-community.org/wiki/Commit_messages#Follow-ups) Apply patch output with sha1/fake ancestor error at the end =========================================================== git bz apply 41445 📋 Bug 41445 - Wrong info about holds selection after hold suspending • 198038 - Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (follow up) Apply? [(y)es, (n)o, (i)nteractive] y Preparing 1 patch(es): ✓ Prepared 1 patch(es) Applying 1 patch(es): Patch application failed for attachment 198038 - Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (follow up) Patches left in /tmp/41DhyqJoWv for manual application if needed To resolve: 1. Fix conflicts (use 'git mergetool' or edit files manually) 2. Stage resolved files with 'git add' 3. Continue with 'git bz apply --continue' or 'git am --continue' 4. Or skip this patch with 'git bz apply --skip' 5. Or abort with 'git bz apply --abort' Error: Apply failed: Git command (git am -3 /tmp/41DhyqJoWv/0001-198038.patch) failed: error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/js/holds.js). error: could not build fake ancestor hint: Use 'git am --show-current-patch=diff' to see the failed patch -- You are receiving this mail because: You are watching all bug changes.
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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #12 from David Nind <david@davidnind.com> --- Hi Lawrence. Thanks for the updated patch! A few things: 1. Everything works as per the test plan. 2. However, the original issue isn't fixed. If you: - click the "Suspend" button for a hold (without selecting the tick box for the hold) - complete the suspension (click Suspend in the pop-up window) - the tick box in the table header is selected - and the "X holds selected" after the table has the total number of holds Note: After applying the patch, and a restart_all, I also cleared the browser cache (and tested both in the Check out and Details sections for the patron) 3. Bug title in the commit message. Needs to be in the format: Bug XXXXX: Bug title (Note: you don't need to put rebased or anything else at the end of the title) 4. The qa script complains about tidiness: qa Tag v25.05.00-1 found in /kohadevbox/koha — checking out branch main in /kohadevbox/qa-test-tools Already on 'main' Your branch is up to date with 'origin/main'. testing 1 commit(s) (applied to f019e49 'f9 Bug 42106: Spelling: Failed to loa') Processing files [RUNNING] koha-tmpl/intranet-tmpl/prog/js/holds.js [FAIL] koha-tmpl/intranet-tmpl/prog/js/holds.js Result: [FAIL] koha-tmpl/intranet-tmpl/prog/js/holds.js FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl koha-tmpl/intranet-tmpl/prog/js/holds.js` Processing additional checks PASS! David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #13 from Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> --- Created attachment 198112 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198112&action=edit Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state Replace `.click()` toggle calls on `.select_hold_all` with explicit prop manipulation throughout holds.js. The `.click()` approach toggled the checkbox state rather than reliably clearing it, causing the select-all checkbox and holds-selected counter to be incorrectly set after hold actions. - Replace `.click()` toggle in suspend-modal-submit done handler with direct prop manipulation; this was the root cause of the original report — suspending a single hold via the button would check select-all and show total holds selected - 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 - 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. Without selecting any checkboxes, click the Suspend button in the Suspend? column and confirm — verify select-all is NOT checked and holds selected count is zero 4. Select one or more unsuspended holds and verify count on holds selected is correct 5. Select Suspend button in Suspend? column, then Suspend on the modal 6. Notice selection boxes are unchecked and holds selected count is zero 7. Repeat steps 4-6 using the trash can icon in the 'Delete?' column and clicking "Confirm cancellation" in the modal 8. Repeat steps 4-6 using the 'Cancel selected' button underneath the holds table clicking "Confirm cancellation" in the modal 9. Select a hold. Click on a trash can icon in the 'Delete?' column. Use the X to dismiss modal or click cancel. Confirm selections remain and count of holds selected is correct 10. Select an unsuspended hold. Click the 'Suspend Selected' button under the holds table. Use the X to dismiss modal or click cancel. Confirm selections remain and count of holds selected is correct 11. Select a hold. Click the 'Cancel selected' button under the holds table. Use the X to dismiss modal or click cancel. Confirm selections remain 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #14 from Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> --- Created attachment 198113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198113&action=edit Bug 41445: Wrong info about holds selection after hold suspending Replace `.click()` toggle calls on `.select_hold_all` with explicit prop manipulation throughout holds.js. The `.click()` approach toggled the checkbox state rather than reliably clearing it, causing the select-all checkbox and holds-selected counter to be incorrectly set after hold actions. - Replace `.click()` toggle in suspend-modal-submit done handler with direct prop manipulation; this was the root cause of the original report — suspending a single hold via the button would check select-all and show total holds selected - 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 - 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. Without selecting any checkboxes, click the Suspend button in the Suspend? column and confirm — verify select-all is NOT checked and holds selected count is zero 4. Select one or more unsuspended holds and verify count on holds selected is correct 5. Select Suspend button in Suspend? column, then Suspend on the modal 6. Notice selection boxes are unchecked and holds selected count is zero 7. Repeat steps 4-6 using the trash can icon in the 'Delete?' column and clicking "Confirm cancellation" in the modal 8. Repeat steps 4-6 using the 'Cancel selected' button underneath the holds table clicking "Confirm cancellation" in the modal 9. Select a hold. Click on a trash can icon in the 'Delete?' column. Use the X to dismiss modal or click cancel. Confirm selections remain and count of holds selected is correct 10. Select an unsuspended hold. Click the 'Suspend Selected' button under the holds table. Use the X to dismiss modal or click cancel. Confirm selections remain and count of holds selected is correct 11. Select a hold. Click the 'Cancel selected' button under the holds table. Use the X to dismiss modal or click cancel. Confirm selections remain 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198095|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198112|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198113|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #15 from David Nind <david@davidnind.com> --- Created attachment 198115 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198115&action=edit Bug 41445: Wrong info about holds selection after hold suspending Replace `.click()` toggle calls on `.select_hold_all` with explicit prop manipulation throughout holds.js. The `.click()` approach toggled the checkbox state rather than reliably clearing it, causing the select-all checkbox and holds-selected counter to be incorrectly set after hold actions. - Replace `.click()` toggle in suspend-modal-submit done handler with direct prop manipulation; this was the root cause of the original report — suspending a single hold via the button would check select-all and show total holds selected - 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 - 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. Without selecting any checkboxes, click the Suspend button in the Suspend? column and confirm — verify select-all is NOT checked and holds selected count is zero 4. Select one or more unsuspended holds and verify count on holds selected is correct 5. Select Suspend button in Suspend? column, then Suspend on the modal 6. Notice selection boxes are unchecked and holds selected count is zero 7. Repeat steps 4-6 using the trash can icon in the 'Delete?' column and clicking "Confirm cancellation" in the modal 8. Repeat steps 4-6 using the 'Cancel selected' button underneath the holds table clicking "Confirm cancellation" in the modal 9. Select a hold. Click on a trash can icon in the 'Delete?' column. Use the X to dismiss modal or click cancel. Confirm selections remain and count of holds selected is correct 10. Select an unsuspended hold. Click the 'Suspend Selected' button under the holds table. Use the X to dismiss modal or click cancel. Confirm selections remain and count of holds selected is correct 11. Select a hold. Click the 'Cancel selected' button under the holds table. Use the X to dismiss modal or click cancel. Confirm selections remain and count of holds selected is correct Sponsored-by: CLAMS Assisted by: Sonnet 4.6 (Anthropic) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #16 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- If I select 3 holds to cancel a click "Canceled selected" I get a pop-up with: This action will cancel 3 hold(s). When bulk suspending there should be a similar message, there isn't. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 --- Comment #17 from Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> --- Created attachment 201412 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201412&action=edit Bug 41445: Wrong info about holds selection after hold suspending (follow up) Adds bulk suspend warning message and fixes warning message cleanup. To test: 1. Apply previous patch 2. Navigate to a patron with multiple holds 3. Select multiple holds and click cancel selected. Notice alert: This action will cancel 2 hold(s). hit cancel. 4. Click Cancel selected. Notice alert isn't displayed in modal (This action will cancel 2 hold(s).) 5. Click suspend selected. Notice there is no alert. 6. Apply new patch. 7. Repeat step 3-4. Confirm alert is displayed in cancel selected modal both times. 8. Repeat step 5. Confirm alert is displayed This action will suspend 2 hold(s). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41445 Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org