https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26498 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (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. -- You are receiving this mail because: You are watching all bug changes.