From 7d9c554b5fbdd89f4bd66ea9f12b9b29c06b2db2 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 29 Jul 2014 13:55:44 -0300 Subject: [PATCH] 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 Signed-off-by: Tomas Cohen Arazi --- C4/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index f5903f362e..78e2bad69f 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; } -- 2.39.5