From b826b89d019ae2e74766400eb1f7d39c16252eef 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..618bf5254c 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' ) || ''; + my $pubyear = $pubyear_210 || $pubyear_214; + $publisher = $record->subfield( '210', 'c' ) || $record->subfield( '214', 'c' ) || ''; $isbn = $record->subfield( '010', 'a' ) || ''; $issn = $record->subfield( '011', 'a' ) || ''; } else { -- 2.30.2