[Koha-bugs] [Bug 26498] Add option to set a default expire date for holds at reservation time

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 9 08:22:14 CET 2021


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

--- Comment #20 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
(In reply to Jonathan Druart from comment #19)
> (In reply to Emmi Takkinen from comment #18)
> > (In reply to Jonathan Druart from comment #17)
> > > The store method should be improved to set expirationdate only if
> > > reservedate has been modified, to avoid unnecessary processing.
> > 
> > Could you explain a little? Currently expirationdate is set only if
> > "DefaultHoldExpirationdate" and it's not defined or empty. Which is true
> > only when hold is first time made so I'm failing to see logic behind
> > checking reservedate in case of modifications. 
> > 
> > However I now noticed that if "AllowHoldDateInFuture" is set and reservedate
> > is modified expirationdate remains the same. That should be imo be fixed.
> 
> You need to set expiration only if reservedate has been passed/modified.
> Koha::Item->store will give you some example (search for %updated_columns).
> 
> If you have:
>   my $hold = Koha::Holds->find(42);
>   $hold->notes("some notes")->store;
> you don't want to rebuild expirationdate.
> 
> Let me know if you need more details.

OK I see what you mean. I'll look into this and provide patch later.

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


More information about the Koha-bugs mailing list