When the --confirm flag was added for bug 24153 the same mistake was made twice - 'delete if $verbose' instead of 'delete if $confirm': if ($pOldReserves) { print "Purging old reserves older than $pOldReserves days.\n" if $verbose; my $old_reserves = Koha::Old::Holds->filter_by_last_update( { days => $pOldReserves } ); my $count = $old_reserves->count; $old_reserves->delete if $verbose; say sprintf "Done with purging %d old reserves.", $count if $verbose; } if ($pTransfers) { print "Purging arrived item transfers older than $pTransfers days.\n" if $verbose; my $transfers = Koha::Item::Transfers->filter_by_last_update( { timestamp_column_name => 'datearrived', days => $pTransfers, } ); my $count = $transfers->count; $transfers->delete if $verbose; say sprintf "Done with purging %d transfers.", $count if $verbose; }
Created attachment 135756 [details] [review] Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves Silly mistake, 'delete if verbose' must be 'delete if confirm' Test plan: Try the cleanup_database.pl script to delete transfers and old issues. Using --transfers --old-reserves and the --confirm flag the entries must be removed
Oops, sorry about that!
Created attachment 135789 [details] [review] Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves Silly mistake, 'delete if verbose' must be 'delete if confirm' Test plan: Try the cleanup_database.pl script to delete transfers and old issues. Using --transfers --old-reserves and the --confirm flag the entries must be removed Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Created attachment 135969 [details] [review] Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves Silly mistake, 'delete if verbose' must be 'delete if confirm' Test plan: Try the cleanup_database.pl script to delete transfers and old issues. Using --transfers --old-reserves and the --confirm flag the entries must be removed Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for 22.05.03
pushed to 21.11.x for 21.11.11
Backported: Pushed to 21.05.x branch for 21.05.18 Nothing to document, marking resolved.