Bugzilla – Attachment 66498 Details for
Bug 18389
Allow using MARC modification templates in bulkmarcimport.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Added error if there are multiple MARC templates with the same name.
Added-error-if-there-are-multiple-MARC-templates-w.patch (text/plain), 1.55 KB, created by
Katrin Fischer
on 2017-08-26 22:05:43 UTC
(
hide
)
Description:
Added error if there are multiple MARC templates with the same name.
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-08-26 22:05:43 UTC
Size:
1.55 KB
patch
obsolete
>From ba4d85cfe8d502cd60feab9d0d664b2da4dbb29e Mon Sep 17 00:00:00 2001 >From: Jon Knight <J.P.Knight@lboro.ac.uk> >Date: Wed, 23 Aug 2017 09:03:38 +0000 >Subject: [PATCH] Added error if there are multiple MARC templates with the > same name. > >https://bugs.koha-community.org/show_bug.cgi?id=18389 >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > misc/migration_tools/bulkmarcimport.pl | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index f71d885..e444558 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -122,13 +122,19 @@ if(defined $localcust) { #local customize module > if($marc_mod_template ne '') { > my @templates = GetModificationTemplates(); > foreach my $this_template (@templates) { >- if($this_template->{'name'} eq $marc_mod_template) { >- $marc_mod_template_id = $this_template->{'template_id'}; >- last; >- } >+ if($this_template->{'name'} eq $marc_mod_template) { >+ if($marc_mod_template_id < 0) { >+ $marc_mod_template_id = $this_template->{'template_id'}; >+ } else { >+ print "WARNING: MARC modification template name " . >+ "'$marc_mod_template' matches multiple templates. " . >+ "Please rename these templates\n"; >+ exit 1; >+ } >+ } > } > if($marc_mod_template_id < 0) { >- die "Can't located MARC modification template '$marc_mod_template'\n"; >+ die "Can't located MARC modification template '$marc_mod_template'\n"; > } > } > >-- >2.7.4
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 18389
:
61907
|
63353
|
63469
|
63851
|
66144
|
66379
|
66498
|
68587
|
68588
|
68589
|
68590
|
68591
|
68592