From 47996d614ef691cf86659ca85cd815d06c2e4cbb Mon Sep 17 00:00:00 2001 From: Thibaud Guillot Date: Tue, 31 Oct 2023 15:09:54 +0100 Subject: [PATCH] Bug 35203: Add 214 field for pubyear and publisher values Obtain values for field 214 in addition to field 210 --- Koha/Biblio.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 406031fb9f..4390e867eb 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -929,10 +929,18 @@ sub get_coins { $title = $record->subfield( '200', 'a' ); my $subfield_210d = $record->subfield('210', 'd'); + my $pubyear_210; + my $pubyear_214; + if ($subfield_210d and $subfield_210d =~ /(\d{4})/) { - $pubyear = $1; + $pubyear_210 = $1; + } + my $subfield_214d = $record->subfield('214', 'd'); + if ($subfield_214d and $subfield_214d =~ /(\d{4})/) { + $pubyear_214 = $1; } - $publisher = $record->subfield( '210', 'c' ) || ''; + $pubyear = $pubyear_214 || $pubyear_210; + $publisher = $record->subfield( '214', 'c' ) || $record->subfield( '210', 'c' ) || ''; $isbn = $record->subfield( '010', 'a' ) || ''; $issn = $record->subfield( '011', 'a' ) || ''; } else { -- 2.30.2