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 <andrew@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2022-01-06 15:16:05 +00:00 committed by Kyle Hall
parent 3e7ffca76c
commit 1de5464ede
1 changed files with 9 additions and 1 deletions

View File

@ -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,
};