Bugzilla – Attachment 54847 Details for
Bug 10455
remove redundant 'biblioitems.marc' field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10455: Remove biblioitems.marc - update delete_records_via_leader.pl
Bug-10455-Remove-biblioitemsmarc---update-deletere.patch (text/plain), 1.71 KB, created by
Jonathan Druart
on 2016-08-25 09:30:35 UTC
(
hide
)
Description:
Bug 10455: Remove biblioitems.marc - update delete_records_via_leader.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-25 09:30:35 UTC
Size:
1.71 KB
patch
obsolete
>From 9c491c14c5329f5d5c1531868d62255e6bc2bb2c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 => '<leader>_____d%' } } ); > > my $total_records_count = @biblioitems; > my $deleted_records_count = 0; >-- >2.8.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10455
:
54844
|
54845
|
54846
|
54847
|
54849
|
54850
|
54855
|
54856
|
54857
|
54858
|
54859
|
54860
|
54875
|
54881
|
55401
|
55402
|
55403
|
55404
|
55405
|
55406
|
55407
|
55408
|
55409
|
55410
|
55844
|
55845
|
55846
|
55847
|
55848
|
55849
|
55850
|
55851
|
55852
|
55853