Bug 14214

Summary: Automatic renewal to renew at end of due date
Product: Koha Reporter: Fiona Borthwick <fiona.borthwick>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fiona.borthwick, gmcharlt, h.meissner.82, kyle.m.hall
Version: 3.18   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Fiona Borthwick 2015-05-18 12:23:58 UTC
If an item is set to automatically renew, then there should be a straightforward way to set the value so that it will renew at the end of the due date.

I have done substantial testing on this but cannot get it to do what I need.

Setting the 'no renewals before' to 1 means that it will renew one day prior to due date.  Setting it to -1 means that it will renew one day past due date - i.e. item is overdue.

Setting the value to 0 in the Circulation Policies translates to null when saved and the 0 is removed.  We established that we could get 0 into the database by entering 0.001.

However this seems to be ignored as the automatic renewal is happening every day in the same way that it would if there was no value set in 'no renewal before'.

We can change the timing of the automatic_renewal.pl script to run at a more convenient time (e.g. before the overdue processing) but we need the item to be able to be renewed at the end of its due date - not before and not after.  

This is especially important for items that have rental fees associated with them.
Comment 1 Holger Meißner 2015-05-19 10:07:11 UTC
(In reply to Fiona Borthwick from comment #0)
> If an item is set to automatically renew, then there should be a
> straightforward way to set the value so that it will renew at the end of the
> due date.

Hi Fiona, there is a global syspref RenewalPeriodBase. It can be set to base the new due date on the current date or on the old due date. So the time the renewal happens doesn't have to be exactly at the end of the loan period.

The automatic renewal feature uses the No renewal before setting, but No renewal before also is a feature in its own right. I didn't consider values smaller than 1, because that would mean users cannot renew before the item is already due. But maybe this could be changed.

It should definitely work with values equal to or greater than 1. I will look into this more deeply.
Comment 2 Holger Meißner 2015-06-03 11:27:41 UTC

*** This bug has been marked as a duplicate of bug 14101 ***
Comment 3 Holger Meißner 2015-06-03 11:33:20 UTC
I have uploaded a patch to fix this problem with bug 14101. Please test and let me know if it works for you.