View | Details | Raw Unified | Return to bug 29654
Collapse All | Expand All

(-)a/misc/migration_tools/bulkmarcimport.pl (-2 / +13 lines)
Lines 60-65 my $biblios; Link Here
60
my $authorities;
60
my $authorities;
61
my $keepids;
61
my $keepids;
62
my $match;
62
my $match;
63
my $match_record_id;
63
my $isbn_check;
64
my $isbn_check;
64
my $logfile;
65
my $logfile;
65
my $insert;
66
my $insert;
Lines 105-110 GetOptions( Link Here
105
    'update'              => \$update,
106
    'update'              => \$update,
106
    'all'                 => \$all,
107
    'all'                 => \$all,
107
    'match=s@'            => \$match,
108
    'match=s@'            => \$match,
109
    'match_record_id'     => \$match_record_id,
108
    'i|isbn'              => \$isbn_check,
110
    'i|isbn'              => \$isbn_check,
109
    'x:s'                 => \$sourcetag,
111
    'x:s'                 => \$sourcetag,
110
    'y:s'                 => \$sourcesubfield,
112
    'y:s'                 => \$sourcesubfield,
Lines 448-454 RECORD: while () { Link Here
448
                $logger->debug("No match for: $query");
450
                $logger->debug("No match for: $query");
449
            }
451
            }
450
452
451
            if ( $keepids && $originalid ) {
453
            if ( $keepids && $originalid && $originalid != $matched_record_id ) {
452
                my $storeidfield;
454
                my $storeidfield;
453
                if ( length($keepids) == 3 ) {
455
                if ( length($keepids) == 3 ) {
454
                    $storeidfield = MARC::Field->new( $keepids, $originalid );
456
                    $storeidfield = MARC::Field->new( $keepids, $originalid );
Lines 461-466 RECORD: while () { Link Here
461
            }
463
            }
462
        }
464
        }
463
465
466
        if ( $match_record_id && !$matched_record_id && $originalid ) {
467
            $matched_record_id = $originalid;
468
        }
469
464
        foreach my $stringfilter (@$filters) {
470
        foreach my $stringfilter (@$filters) {
465
            if ( length($stringfilter) == 3 ) {
471
            if ( length($stringfilter) == 3 ) {
466
                foreach my $field ( $record->field($stringfilter) ) {
472
                foreach my $field ( $record->field($stringfilter) ) {
Lines 995-1000 from LOC or BNF. useless for biblios probably) Link Here
995
I<FIELD> matchindex,fieldtomatch matchpoint to use to deduplicate fieldtomatch
1001
I<FIELD> matchindex,fieldtomatch matchpoint to use to deduplicate fieldtomatch
996
can be either 001 to 999 or field and list of subfields as such 100abcde
1002
can be either 001 to 999 or field and list of subfields as such 100abcde
997
1003
1004
=item B<-match_record_id>
1005
1006
Assume incoming record original id is a valid record id in Koha and use this
1007
for updating the Koha record.  For example useful when importing previously
1008
+exported records.
1009
998
=item B<-i, --isbn>
1010
=item B<-i, --isbn>
999
1011
1000
If set, a search will be done on isbn, and, if the same isbn is found, the
1012
If set, a search will be done on isbn, and, if the same isbn is found, the
1001
- 

Return to bug 29654