Bugzilla – Attachment 25884 Details for
Bug 11797
auth_finder.pl: Odd number of elements in anonymous hash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11797 - Odd number of elements in hash
Bug-11797---Odd-number-of-elements-in-hash.patch (text/plain), 2.33 KB, created by
Mark Tompsett
on 2014-03-06 07:12:53 UTC
(
hide
)
Description:
Bug 11797 - Odd number of elements in hash
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-03-06 07:12:53 UTC
Size:
2.33 KB
patch
obsolete
>From 6b8b8f798e70c2638a8e7f0ca6b292efda09f131 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 6 Mar 2014 01:29:39 -0500 >Subject: [PATCH] Bug 11797 - Odd number of elements in hash > >This was discovered when someone triggered an authority search >on an authority record that was missing what is assumed the >default subfield for a given field. > >It, however, also can be triggered in an OPAC authority search >by looking at the record that lacks the default subfield for a >given field. > >TEST PLAN >--------- >1) Create an authority record with 180$x and NOT 180$v. > See C4::AuthoritiesMarc::BuildSummary in the 1.. foreach loop > for known tags and default values. The default subfields are > the first letter of the $subfields_to_report string. >2) Trigger the bug: > Method 1: /cgi-bin/koha/opac-authoritiesdetail.pl?authid=# > Where # is the authority id of your tweaked record. > The error occurs in Normal view. > Method 2: Home -> Cataloging -> + New record > -> Click the 'Tag Editor' on 100$a > Editing of $a to $b and back may be required. >3) Notice there is an error log entry. >4) Apply the patch >5) Attempt to trigger the bug again >6) That specific error log entry is not generated. >--- > C4/AuthoritiesMarc.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index ee4a349..9409853 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1044,15 +1044,17 @@ sub BuildSummary { > $subfields_to_report = 'vxyz'; > } > if ($subfields_to_report) { >+ my $hemain = $field->subfield( substr($subfields_to_report, 0, 1) ); > push @authorized, { > heading => $field->as_string($subfields_to_report), >- hemain => $field->subfield( substr($subfields_to_report, 0, 1) ), >+ hemain => $hemain, > field => $tag, > }; > } else { >+ my $hemain = $field->subfield( 'a' ); > push @authorized, { > heading => $field->as_string(), >- hemain => $field->subfield('a'), >+ hemain => $hemain, > field => $tag, > }; > } >-- >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 11797
:
25478
|
25882
|
25884
|
27077
|
27120
|
27133
|
27134