[Koha-bugs] [Bug 29980] Validate ISBN when cataloguing bibliographic records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 4 13:22:46 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29980

--- Comment #18 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Found another thing too:

Look at this piece of code:
my $r = MARC::Record->new;
my $f1 = MARC::Field->new('020','','', a => 'isbn1' );
my $f2 = MARC::Field->new('020','','', a => 'isbn2' );
$r->append_fields( $f1, $f2 );
my $scal = $r->subfield( '020', 'a' );
my @list = $r->subfield( '020', 'a' );
print Dumper( $scal, '-', @list );

It prints:
$VAR1 = 'isbn1';
$VAR2 = '-';
$VAR3 = 'isbn1';

Which means that the following code does not work:
+    my @input_isbns = ( C4::Context->preference('marcflavour') eq "UNIMARC" )
? $record->subfield('010','a') : $record->subfield('020','a');

The @input_isbns will just contain the first ISBN only.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list