From 3ebac058420c8c022d19c52dc6155d4963eba722 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 29 Jul 2014 13:55:44 -0300 Subject: [PATCH] [PASSED QA] Bug 12672: GetMarcISBN should return the corresponding subfield The current GetMarcISBN implementation returns an array of ISBN in which all subfields of a ISBN field occurence are appended. For example, in MARC21, if you have $a and $c defined, they will be appended for output. This happens for $z. To reproduce: - Run the regression tests attached to this bug. To test: - Apply the patch, regression tests pass. - Sign off Signed-off-by: Bernardo Gonzalez Kriegel Now test pass, no koha-qa errors Signed-off-by: Katrin Fischer --- C4/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index f5903f3..78e2bad 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1711,7 +1711,7 @@ sub GetMarcISBN { my @marcisbns; foreach my $field ( $record->field($scope) ) { - my $isbn = $field->as_string(); + my $isbn = $field->subfield( 'a' ); if ( $isbn ne "" ) { push @marcisbns, $isbn; } -- 1.9.1