Bug 41445 - Wrong info about holds selection after hold suspending
Summary: Wrong info about holds selection after hold suspending
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Lawrence O'Regan-Lloyd
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-12 20:59 UTC by Roman Dolny
Modified: 2026-02-06 03:53 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: Sponsored
Comma delimited list of Sponsors: CLAMS
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the holds table 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")
Version(s) released in:
Circulation function:


Attachments
Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (3.26 KB, patch)
2026-02-05 19:45 UTC, Lawrence O'Regan-Lloyd
Details | Diff | Splinter Review
Bug 41445: Fix hold actions incorrectly toggling select-all checkbox state (3.29 KB, patch)
2026-02-05 20:30 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Dolny 2025-12-12 20:59:48 UTC
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
Comment 1 Lawrence O'Regan-Lloyd 2026-02-05 19:45:31 UTC
Created attachment 192544 [details] [review]
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
Comment 2 David Nind 2026-02-05 20:30:01 UTC
Created attachment 192548 [details] [review]
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>
Comment 3 David Nind 2026-02-06 03:53:57 UTC
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")