Bugzilla – Attachment 23754 Details for
Bug 11412
Bulkmarcimport can crash when searching for duplicates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11412: Bulkmarcimport can crash when searching for duplicates in authorities
Bug-11412-Bulkmarcimport-can-crash-when-searching-.patch (text/plain), 1.68 KB, created by
Chris Cormack
on 2013-12-22 20:45:48 UTC
(
hide
)
Description:
Bug 11412: Bulkmarcimport can crash when searching for duplicates in authorities
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-12-22 20:45:48 UTC
Size:
1.68 KB
patch
obsolete
>From a7164d6861b6e6f052d19721a70d20e6f6d9fa0c Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Wed, 18 Dec 2013 11:20:05 +0100 >Subject: [PATCH] Bug 11412: Bulkmarcimport can crash when searching for > duplicates in authorities > >bulkmarcimport.pl can crash when searching for duplicates if the 005 field from >the incoming or local record is not defined. This patch fixes it. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Test plan >1/ Create a record with no 005 field >2/ Try to import it checking for duplicates, notice it crashes >3/ Try with a record with a 005 field, but the one in Koha missing >one, still crashes >4/ Apply patch >5/ No more crash >--- > misc/migration_tools/bulkmarcimport.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 9ca7b31..545e818 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -245,7 +245,9 @@ RECORD: while ( ) { > $id = GetRecordId( $marcrecord, $tagid, $subfieldid ); > if ( $authorities && $marcFlavour ) { > #Skip if authority in database is the same as the on in database >- if ( $marcrecord->field('005')->data >= $record->field('005')->data ) { >+ if ( $marcrecord->field('005') && $record->field('005') && >+ $marcrecord->field('005')->data && $record->field('005')->data && >+ $marcrecord->field('005')->data >= $record->field('005')->data ) { > if ($yamlfile) { > $yamlhash->{$originalid}->{'authid'} = $id; > >-- >1.8.3.2
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 11412
:
23620
|
23621
|
23754
|
23819