Bugzilla – Attachment 158122 Details for
Bug 35203
Koha::Biblio->get_coins support 214 field in addition to 210 (pubyear and publisher values) (UNIMARC)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35203: Add 214 field for pubyear and publisher values
Bug-35203-Add-214-field-for-pubyear-and-publisher-.patch (text/plain), 1.34 KB, created by
Thibaud Guillot (thibaud_g)
on 2023-10-31 14:13:10 UTC
(
hide
)
Description:
Bug 35203: Add 214 field for pubyear and publisher values
Filename:
MIME Type:
Creator:
Thibaud Guillot (thibaud_g)
Created:
2023-10-31 14:13:10 UTC
Size:
1.34 KB
patch
obsolete
>From b826b89d019ae2e74766400eb1f7d39c16252eef Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35203
:
158122
|
158874