Bug 41960

Summary: Add option to block placing hold when patron has overdues
Product: Koha Reporter: Janusz Kaczmarek <januszop>
Component: Hold requestsAssignee: Janusz Kaczmarek <januszop>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle, lisette, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41960: Add new systempreference 'OverduesBlockHolds'
Bug 41960: Add option to block placing hold when patron has overdues
Bug 41960: Unit tests

Description Janusz Kaczmarek 2026-03-01 19:56:38 UTC
Some libraries may want to block the possibility of placing hold when a patron has overdues. Currently, a patron is blocked when they has mode than maxoutstanding fines or when the account has been debarred (e.g. as a result of having overdues). But there is no possibility to directly block reserves in case of an overdue.
Comment 1 Janusz Kaczmarek 2026-03-01 22:33:32 UTC
Created attachment 194251 [details] [review]
Bug 41960: Add new systempreference 'OverduesBlockHolds'
Comment 2 Janusz Kaczmarek 2026-03-01 22:33:34 UTC
Created attachment 194252 [details] [review]
Bug 41960: Add option to block placing hold when patron has overdues

Some libraries may want to block the possibility of placing hold when
a patron has overdues. Currently, a patron is blocked when they has
mode than maxoutstanding fines or when the account has been debarred
(e.g. as a result of having overdues). But there is no possibility to
directly block reserves in case of an overdue.

Test plan:
==========
1. Check out any book to any user.
2. In ktd --dbshell, change date_due to an earlier date.
3. In a private window, log in as that user (change their password
   first) and place an order for another book. You will be able to do
   this despite the overdue items.
4. Apply the patch, updatedatabase, restart_all.
5. Set OverduesBlockHolds to 'Block'.
6. Repeat step 3. You should get the message "Sorry, you cannot place
   holds. You are not permitted to place holds while you have overdue
   items on your account."
7. Change OverduesBlockHolds to 'Don't block'.
8. Repeat step 3. You should be able to place an order.
Comment 3 Janusz Kaczmarek 2026-03-01 22:33:36 UTC
Created attachment 194253 [details] [review]
Bug 41960: Unit tests