[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
Thu Oct 1 12:47:00 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14101
--- Comment #24 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Comment on attachment 39800
--> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39800
Bug 14101: Automatic renewals exactly on due date
Review of attachment 39800:
--> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14101&attachment=39800)
-----------------------------------------------------------------
::: C4/Circulation.pm
@@ +2737,4 @@
> return ( 0, "too_many" )
> if $issuingrule->{renewalsallowed} <= $itemissue->{renewals};
>
> + if ( defined $issuingrule->{norenewalbefore} ) {
What about the empty string? I am not sure it's relevant, but I would like to
be sure.
@@ +2751,5 @@
> return ( 0, "too_soon" );
> }
> + else {
> + return ( 0, "auto_renew" ) if $itemissue->{auto_renew};
> + return ( 1, undef );
This last return is not needed, the process should continue I think.
Imagine someone else adds a new check in the futur.
@@ +2759,5 @@
> + # Fallback for automatic renewals:
> + # If norenewalbefore is undef, don't renew before due date.
> + elsif ( $itemissue->{auto_renew} ) {
> + return ( 0, "auto_renew" )
> + if DateTime->now( time_zone => C4::Context->tz() ) >=
Prefer dt_from_string to get a DateTime object.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list