From 898a0c8f5091c5f72044dfed97db7f7d43f1fb73 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 7 Nov 2019 16:36:31 +0000 Subject: [PATCH] Bug 23986: Remove sort from batch bib deletion After lots and lots fo digging, I removed the sort from this loop. Somehow, this allows the ES records to be deleted. I do not understand this patch, but it works. Possibly we need to sort the error arrays after the fact To test: 1 - Have or create a bib 2 - Go to Tools->Batch record deletion 3 - Click 'Enter a list of record numbers' 4 - Enter the biblionumber' 5 - Confirm deletion 6 - Search for the record, it still appears 7 - Apply patch, restart all the things 8 - Repeat 1-6 9 - This time the record is deleted --- tools/batch_delete_records.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl index 1f0e56a45e..2202aff98e 100755 --- a/tools/batch_delete_records.pl +++ b/tools/batch_delete_records.pl @@ -132,7 +132,7 @@ if ( $op eq 'form' ) { total_records => 0, total_success => 0, }; - RECORD_IDS: for my $record_id ( sort { $a <=> $b } @record_ids ) { + RECORD_IDS: for my $record_id ( @record_ids ) { $report->{total_records}++; next unless $record_id; $schema->storage->txn_begin; -- 2.11.0