[Koha-bugs] [Bug 31427] Automatic renewal errors should come before many other renewal errors

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 1 11:08:32 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31427

--- Comment #33 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Another related observation in CanBookBeRenewed:

    if ( $auto_renew eq 'auto_too_soon' ) {

        # If its cron, tell it it's too soon for a an auto renewal
        return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $cron;

        # Check if it's too soon for a manual renewal
        my $soonestManual = GetSoonestRenewDate( $patron, $issue );
        if ( $soonestManual > dt_from_string() ) {
            return ( 0, "too_soon", { soonest_renew_date => $soonestManual } )
unless $override_limit;
        }
    }

    $soonest = GetSoonestRenewDate($patron, $issue);
    if ( $soonest > dt_from_string() ){
        return (0, "too_soon", { soonest_renew_date => $soonest } ) unless
$override_limit;
    }


When we have auto_too_soon, we might be calling GetSoonestRenewDate twice here?

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


More information about the Koha-bugs mailing list