Bugzilla – Attachment 124427 Details for
Bug 21469
Account for 'MarcOrgCode' preference in 'Enhanced Analytics Workflow'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21469: Add 003 into 773$w when required
Bug-21469-Add-003-into-773w-when-required.patch (text/plain), 1.86 KB, created by
Martin Renvoize (ashimema)
on 2021-09-02 11:20:41 UTC
(
hide
)
Description:
Bug 21469: Add 003 into 773$w when required
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-09-02 11:20:41 UTC
Size:
1.86 KB
patch
obsolete
>From 1cce6e447f125cd3012f4614049c5a4916add0ce Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 2 Sep 2021 12:10:19 +0100 >Subject: [PATCH] Bug 21469: Add 003 into 773$w when required > >This patch looks at the MarcOrgCode preference and if present it will >prepend the host 003 data in brackets to the 773$w link field in the >child record. >--- > C4/Biblio.pm | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index ebebe415c8..32259ac687 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -3000,7 +3000,8 @@ sub ModBiblioMarc { > > =head2 prepare_host_field > >-$marcfield = prepare_host_field( $hostbiblioitem, $marcflavour ); >+ $marcfield = prepare_host_field( $hostbiblioitem, $marcflavour ); >+ > Generate the host item entry for an analytic child entry > > =cut >@@ -3015,6 +3016,11 @@ sub prepare_host_field { > my $field; > my $host_field; > if ( $marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC' ) { >+ my $userenv = C4::Context->userenv; >+ my $library; >+ if ( $userenv && $userenv->{'branch'} ) { >+ $library = Koha::Libraries->find( $userenv->{'branch'} ); >+ } > if ( $field = $host->field('100') || $host->field('110') || $host->field('11') ) { > my $s = $field->as_string('ab'); > if ($s) { >@@ -3052,7 +3058,12 @@ sub prepare_host_field { > } > } > if ( $field = $host->field('001') ) { >- $sfd{w} = $field->data(),; >+ $sfd{w} = $field->data(); >+ if ( $library->get_effective_marcorgcode ) { >+ if ( $field = $host->field('003') ) { >+ $sft{w} = "(" . $field->data() . ")" . $sft{w}; >+ } >+ } > } > $host_field = MARC::Field->new( 773, '0', ' ', %sfd ); > return $host_field; >-- >2.20.1
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 21469
:
124426
|
124427
|
168272