Bugzilla – Attachment 181978 Details for
Bug 37364
Improve creation of 773 fields for item bundles regarding MARC21 245 and 264
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37364: Add requested RDA handling to generate_marc_host_field
Bug-37364-Add-requested-RDA-handling-to-generatema.patch (text/plain), 1.94 KB, created by
Martin Renvoize (ashimema)
on 2025-05-06 14:13:13 UTC
(
hide
)
Description:
Bug 37364: Add requested RDA handling to generate_marc_host_field
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-06 14:13:13 UTC
Size:
1.94 KB
patch
obsolete
>From f38a92fc672a9d414012b28a3d3eb5137b59310b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 17 Jul 2024 09:43:52 +0100 >Subject: [PATCH] Bug 37364: Add requested RDA handling to > generate_marc_host_field > >This patch adds handling for the 264 field in precedence to the 260 for >the generate_marc_host_field method and also adds subfields n and p to >the 245 handling. >--- > Koha/Biblio.pm | 25 ++++++++++++++++++++----- > 1 file changed, 20 insertions(+), 5 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 487500de110..11a7c5fcf27 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -1944,10 +1944,25 @@ sub generate_marc_host_field { > } > > # Publication >- if ( $host_field = $marc_host->field('260') ) { >- my $s = $host_field->as_string('abc'); >- if ($s) { >- $sfd{d} = $s; >+ my @publication_fields = $marc_host->field('264'); >+ @publication_fields = $marc_host->field('260') unless (@publication_fields); >+ my $index = 0; >+ for my $host_field (@publication_fields) { >+ >+ # Use first entry unless we find a preferred indicator1 = 3 >+ if ( $index == 0 ) { >+ my $s = $host_field->as_string('abc'); >+ if ($s) { >+ $sfd{d} = $s; >+ } >+ $index++; >+ } >+ if ( $host_field->indicator(1) && ( $host_field->indicator(1) == 3 ) ) { >+ my $s = $host_field->as_string('abc'); >+ if ($s) { >+ $sfd{d} = $s; >+ } >+ last; > } > } > >@@ -1961,7 +1976,7 @@ sub generate_marc_host_field { > > # Title > if ( $host_field = $marc_host->field('245') ) { >- my $s = $host_field->as_string('ab'); >+ my $s = $host_field->as_string('abnp'); > if ($s) { > $sfd{t} = $s; > } >-- >2.49.0
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 37364
:
169075
|
169076
|
169077
|
181978
|
181979
|
182393
|
182394
|
182398
|
182399