Browse Source

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 <bgkriegel@gmail.com>

Now test pass, no koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
MM-OPAC/theme_dep
Tomás Cohen Arazi 10 years ago
parent
commit
7d9c554b5f
  1. 2
      C4/Biblio.pm

2
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;
}

Loading…
Cancel
Save