Bugzilla – Attachment 20101 Details for
Bug 5202
Merge authority records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5202 QA follow-up 2: fix overeager error message
Bug-5202-QA-follow-up-2-fix-overeager-error-messag.patch (text/plain), 3.14 KB, created by
Jared Camins-Esakov
on 2013-08-04 14:17:40 UTC
(
hide
)
Description:
Bug 5202 QA follow-up 2: fix overeager error message
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2013-08-04 14:17:40 UTC
Size:
3.14 KB
patch
obsolete
>From 82f3fbed7955f5a553b714ae8e38b30a37dbecb5 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sun, 4 Aug 2013 10:15:14 -0400 >Subject: [PATCH] Bug 5202 QA follow-up 2: fix overeager error message > >When rebasing the patch for this, I accidentally moved the line >setting the mergereference when merging from breeding to *before* >I checked whether we were merging from breeding. Needless to say, >this caused problems. This patch fixes that, and: >* Makes the error translatable. >* Adds a missing authtypesloop argument for the template. >--- > authorities/merge.pl | 23 ++++++++++++++++++-- > .../prog/en/modules/authorities/merge.tt | 2 ++ > 2 files changed, 23 insertions(+), 2 deletions(-) > >diff --git a/authorities/merge.pl b/authorities/merge.pl >index 3d4b881..0c7a7ea 100755 >--- a/authorities/merge.pl >+++ b/authorities/merge.pl >@@ -96,7 +96,6 @@ else { > > if ($mergereference eq 'breeding') { > $recordObj2 = Koha::Authority->get_from_breeding($authid[1]) || Koha::Authority->new(); >- $mergereference = $authid[0]; > } else { > $recordObj2 = Koha::Authority->get_from_authid($authid[1]) || Koha::Authority->new(); > } >@@ -106,11 +105,14 @@ else { > my $framework; > if ( $recordObj1->authtype ne $recordObj2->authtype && $mergereference ne 'breeding' ) { > $framework = $input->param('frameworkcode') >- or push @errors, "Framework not selected."; >+ or push @errors, { code => 'FRAMEWORK_NOT_SELECTED' }; > } > else { > $framework = $recordObj1->authtype; > } >+ if ($mergereference eq 'breeding') { >+ $mergereference = $authid[0]; >+ } > > # Getting MARC Structure > my $tagslib = GetTagsLabels( 1, $framework ); >@@ -173,6 +175,23 @@ else { > } > } > >+my $authtypes = getauthtypes; >+my @authtypesloop; >+foreach my $thisauthtype ( >+ sort { >+ $authtypes->{$a}{'authtypetext'} cmp $authtypes->{$b}{'authtypetext'} >+ } >+ keys %$authtypes >+ ) >+{ >+ my %row = ( >+ value => $thisauthtype, >+ authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, >+ ); >+ push @authtypesloop, \%row; >+} >+$template->{VARS}->{authtypesloop} = \@authtypesloop; >+ > if (@errors) { > > # Errors >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt >index d201a22..e8a41f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt >@@ -54,6 +54,8 @@ function changeFramework(fw) { > > [% IF error.code == 'CANNOT_MOVE' %] > The following items could not be moved from the old record to the new one: [% error.value %] >+ [% ELSIF error.code == 'FRAMEWORK_NOT_SELECTED' %] >+ No framework has been selected. Please select a framework for merging. > [% ELSE %] > [% error %] > [% END %] >-- >1.7.9.5
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 5202
:
18443
|
18514
|
18516
|
18532
|
19436
|
19634
|
19891
|
19892
|
20099
|
20100
|
20101
|
20440
|
20441
|
20442
|
20443
|
20444
|
20445
|
20446
|
20447
|
20448
|
20449