Bugzilla – Attachment 49333 Details for
Bug 16010
merge_authorities migration script is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 16010: follow-up of 15381 - FIX merge_authorities migration script
PASSED-QA-Bug-16010-follow-up-of-15381---FIX-merge.patch (text/plain), 1.93 KB, created by
Katrin Fischer
on 2016-03-20 16:11:51 UTC
(
hide
)
Description:
[PASSED QA] Bug 16010: follow-up of 15381 - FIX merge_authorities migration script
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-03-20 16:11:51 UTC
Size:
1.93 KB
patch
obsolete
>From 5e1527a2a37ccb464621ba6d7c11ee7afe93d468 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 9 Mar 2016 08:20:04 +0000 >Subject: [PATCH] [PASSED QA] Bug 16010: follow-up of 15381 - FIX > merge_authorities migration script >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Caused by commit 7e70202d34d75f988fbaea9b911347417c203aac > Bug 15381: Remove GetAuthType and GetAuthTypeCode > >If you execute perl misc/migration_tools/merge_authority.pl -f 1 -t 2 >you will get: >Can't locate object method "authtypecode" via package "1" (perhaps you forgot to load "1"?) > at misc/migration_tools/merge_authority.pl line 58. > >GetAuthority does not return a Koha::Authority but a MARC::Record: >there is no authtype code method! > >Test plan: >perl misc/migration_tools/merge_authority.pl -f X -t Y >Should not return any error. >Note that if the authid X or Y does not exist, the script will die. > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > misc/migration_tools/merge_authority.pl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/misc/migration_tools/merge_authority.pl b/misc/migration_tools/merge_authority.pl >index 87a02f9..405b66a 100755 >--- a/misc/migration_tools/merge_authority.pl >+++ b/misc/migration_tools/merge_authority.pl >@@ -55,8 +55,11 @@ $|=1; # flushes output > my $authfrom = GetAuthority($mergefrom); > my $authto = GetAuthority($mergeto); > >-my $authtypecodefrom = $mergefrom->authtypecode; >-my $authtypecodeto = $mergeto->authtypecode; >+die "Authority $mergefrom does not exist" unless $authfrom; >+die "Authority $mergeto does not exist" unless $authto; >+ >+my $authtypecodefrom = Koha::Authorities->find($mergefrom)->authtypecode; >+my $authtypecodeto = Koha::Authorities->find($mergeto)->authtypecode; > > unless ($noconfirm || $batch) { > print "************\n"; >-- >1.9.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 16010
:
48834
|
48922
| 49333