Bug 41370 - Auto renewal error auto_too_much_oweing should not take precedence over too_many
Summary: Auto renewal error auto_too_much_oweing should not take precedence over too_many
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-03 19:11 UTC by Raina
Modified: 2025-12-03 19:11 UTC (History)
2 users (show)

See Also:
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

Note You need to log in before you can comment on or make changes to this bug.
Description Raina 2025-12-03 19:11:55 UTC
If an item is scheduled for automatic renewal and has already renewed the maximum number of times allowed, and the patron has NO fines that could block a renewal, then the error at the next attempted renewal is "too_many." 

However, if an item is scheduled for automatic renewal, has already renewed the maximum number of times allowed, and the patron has fines exceeding the amount allowed for automatic renewals, then the error at the next attempted renewal is "auto_too_much_oweing". 

This causes issues if a library wants to use the auto_renewals_dgst notice to let patrons know if a renewal failed because of fines. If an item has an automatic renewal left but it is blocked because of fines, then the library may want to let the patron know about those fines in the notice, so they can address them. However, if the item has no renewals left, becomes long overdue and the patron is charged for the item cost, and is still is not returned, every time auto renewal is attempted the error will continue to be "auto_too_much_oweing." 

If an item has been renewed the maximum number of times, the error should be "too_many" regardless of if there are fines that could prevent a renewal. 

To re-create: 
- Circ rules allow one automatic renewal for set patron group and item type 
- Set OPACFineNoRenewalsBlockAutoRenew to Block renewals if patron owes more than amount defined in OPACFineNoRenewals. OPACFineNoRenewals should be >0 amount. 
- Check out item to patron and renew once successfully. The item should be "scheduled for auto renewal" but have no renewals left.
- Manually charge fine greater than OPACFineNoRenewals to patron.
- Making sure loan is within range of attempting auto renew again via circ rule, run automatic_renewals script to trigger automatic renewal attempt. Error is auto_too_much_oweing.
- Repeat the steps but without putting a fine on the patron's account, and error is too_many.