From 5a578be248f7d88bf371c25ce86bae7438adb031 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 25 Apr 2023 21:25:41 +0000 Subject: [PATCH] Bug 33611: WIP - needs tests --- Koha/Hold.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index a5a9d03003..cd375ce9af 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -890,13 +890,14 @@ sub store { sub _set_default_expirationdate { my $self = shift; + my $reservedate = dt_from_string($self->reservedate)->clone; my $period = C4::Context->preference('DefaultHoldExpirationdatePeriod') || 0; my $timeunit = C4::Context->preference('DefaultHoldExpirationdateUnitOfTime') || 'days'; $self->expirationdate( - dt_from_string( $self->reservedate )->add( $timeunit => $period ) ); + dt_from_string( $reservedate )->add( $timeunit => $period ) ); } =head3 _move_to_old -- 2.30.2