Bug 35570: (QA follow-up): Update UNIMARC author to 200$f
Reworked the logic here a bit to ensure the following scenario for UNIMARC: If both title and author exist, the result is: 200$aTitle$fAuthor In the previous logic, it would become: 200$aTitle 200$fAuthor I'm assuming the desired result is the former and not the latter. Test following the same test plan, but try having only author, or only title, and verify that the resulted MARC data is as expected. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
9e65f89443
commit
24b5afb6d6
|
|
@ -1176,26 +1176,17 @@ sub _standard_request2biblio {
|
|||
($record) = MarcToUTF8Record( $record, $marcflavour );
|
||||
}
|
||||
|
||||
if ($isbn) {
|
||||
my $marc_isbn =
|
||||
$marcflavour eq 'MARC21'
|
||||
? MARC::Field->new( '020', '', '', a => $isbn )
|
||||
: MARC::Field->new( '010', '', '', a => $isbn );
|
||||
$record->append_fields($marc_isbn);
|
||||
}
|
||||
if ($author) {
|
||||
my $marc_author =
|
||||
$marcflavour eq 'MARC21'
|
||||
? MARC::Field->new( '100', '1', '', a => $author )
|
||||
: MARC::Field->new( '700', '1', '', a => $author );
|
||||
$record->append_fields($marc_author);
|
||||
}
|
||||
if ($title) {
|
||||
my $marc_title =
|
||||
$marcflavour eq 'MARC21'
|
||||
? MARC::Field->new( '245', '0', '0', a => $title )
|
||||
: MARC::Field->new( '200', '0', '0', a => $title );
|
||||
$record->append_fields($marc_title);
|
||||
my $marc_isbn;
|
||||
my $marc_author;
|
||||
my $marc_title;
|
||||
|
||||
if( $marcflavour eq 'MARC21' ) {
|
||||
$record->append_fields(MARC::Field->new( '020', '', '', a => $isbn )) if $isbn;
|
||||
$record->append_fields(MARC::Field->new( '100', '1', '', a => $author )) if $author;
|
||||
$record->append_fields(MARC::Field->new( '245', '0', '0', a => $title )) if $title;
|
||||
}elsif( $marcflavour eq 'UNIMARC' ) {
|
||||
$record->append_fields(MARC::Field->new( '010', '', '', a => $isbn )) if $isbn;
|
||||
$record->append_fields(MARC::Field->new( '200', '', '', $title ? ( 'a' => $title ) : undef, $author ? ( 'f' => $author ) : undef)) if $author || $title;
|
||||
}
|
||||
|
||||
# Suppress the record
|
||||
|
|
|
|||
Loading…
Reference in New Issue