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.
Created attachment 194251 [details] [review] Bug 41960: Add new systempreference 'OverduesBlockHolds'
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.
Created attachment 194253 [details] [review] Bug 41960: Unit tests