Bug 29727

Summary: Koha should respect NoRenewalBeforePrecision when No Renewal Before is unset
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, r.delahunty
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 Andrew Fuerste-Henry 2021-12-17 17:31:37 UTC
To recreate:
- create a circ rule for item type A, automatic renewal, No Renewal Before=0
- create a circ rule for item type B, automatic renewal, No Renewal Before unset
- set NoRenewalBeforePrecision to Exact Time
- check out an item of type A with a due date of today, 23:59
- check out an item of type B with a due date of today, 23:59
- perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -v
- confirm neither checkout would have renewed, both would get auto_too_soon error
- set NoRenewalBeforePrecision to Date
- perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -v
- confirm that item type A, where No Renewal Before=0, would have renewed
- confirm that item type B, where No Renewal Before is unset, would have renewed


We generally treat an unset No Renewal Before as equivalent to zero for automatic renewal. We should do the same here.
Comment 1 Andrew Fuerste-Henry 2021-12-17 18:26:32 UTC
Spotted a typo in my description. Those last two lines should be:

- confirm that item type A, where No Renewal Before=0, would have renewed
- confirm that item type B, where No Renewal Before is unset, would NOT have renewed, would have gotten an auto_too_soon error