Bug 41552

Summary: Holds are not removed from holds queue when hold is suspended
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, lisette, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41552: Remove hold from holds queue when suspended
Bug 41552: Remove hold from holds queue when suspended
Bug 41552: Add unit tests
Bug 41552: Remove hold from holds queue when suspended

Description Andrew Fuerste-Henry 2026-01-08 18:17:47 UTC
If one is not using the real time holds queue, holds are not removed from the queue when suspended. Instead, they remain listed until the next time the cron is run. We should remove holds from the queue immediately when suspended, as we do when a hold is filled.
Comment 1 Kyle M Hall (khall) 2026-02-10 16:52:01 UTC
Created attachment 192914 [details] [review]
Bug 41552: Remove hold from holds queue when suspended

Patch from commit b3d73c5
Comment 2 Kyle M Hall (khall) 2026-02-10 16:53:24 UTC
Created attachment 192915 [details] [review]
Bug 41552: Remove hold from holds queue when suspended

If one is not using the real time holds queue, holds are not removed from the queue when suspended. Instead, they remain listed until the next time the cron is run. We should remove holds from the queue immediately when suspended, as we do when a hold is filled.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/HoldsQueue.t
Comment 3 Kyle M Hall (khall) 2026-02-10 16:54:10 UTC
Created attachment 192916 [details] [review]
Bug 41552: Add unit tests

Patch from commit 35dc09a
Comment 4 Kyle M Hall (khall) 2026-02-10 16:54:12 UTC
Created attachment 192917 [details] [review]
Bug 41552: Remove hold from holds queue when suspended

If one is not using the real time holds queue, holds are not removed from the queue when suspended. Instead, they remain listed until the next time the cron is run. We should remove holds from the queue immediately when suspended, as we do when a hold is filled.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/HoldsQueue.t