[Koha-bugs] [Bug 14101] auto renewal is tied to 'no renewal before'

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue May 19 16:46:41 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101

--- Comment #6 from Holger Meißner <h.meissner.82 at web.de> ---
(In reply to Kyle M Hall from comment #3)
> This seems to happen even if I set a no renewal before value.

Hi Kyle, which values did you test? It should work with values equal to or
greater than 1. Maybe the feature broke. I am going to re-test, but this is how
it used to work. The cronjob calls CanBookBeRenewed. There "no renewal before"
is calculated like this:

    if ( $issuingrule->{norenewalbefore} ) {

        # Get current time and add norenewalbefore.
        # If this is smaller than date_due, it's too soon for renewal.
        if (
            DateTime->now( time_zone => C4::Context->tz() )->add(
                $issuingrule->{lengthunit} => $issuingrule->{norenewalbefore}
            ) < $itemissue->{date_due}
          )
        {
            return ( 0, "auto_too_soon" ) if $itemissue->{auto_renew};
            return ( 0, "too_soon" );
        }
    }

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list