From 9c491c14c5329f5d5c1531868d62255e6bc2bb2c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 25 Aug 2016 10:21:37 +0100 Subject: [PATCH] Bug 10455: Remove biblioitems.marc - update delete_records_via_leader.pl Recently added, delete_records_via_leader.pl reads biblioitems.marc as a text field and search for record to delete regarding the leader 5. This can be acchieve doing the same thing on biblioitems.marcxml (will certainly be slower) waiting for a patch on bug 15537. Test plan: Confirm that this script works as before, to do so the easiest way would be to dump your DB before executing the update DB entry, execute the script to delete records, reinsert the DB, execute the udpate DB entry (remove biblioitems.marc), execute the script to delete records. You should get the same number of records deleted. --- misc/cronjobs/delete_records_via_leader.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/delete_records_via_leader.pl b/misc/cronjobs/delete_records_via_leader.pl index b262ded..95e8907 100755 --- a/misc/cronjobs/delete_records_via_leader.pl +++ b/misc/cronjobs/delete_records_via_leader.pl @@ -69,8 +69,9 @@ This script has the following parameters : } my $schema = Koha::Database->new()->schema(); -my @biblioitems = - $schema->resultset('Biblioitem')->search( { marc => { LIKE => '_____d%' } } ); +my @biblioitems = # Should be replaced by a call to C4::Search on zebra index + # Record-status when bug 15537 will be pushed + $schema->resultset('Biblioitem')->search( { marcxml => { LIKE => '_____d%' } } ); my $total_records_count = @biblioitems; my $deleted_records_count = 0; -- 2.8.1