From 67acff98f09256949175cea6e7db7f28fbb0b224 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 6 Jan 2022 15:16:05 +0000 Subject: [PATCH] Bug 21652: Only set waitingdate to today if there is no waitingdate already 1- Find or create a hold with a waitingdate other than today 2- Check the item in to generate a new hold alert 3- Select "Confirm and Print" 4- Verify that the waiting date has changed to the current date 5- Apply patch 6- Try 1-3 again, if a waitingdate already exists it should not change 7. Try an item with no waitingdate, it should properly update to today Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Jonathan Druart --- Koha/Hold.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index 5b258aafaab..34ce8961544 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -178,10 +178,18 @@ sub set_waiting { $self->priority(0); + my $waiting_date; my $today = dt_from_string(); + + if ( $self->waitingdate ) { + $waiting_date = $self->waitingdate; + } else { + $waiting_date = $today->ymd; + } + my $values = { found => 'W', - waitingdate => $today->ymd, + waitingdate => $waiting_date, desk_id => $desk_id, }; -- 2.25.1