Bug 40395 - Allow selecting multiple holds in patron detail page to perform actions on
Summary: Allow selecting multiple holds in patron detail page to perform actions on
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: David Cook
URL: https://github.com/openfifth/koha/com...
Keywords:
Depends on:
Blocks: 40517 40551
  Show dependency treegraph
 
Reported: 2025-07-15 14:59 UTC by Pedro Amorim
Modified: 2025-08-26 22:07 UTC (History)
11 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds a 'checkbox' column to the patron holds table located on the 'Holds' tab on the patron 'Details' page and the patron 'Check out' page. It also reimplements suspending and cancelling multiple holds on these pages from a UI/UX point of view. Before, the user was required to check the box under the 'Delete?' column for the respective hold and then click a 'Cancel marked holds' button alongside a cancellation reason. Now, the user selects the holds they want to cancel and click a new 'Cancel selected holds' button. This reworked button now shows the hold cancellation modal, becoming more consistent to what happens when cancelling holds in other pages where this action is also possible. Suspending multiple holds has received the same treatment, with the additional benefit that is now possible to suspend a set of selected holds, rather than only being able to suspend either a single or all holds. This work also serves as preparation for future holds 'bulk actions' on these patron pages, now that selecting multiple holds on these pages has been standardized.
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 40395: Preparation: suspension_bulk REST API endpoint (7.93 KB, patch)
2025-07-15 15:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: DRY cancel_hold_modal (6.17 KB, patch)
2025-07-15 15:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js (14.56 KB, patch)
2025-07-15 15:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Use 'deny' CSS class for red color (1.80 KB, patch)
2025-07-15 15:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Reimplement suspend (8.43 KB, patch)
2025-07-15 15:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Reimplement delete (4.57 KB, patch)
2025-07-15 15:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK (5.45 KB, patch)
2025-07-15 15:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Add checkboxes column to holds table (4.25 KB, patch)
2025-07-15 15:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: suspension_bulk REST API endpoint (7.93 KB, patch)
2025-07-16 10:29 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: DRY cancel_hold_modal (6.17 KB, patch)
2025-07-16 10:29 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js (14.56 KB, patch)
2025-07-16 10:29 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Use 'deny' CSS class for red color (1.80 KB, patch)
2025-07-16 10:29 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Reimplement suspend (8.87 KB, patch)
2025-07-16 10:29 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Reimplement delete (4.57 KB, patch)
2025-07-16 10:29 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK (5.39 KB, patch)
2025-07-16 10:29 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Add checkboxes column to holds table (4.03 KB, patch)
2025-07-16 10:29 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: suspension_bulk REST API endpoint (8.00 KB, patch)
2025-07-18 16:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40395: Preparation: DRY cancel_hold_modal (6.24 KB, patch)
2025-07-18 16:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js (14.62 KB, patch)
2025-07-18 16:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40395: Use 'deny' CSS class for red color (1.86 KB, patch)
2025-07-18 16:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40395: Reimplement suspend (8.94 KB, patch)
2025-07-18 16:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40395: Reimplement delete (4.63 KB, patch)
2025-07-18 16:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK (5.45 KB, patch)
2025-07-18 16:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40395: Add checkboxes column to holds table (4.10 KB, patch)
2025-07-18 16:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40395: (QA follow-up): Add checkbox column to table settings (841 bytes, patch)
2025-07-21 11:21 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: (QA follow-up) Ensure checkboxes are unchecked after suspending (1.22 KB, patch)
2025-07-21 11:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: (QA follow-up): Add checkbox column to table settings (1.37 KB, patch)
2025-07-21 13:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: suspension_bulk REST API endpoint (7.93 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: DRY cancel_hold_modal (6.17 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js (14.56 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Use 'deny' CSS class for red color (1.80 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Reimplement suspend (8.87 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Reimplement delete (4.57 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK (5.39 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Add checkboxes column to holds table (4.03 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: (QA follow-up): Add checkbox column to table settings (1.07 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: (QA follow-up) Ensure checkboxes are unchecked after suspending (1.22 KB, patch)
2025-07-22 13:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: Preparation: suspension_bulk REST API endpoint (7.97 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: Preparation: DRY cancel_hold_modal (6.22 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js (14.61 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: Use 'deny' CSS class for red color (1.84 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: Reimplement suspend (8.92 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: Reimplement delete (4.61 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK (5.43 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: Add checkboxes column to holds table (4.08 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: (QA follow-up): Add checkbox column to table settings (1.12 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: (QA follow-up) Ensure checkboxes are unchecked after suspending (1.27 KB, patch)
2025-07-29 03:10 UTC, David Cook
Details | Diff | Splinter Review
Bug 40395: (QA follow-up): Address forbidden pattern QA complaints (1.43 KB, patch)
2025-08-18 11:37 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40395: (QA follow-up): Remove unused form (4.19 KB, patch)
2025-08-21 10:57 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2025-07-15 14:59:31 UTC

    
Comment 1 Pedro Amorim 2025-07-15 15:01:34 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2025-07-15 15:01:36 UTC Comment hidden (obsolete)
Comment 3 Pedro Amorim 2025-07-15 15:01:39 UTC Comment hidden (obsolete)
Comment 4 Pedro Amorim 2025-07-15 15:01:41 UTC Comment hidden (obsolete)
Comment 5 Pedro Amorim 2025-07-15 15:01:43 UTC Comment hidden (obsolete)
Comment 6 Pedro Amorim 2025-07-15 15:01:46 UTC Comment hidden (obsolete)
Comment 7 Pedro Amorim 2025-07-15 15:01:48 UTC Comment hidden (obsolete)
Comment 8 Pedro Amorim 2025-07-15 15:01:50 UTC Comment hidden (obsolete)
Comment 9 Pedro Amorim 2025-07-16 10:29:25 UTC
Created attachment 184134 [details] [review]
Bug 40395: Preparation: suspension_bulk REST API endpoint
Comment 10 Pedro Amorim 2025-07-16 10:29:28 UTC
Created attachment 184135 [details] [review]
Bug 40395: Preparation: DRY cancel_hold_modal
Comment 11 Pedro Amorim 2025-07-16 10:29:30 UTC
Created attachment 184136 [details] [review]
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js

This is so that tables from patron-detail-tabs.inc can also make use of this JS
Comment 12 Pedro Amorim 2025-07-16 10:29:33 UTC
Created attachment 184137 [details] [review]
Bug 40395: Use 'deny' CSS class for red color
Comment 13 Pedro Amorim 2025-07-16 10:29:35 UTC
Created attachment 184138 [details] [review]
Bug 40395: Reimplement suspend
Comment 14 Pedro Amorim 2025-07-16 10:29:38 UTC
Created attachment 184139 [details] [review]
Bug 40395: Reimplement delete
Comment 15 Pedro Amorim 2025-07-16 10:29:40 UTC
Created attachment 184140 [details] [review]
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK
Comment 16 Pedro Amorim 2025-07-16 10:29:43 UTC
Created attachment 184141 [details] [review]
Bug 40395: Add checkboxes column to holds table

Test plan, k-t-d, patches applied:
1) Search for 'music':
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=music
2) Click the 'Select all' link on the left of the search toolbar
3) Click the 'Place hold' button on the same toolbar
4) On the patron input, add 'koha'
5) You need to pick the 'Pickup location' specifically for each hold. Click 'Place holds'
6) On this screen (reserve/request.pl) ensure the table(s) work. Selecting all works. Canceling selected works (it doesn't refresh immediatelly, it's a background job). Suspend works as before, sorting, etc.
7) Now visit the patron details page:
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
8) Click the 'Holds' tab.
9) Verify we now have a checkbox column at the start.
10) Test that selecting multiple holds and canceling selected works. Same for suspending.
11) Test the canceling or suspending a specific hold works.
12) Test that this table is compatible with AutoResumeSuspendedHolds sys pref i.e. you're unable to set a resume date when suspending in bulk or single if this sys pref is turned off.
13) Repeat steps 8-12 but for the circulation page from patron details at:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
14) Ensure tests added for API REST endpoint added here pass:
prove t/db_dependent/api/v1/holds.t
Comment 17 Andrew Fuerste-Henry 2025-07-18 15:27:37 UTC
These patches remove some functionality from this page. Before the patches, one can select a hold cancellation reason when cancelling several holds at once at can set a suspend-until date when suspending multiple holds at once.
Comment 18 Andrew Fuerste-Henry 2025-07-18 16:06:45 UTC
(In reply to Andrew Fuerste-Henry from comment #17)
> These patches remove some functionality from this page. Before the patches,
> one can select a hold cancellation reason when cancelling several holds at
> once at can set a suspend-until date when suspending multiple holds at once.

Don't mind me, both functions are now in a modal that pops up on clicking their respective buttons.
Comment 19 Andrew Fuerste-Henry 2025-07-18 16:38:18 UTC
Created attachment 184398 [details] [review]
Bug 40395: Preparation: suspension_bulk REST API endpoint

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 20 Andrew Fuerste-Henry 2025-07-18 16:38:21 UTC
Created attachment 184399 [details] [review]
Bug 40395: Preparation: DRY cancel_hold_modal

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 21 Andrew Fuerste-Henry 2025-07-18 16:38:24 UTC
Created attachment 184400 [details] [review]
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js

This is so that tables from patron-detail-tabs.inc can also make use of this JS

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 22 Andrew Fuerste-Henry 2025-07-18 16:38:26 UTC
Created attachment 184401 [details] [review]
Bug 40395: Use 'deny' CSS class for red color

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 23 Andrew Fuerste-Henry 2025-07-18 16:38:29 UTC
Created attachment 184402 [details] [review]
Bug 40395: Reimplement suspend

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 24 Andrew Fuerste-Henry 2025-07-18 16:38:32 UTC
Created attachment 184403 [details] [review]
Bug 40395: Reimplement delete

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 25 Andrew Fuerste-Henry 2025-07-18 16:38:35 UTC
Created attachment 184404 [details] [review]
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 26 Andrew Fuerste-Henry 2025-07-18 16:38:37 UTC
Created attachment 184405 [details] [review]
Bug 40395: Add checkboxes column to holds table

Test plan, k-t-d, patches applied:
1) Search for 'music':
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=music
2) Click the 'Select all' link on the left of the search toolbar
3) Click the 'Place hold' button on the same toolbar
4) On the patron input, add 'koha'
5) You need to pick the 'Pickup location' specifically for each hold. Click 'Place holds'
6) On this screen (reserve/request.pl) ensure the table(s) work. Selecting all works. Canceling selected works (it doesn't refresh immediatelly, it's a background job). Suspend works as before, sorting, etc.
7) Now visit the patron details page:
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
8) Click the 'Holds' tab.
9) Verify we now have a checkbox column at the start.
10) Test that selecting multiple holds and canceling selected works. Same for suspending.
11) Test the canceling or suspending a specific hold works.
12) Test that this table is compatible with AutoResumeSuspendedHolds sys pref i.e. you're unable to set a resume date when suspending in bulk or single if this sys pref is turned off.
13) Repeat steps 8-12 but for the circulation page from patron details at:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
14) Ensure tests added for API REST endpoint added here pass:
prove t/db_dependent/api/v1/holds.t

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 27 Pedro Amorim 2025-07-21 11:21:52 UTC Comment hidden (obsolete)
Comment 28 Pedro Amorim 2025-07-21 11:27:41 UTC
Created attachment 184435 [details] [review]
Bug 40395: (QA follow-up) Ensure checkboxes are unchecked after suspending

To test, select a few holds to suspend (but not all). Click 'Suspend selected'. Notice the selection doesn't reset. After this patch, it does reset.
Comment 29 Pedro Amorim 2025-07-21 13:57:31 UTC
Created attachment 184437 [details] [review]
Bug 40395: (QA follow-up): Add checkbox column to table settings

This fixes the empty entry when clicking 'Columns' on the top right of
the table.
Also ensures sorting does not exist on the checkbox column and exists on the one it was before (reservedate)
This is for holds table on both patron pages:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=19
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=19
Comment 30 Pedro Amorim 2025-07-22 13:05:41 UTC
No longer applies after bug 40372
Comment 31 Pedro Amorim 2025-07-22 13:10:13 UTC
Created attachment 184470 [details] [review]
Bug 40395: Preparation: suspension_bulk REST API endpoint
Comment 32 Pedro Amorim 2025-07-22 13:10:16 UTC
Created attachment 184471 [details] [review]
Bug 40395: Preparation: DRY cancel_hold_modal
Comment 33 Pedro Amorim 2025-07-22 13:10:18 UTC
Created attachment 184472 [details] [review]
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js

This is so that tables from patron-detail-tabs.inc can also make use of this JS
Comment 34 Pedro Amorim 2025-07-22 13:10:21 UTC
Created attachment 184473 [details] [review]
Bug 40395: Use 'deny' CSS class for red color
Comment 35 Pedro Amorim 2025-07-22 13:10:24 UTC
Created attachment 184474 [details] [review]
Bug 40395: Reimplement suspend
Comment 36 Pedro Amorim 2025-07-22 13:10:26 UTC
Created attachment 184475 [details] [review]
Bug 40395: Reimplement delete
Comment 37 Pedro Amorim 2025-07-22 13:10:29 UTC
Created attachment 184476 [details] [review]
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK
Comment 38 Pedro Amorim 2025-07-22 13:10:32 UTC
Created attachment 184477 [details] [review]
Bug 40395: Add checkboxes column to holds table

Test plan, k-t-d, patches applied:
1) Search for 'music':
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=music
2) Click the 'Select all' link on the left of the search toolbar
3) Click the 'Place hold' button on the same toolbar
4) On the patron input, add 'koha'
5) You need to pick the 'Pickup location' specifically for each hold. Click 'Place holds'
6) On this screen (reserve/request.pl) ensure the table(s) work. Selecting all works. Canceling selected works (it doesn't refresh immediatelly, it's a background job). Suspend works as before, sorting, etc.
7) Now visit the patron details page:
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
8) Click the 'Holds' tab.
9) Verify we now have a checkbox column at the start.
10) Test that selecting multiple holds and canceling selected works. Same for suspending.
11) Test the canceling or suspending a specific hold works.
12) Test that this table is compatible with AutoResumeSuspendedHolds sys pref i.e. you're unable to set a resume date when suspending in bulk or single if this sys pref is turned off.
13) Repeat steps 8-12 but for the circulation page from patron details at:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
14) Ensure tests added for API REST endpoint added here pass:
prove t/db_dependent/api/v1/holds.t
Comment 39 Pedro Amorim 2025-07-22 13:10:34 UTC
Created attachment 184478 [details] [review]
Bug 40395: (QA follow-up): Add checkbox column to table settings

This fixes the empty entry when clicking 'Columns' on the top right of
the table
Comment 40 Pedro Amorim 2025-07-22 13:10:37 UTC
Created attachment 184479 [details] [review]
Bug 40395: (QA follow-up) Ensure checkboxes are unchecked after suspending

To test, select a few holds to suspend (but not all). Click 'Suspend selected'. Notice the selection doesn't reset. After this patch, it does reset.
Comment 41 David Cook 2025-07-29 03:09:24 UTC
I'm not loving all the code that I'm seeing, but I can see that code in question is already existing code, which is just being moved around, so that's OK.

Test plan was missing a couple steps:
- redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json
- koha-plack --restart kohadev

Otherwise, overall, I think this looks good.
Comment 42 David Cook 2025-07-29 03:10:15 UTC
Created attachment 184765 [details] [review]
Bug 40395: Preparation: suspension_bulk REST API endpoint

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 43 David Cook 2025-07-29 03:10:19 UTC
Created attachment 184766 [details] [review]
Bug 40395: Preparation: DRY cancel_hold_modal

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 44 David Cook 2025-07-29 03:10:23 UTC
Created attachment 184767 [details] [review]
Bug 40395: Preparation: Move holds table JS from request.tt to holds.js

This is so that tables from patron-detail-tabs.inc can also make use of this JS

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 45 David Cook 2025-07-29 03:10:28 UTC
Created attachment 184768 [details] [review]
Bug 40395: Use 'deny' CSS class for red color

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 46 David Cook 2025-07-29 03:10:32 UTC
Created attachment 184769 [details] [review]
Bug 40395: Reimplement suspend

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 47 David Cook 2025-07-29 03:10:36 UTC
Created attachment 184770 [details] [review]
Bug 40395: Reimplement delete

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 48 David Cook 2025-07-29 03:10:40 UTC
Created attachment 184771 [details] [review]
Bug 40395: Refactor: Move suspend modal to its own tt BLOCK

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 49 David Cook 2025-07-29 03:10:45 UTC
Created attachment 184772 [details] [review]
Bug 40395: Add checkboxes column to holds table

Test plan, k-t-d, patches applied:
1) Search for 'music':
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=music
2) Click the 'Select all' link on the left of the search toolbar
3) Click the 'Place hold' button on the same toolbar
4) On the patron input, add 'koha'
5) You need to pick the 'Pickup location' specifically for each hold. Click 'Place holds'
6) On this screen (reserve/request.pl) ensure the table(s) work. Selecting all works. Canceling selected works (it doesn't refresh immediatelly, it's a background job). Suspend works as before, sorting, etc.
7) Now visit the patron details page:
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
8) Click the 'Holds' tab.
9) Verify we now have a checkbox column at the start.
10) Test that selecting multiple holds and canceling selected works. Same for suspending.
11) Test the canceling or suspending a specific hold works.
12) Test that this table is compatible with AutoResumeSuspendedHolds sys pref i.e. you're unable to set a resume date when suspending in bulk or single if this sys pref is turned off.
13) Repeat steps 8-12 but for the circulation page from patron details at:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
14) Ensure tests added for API REST endpoint added here pass:
prove t/db_dependent/api/v1/holds.t

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 50 David Cook 2025-07-29 03:10:49 UTC
Created attachment 184773 [details] [review]
Bug 40395: (QA follow-up): Add checkbox column to table settings

This fixes the empty entry when clicking 'Columns' on the top right of
the table

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 51 David Cook 2025-07-29 03:10:53 UTC
Created attachment 184774 [details] [review]
Bug 40395: (QA follow-up) Ensure checkboxes are unchecked after suspending

To test, select a few holds to suspend (but not all). Click 'Suspend selected'. Notice the selection doesn't reset. After this patch, it does reset.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 52 Lucas Gass (lukeg) 2025-08-14 20:57:23 UTC
[FAIL] koha-tmpl/intranet-tmpl/prog/js/holds.js
   FAIL	  forbidden_patterns
		forbidden pattern: Use __("") instead of _("") (line 687)
		forbidden pattern: Use __("") instead of _("") (line 688)
		forbidden pattern: Use __("") instead of _("") (line 717)
		forbidden pattern: Use __("") instead of _("") (line 718)
Comment 53 Pedro Amorim 2025-08-18 11:37:23 UTC
Created attachment 185508 [details] [review]
Bug 40395: (QA follow-up): Address forbidden pattern QA complaints
Comment 54 Lucas Gass (lukeg) 2025-08-20 19:46:01 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 55 Lucas Gass (lukeg) 2025-08-20 19:46:57 UTC
Please add release notes!
Comment 56 Lucas Gass (lukeg) 2025-08-20 22:01:10 UTC
This causes xt/find-missing-op-in-forms.t to fail. Can you check? It looks like coming from d06ba0860bc87031819ecdeff9bccd5c51d1fa8b
Comment 57 Pedro Amorim 2025-08-21 10:57:25 UTC
Created attachment 185623 [details] [review]
Bug 40395: (QA follow-up): Remove unused form

This form is no longer used. We're now using a single cancellation hold modal and them form resides there, not here on this table
To test on the UI: Apply this patch and ensure cancelling holds works as before, from both pages (tested using borrowernumber 19:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=19
<staff_url>/cgi-bin/koha/reserve/request.pl?biblionumber=76&biblionumber=437&biblionumber=77

Fixed the failing test:
prove xt/find-missing-op-in-forms.t
Comment 58 Lucas Gass (lukeg) 2025-08-21 17:45:48 UTC
Follow-ups pushed to main.