From ca61422b50147f8158cc7fc790437d9bfda1e7b1 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 21 Sep 2020 09:49:45 -0300 Subject: [PATCH] Bug 25039: (follow-up) Don't forget to store the updated checkout Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind --- tools/batch_extend_due_dates.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/batch_extend_due_dates.pl b/tools/batch_extend_due_dates.pl index 218c592041..c2f9011e56 100755 --- a/tools/batch_extend_due_dates.pl +++ b/tools/batch_extend_due_dates.pl @@ -102,7 +102,6 @@ elsif ( $op eq 'list' ) { } ); - my @new_due_dates; my @checkouts; while ( my $checkout = $checkouts->next ) { @@ -151,10 +150,14 @@ if ( $op eq 'modify' ) { # Update checkout's due date if ( $new_hard_due_date ) { - $checkout->shift_due_date({ hard_due_date => $new_hard_due_date }); + $checkout->shift_due_date({ hard_due_date => $new_hard_due_date }) + ->store + ->discard_changes; } else { - $checkout->shift_due_date({ days => $due_date_days }); + $checkout->shift_due_date({ days => $due_date_days }) + ->store + ->discard_changes; } # Update items.onloan -- 2.11.0