Bugzilla – Attachment 128335 Details for
Bug 29654
Add option to bulkmarimport.pl for matching on original id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29654 - Add match_record_id option to bulkmarimport.pl
Bug-29654---Add-matchrecordid-option-to-bulkmarimp.patch (text/plain), 1.74 KB, created by
David Gustafsson
on 2021-12-07 23:09:47 UTC
(
hide
)
Description:
Bug 29654 - Add match_record_id option to bulkmarimport.pl
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2021-12-07 23:09:47 UTC
Size:
1.74 KB
patch
obsolete
>From eac0b133def6d38c2d0fe951aec125e7a763e109 Mon Sep 17 00:00:00 2001 >From: David Gustafsson <glasklas@gmail.com> >Date: Fri, 5 Nov 2021 15:05:26 +0100 >Subject: [PATCH] Bug 29654 - Add match_record_id option to bulkmarimport.pl > >--- > misc/migration_tools/bulkmarcimport.pl | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index a3be3bf5f8..9a43a412b5 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -57,6 +57,7 @@ my $biblios; > my $authorities; > my $keepids; > my $match; >+my $match_record_id; > my $isbn_check; > my $logfile; > my $insert; >@@ -100,6 +101,7 @@ GetOptions( > 'update' => \$update, > 'all' => \$all, > 'match=s@' => \$match, >+ 'match_record_id' => \$match_record_id, > 'i|isbn' => \$isbn_check, > 'x:s' => \$sourcetag, > 'y:s' => \$sourcesubfield, >@@ -423,6 +425,10 @@ RECORD: foreach my $record (@{$marc_records}) { > } > } > >+ if ($match_record_id && !$matched_record_id && $originalid) { >+ $matched_record_id = $originalid; >+ } >+ > foreach my $stringfilter (@$filters) { > if (length($stringfilter) == 3) { > foreach my $field ($record->field($stringfilter)) { >@@ -900,6 +906,11 @@ from LOC or BNF. useless for biblios probably) > I<FIELD> matchindex,fieldtomatch matchpoint to use to deduplicate fieldtomatch > can be either 001 to 999 or field and list of subfields as such 100abcde > >+=item B<-match_record_id> >+ >+Assume incoming record original id will match record in Koha. For example useful when importing >+previously exported records. >+ > =item B<-i,-isbn> > > If set, a search will be done on isbn, and, if the same isbn is found, the >-- >2.20.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 29654
:
128335
|
128365
|
128575