Bug 36497

Summary: Cancel unfilled holds should be a system preference
Product: Koha Reporter: hebah
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kebliss, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description hebah 2024-04-02 18:54:28 UTC
While libraries can run cancel_unfilled_holds with various parameters, nowhere in the staff client suggests that option, nor is it in cron jobs in the manual.

It should be a system preference a la ExpireReservesMaxPickUpDelay, with a "Cancel/Don't cancel" option for unfilled holds and a second preference for days, followed by verbiage indicating that this requires running cancel_unfillled_holds.pl. This would let library staff know both that the cancellation of old holds is possible as well as give them some basic configuration from the staff client.
Comment 1 Pedro Amorim 2024-04-03 15:02:34 UTC
Would something like CancelUnfilledHoldsAfter expecting a numeric input for days work?
Default 0, with 0 meaning don't cancel. This would make it 1 sys pref instead of 2.

cancel_unfilled_holds.pl would be updated to check, in the following order:
1 - Days supplied as cron parameter
2 - Days value configured in CancelUnfilledHoldsAfter (if >1)
3 - Show the same 'Error: You must specify a value for days waiting to cancel holds.'  as it does currently if both above conditions fail.
Comment 2 hebah 2024-04-03 15:25:39 UTC
That does sound like an elegant solution, Pedro. I like it.