Bugzilla – Attachment 190984 Details for
Bug 22972
Proposal for enriching the bibliographic records with standard identifiers from authority data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22972: Support 'subfield_to_report_in_1' when merging authorities
9da74b3.patch (text/plain), 1.50 KB, created by
Julian Maurice
on 2026-01-07 12:16:14 UTC
(
hide
)
Description:
Bug 22972: Support 'subfield_to_report_in_1' when merging authorities
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2026-01-07 12:16:14 UTC
Size:
1.50 KB
patch
obsolete
>From 9da74b3fb7373e685c0cf8d4e723d49824bb1074 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 7 Jan 2026 12:14:21 +0000 >Subject: [PATCH] Bug 22972: Support 'subfield_to_report_in_1' when merging > authorities > >--- > C4/AuthoritiesMarc.pm | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index f0fe2c1325a..050c00d36bd 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1613,6 +1613,7 @@ sub merge { > $authtypefrom = Koha::Authority::Types->find( $authfrom->authtypecode ) if $authfrom; > my $auth_tag_to_report_from = $authtypefrom ? $authtypefrom->auth_tag_to_report : ''; > my $auth_tag_to_report_to = $authtypeto ? $authtypeto->auth_tag_to_report : ''; >+ my $subfield_to_report_in_1 = $authtypeto ? $authtypeto->subfield_to_report_in_1 : ''; > > my @record_to; > >@@ -1635,6 +1636,16 @@ sub merge { > @record_to = $chosen_field->subfields(); > } > >+ if ($subfield_to_report_in_1 && $MARCto) { >+ my ( $tag, $code ) = split /\$/, $subfield_to_report_in_1; >+ >+ foreach my $field ( $MARCto->field($tag) ) { >+ foreach my $subfield ( $field->subfield($code) ) { >+ push @record_to, ['1', $subfield]; >+ } >+ } >+ } >+ > # Exceptional: If MARCto and authtypeto exist but $auth_tag_to_report_to > # is empty, make sure that $9 and $a remain (instead of clearing the > # reference) in order to allow for data recovery. >-- >2.47.3 >
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 22972
:
155890
|
155891
|
155892
|
170443
|
170444
|
170445
| 190984