Bugzilla – Attachment 49894 Details for
Bug 16191
t/Ris.t is noisy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16191: t/Ris.t is noisy
Bug-16191-tRist-is-noisy.patch (text/plain), 1.78 KB, created by
Jonathan Druart
on 2016-04-05 06:52:35 UTC
(
hide
)
Description:
Bug 16191: t/Ris.t is noisy
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-04-05 06:52:35 UTC
Size:
1.78 KB
patch
obsolete
>From 5e5575913e5fa1c54f209ecd9d1deae189bb7222 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 1 Apr 2016 17:59:29 -0400 >Subject: [PATCH] Bug 16191: t/Ris.t is noisy >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >TEST PLAN >--------- >1) prove t/Ris.t > -- very noisy >2) apply patch >3) prove t/Ris.t > -- just one confusing noise. >4) run koha qa test tools > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Ris.pm | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > >diff --git a/C4/Ris.pm b/C4/Ris.pm >index a1db07f..ec3159f 100644 >--- a/C4/Ris.pm >+++ b/C4/Ris.pm >@@ -388,7 +388,8 @@ sub print_typetag { > ); > > ## The type of a MARC record is found at position 06 of the leader >- my $typeofrecord = substr($leader, 6, 1); >+ my $typeofrecord = defined($leader) && length $leader >=6 ? >+ substr($leader, 6, 1): undef; > > ## ToDo: for books, field 008 positions 24-27 might have a few more > ## hints >@@ -396,7 +397,11 @@ sub print_typetag { > my %typehash; > > ## the ukmarc here is just a guess >- if ($intype eq "marc21" || $intype eq "ukmarc") { >+ if (! defined $intype) { >+ ## assume MARC21 as default >+ %typehash = %ustypehash; >+ } >+ elsif ($intype eq "marc21" || $intype eq "ukmarc") { > %typehash = %ustypehash; > } > elsif ($intype eq "unimarc") { >@@ -407,7 +412,7 @@ sub print_typetag { > %typehash = %ustypehash; > } > >- if (!exists $typehash{$typeofrecord}) { >+ if (!defined $typeofrecord || !exists $typehash{$typeofrecord}) { > print "TY - BOOK\r\n"; ## most reasonable default > warn ("no type found - assume BOOK") if $marcprint; > } >-- >2.7.0
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 16191
:
49814
|
49815
| 49894