[Koha-bugs] [Bug 30914] New: cleanup_database.pl --transfers --old-reserves --confirm does not work.
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jun 7 09:22:41 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30914
Bug ID: 30914
Summary: cleanup_database.pl --transfers --old-reserves
--confirm does not work.
Change sponsored?: ---
Product: Koha
Version: 20.11
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Command-line Utilities
Assignee: koha-bugs at lists.koha-community.org
Reporter: andreas.jonsson at kreablo.se
QA Contact: testopia at bugs.koha-community.org
CC: robin at catalyst.net.nz
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;
}
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list