[Koha-bugs] [Bug 29074] DefaultHoldExpirationdatePeriod blank value interpreted as zero

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 3 11:03:11 CET 2023


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

--- Comment #14 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
(In reply to Katrin Fischer from comment #13)
> 1) The changes make sense, but I wondered if it wouldn't be safer to change
> 
> sub _set_default_expirationdate {
>     my $self = shift;
> 
>     my $period = C4::Context->preference('DefaultHoldExpirationdatePeriod')
> || 0;
>     my $timeunit =
> 
> ?
> 
> This would mean one change in one spot instead of changing 2.
> 
> We could just "do onthing" if DefaultHoldExpirationdatePeriod is
> undefined/empty.
That's a good point, I'm just not sure if there's point to trigger sub
_set_default_expirationdate at all. I mean, with this current patch we don't
proceed to sub _set_default_expirationdate if DefaultHoldExpirationdatePeriod
is not set. There's also less code to execute this way. But that's just my
hunch :D If someone has any other points to this, please comment.    

> 2) For the note I suggest a tiny rephrase:
> 
>  If <a
> href="/cgi-bin/koha/admin/preferences.
> pl?op=search&searchfield=DefaultHoldExpirationdatePeriod">DefaultHoldExpirati
> ondatePeriod</a> is left blank default expiration date is not set.</br>
> 
> ..., the default expiration date is not set.
> ..., no default expiration date is set.
Makes sense. I'll adjust this after we decide what to do with point 1, since if
we proceed with that, it would probably be good idea to rewrite these patches.

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


More information about the Koha-bugs mailing list