Bug 40551 - Make patron page holds table use API endpoint for cancellation
Summary: Make patron page holds table use API endpoint for cancellation
Status: Passed QA
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: Andrew Fuerste-Henry
URL:
Keywords:
Depends on: 40395 40550 40552
Blocks:
  Show dependency treegraph
 
Reported: 2025-07-30 11:37 UTC by Pedro Amorim
Modified: 2025-09-29 15:24 UTC (History)
8 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
The patron holds tables on the patron details page, circulation page, and holds management page (reserve/request.pl) now use a REST API endpoint for cancelling holds, with bulk cancellations processed as background jobs. Previously, hold cancellations from these pages were processed synchronously through traditional page requests. When cancelling multiple holds at once, this could cause delays or timeouts on pages with many holds. **Key improvements:** - **Background processing**: Bulk hold cancellations are now queued as background jobs, preventing page timeouts when cancelling multiple holds - **Consistent interface**: Selecting and cancelling holds works the same way across all patron-related holds tables (patron details, circulation, and holds management pages) - **Better performance**: The page doesn't need to wait for all cancellations to complete before refreshing **For staff:** When you cancel selected holds, the page may not refresh immediately. The cancellations are being processed in the background. You can check the status of the background job in Administration → Jobs. **Technical details:** This enhancement adds a new `/holds/cancellation_bulk` API endpoint (Bug 40550) that accepts multiple hold IDs and queues their cancellations as a background job, improving the reliability and user experience when managing large numbers of holds.
Version(s) released in:
Circulation function:


Attachments
Bug 40551: Make patron page holds table use API endpoint for cancellation (3.79 KB, patch)
2025-07-30 11:44 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 40551: Make patron page holds table use API endpoint for cancellation (3.84 KB, patch)
2025-08-18 20:06 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40551: Make patron page holds table use API endpoint for cancellation (3.91 KB, patch)
2025-09-26 20:29 UTC, Andrew Fuerste-Henry
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-30 11:37:55 UTC

    
Comment 1 Pedro Amorim 2025-07-30 11:44:09 UTC
Created attachment 184865 [details] [review]
Bug 40551: Make patron page holds table use API endpoint for cancellation

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) Test that selecting multiple holds and canceling selected works.
10) Test that canceling a specific hold works.
11) Repeat steps 8-10 but for the circulation page from patron details at:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
Comment 2 Andrew Fuerste-Henry 2025-08-18 20:06:59 UTC
Created attachment 185524 [details] [review]
Bug 40551: Make patron page holds table use API endpoint for cancellation

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) Test that selecting multiple holds and canceling selected works.
10) Test that canceling a specific hold works.
11) Repeat steps 8-10 but for the circulation page from patron details at:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51

Signed-off-by: Phillip Berg <phillip.berg@mainlib.org>
Comment 3 Andrew Fuerste-Henry 2025-09-26 20:29:48 UTC
Created attachment 187019 [details] [review]
Bug 40551: Make patron page holds table use API endpoint for cancellation

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) Test that selecting multiple holds and canceling selected works.
10) Test that canceling a specific hold works.
11) Repeat steps 8-10 but for the circulation page from patron details at:
http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51

Signed-off-by: Phillip Berg <phillip.berg@mainlib.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>