From 0dbfc6a2ad55126e62d894269681407643ee05f2 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 --- Koha/Hold.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index 9736dc527f..104ebe94ac 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.30.2