Bugzilla – Attachment 110448 Details for
Bug 26231
bulkmarcimport.pl does not import authority if it already has a 001 field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26231: Remove incorrect use of AddAuthority() when 001 present
Bug-26231-Remove-incorrect-use-of-AddAuthority-whe.patch (text/plain), 1.97 KB, created by
Kyle M Hall (khall)
on 2020-09-21 10:49:14 UTC
(
hide
)
Description:
Bug 26231: Remove incorrect use of AddAuthority() when 001 present
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-09-21 10:49:14 UTC
Size:
1.97 KB
patch
obsolete
>From 0f3d85b2f691c2124fae9690b8c7de5927871afc Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 18 Aug 2020 12:20:32 +1000 >Subject: [PATCH] Bug 26231: Remove incorrect use of AddAuthority() when 001 > present > >This patch removes the use of AddAuthority with a non-empty >authid argument, since that triggers an update rather than an insert. > >In practice, the update also fails, but the error isn't raised, >as the database connection doesn't have RaiseError set. > >Test plan: >1) Do not apply patch >2) Try to bulkmarcimport an authority file with a 001 >3) Observe that the script reports success but no authority is added >4) Apply the path >5) Try to bulkmarcimport an authority file with a 001 >6) Observe that the script reports success and the authority is added > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > misc/migration_tools/bulkmarcimport.pl | 11 ----------- > 1 file changed, 11 deletions(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 1c81f35e4c..80d3396cad 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -397,17 +397,6 @@ RECORD: while ( ) { > printlog({id=>$originalid||$id||$authid, op=>"edit",status=>"ok"}) if ($logfile); > } > } >- elsif (defined $authid) { >- ## An authid is defined but no authority in database : add >- eval { ( $authid ) = AddAuthority($record,$authid, $authtypecode) }; >- if ($@){ >- warn "Problem with authority $authid Cannot Add ".$@; >- printlog({id=>$originalid||$id||$authid, op=>"insert",status=>"ERROR"}) if ($logfile); >- } >- else{ >- printlog({id=>$originalid||$id||$authid, op=>"insert",status=>"ok"}) if ($logfile); >- } >- } > else { > ## True insert in database > eval { ( $authid ) = AddAuthority($record,"", $authtypecode) }; >-- >2.24.1 (Apple Git-126)
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 26231
:
108431
|
110448
|
110761