Bugzilla – Attachment 183175 Details for
Bug 40119
Merge should not leave empty 6XX subfield $2 (MARC 21)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40119: Merge should not leave empty 6XX subfield $2 (MARC 21)
Bug-40119-Merge-should-not-leave-empty-6XX-subfiel.patch (text/plain), 1.81 KB, created by
Roman Dolny
on 2025-06-11 18:21:24 UTC
(
hide
)
Description:
Bug 40119: Merge should not leave empty 6XX subfield $2 (MARC 21)
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2025-06-11 18:21:24 UTC
Size:
1.81 KB
patch
obsolete
>From a4ed27ac9bece4c7439e0d62f62c5a5c88d219e3 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 11 Jun 2025 14:14:25 +0000 >Subject: [PATCH] Bug 40119: Merge should not leave empty 6XX subfield $2 (MARC > 21) > >Currently, when removing 040 $f from authority record with 008/11 = >'z' (MARC 21), merge function removes the content of $2 subfield in >linked 6XX fields, leaving the 6XX $2 subfield empty. This is not >correct. We should not have empty subfields in a MARC record. > >Instead, the old content of the $2 subfield should be retained (if >auth 008/11 is still = 'z'). > >Test plan: >========== >1. Have an authority record with 008/11 = 'z' and 040 $f = 'whatever'. >2. Link the record to a bibliographic 6XX. >3. Edit the authority record, removing 040 $f. >4. Go to bibliographic record and in modal "MARC preview" from Normal > view notice that 6XX $2 exists but is empty. This is wrong. >5. Apply the patch ; restart all. >6. Repeat p. 1.-4. Note that the content of 6XX $2 has not been > removed. > >Sponsored-by: Ignatianum University in Cracow >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > C4/AuthoritiesMarc.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index ab62a5d962..4cbed9e95d 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1750,7 +1750,9 @@ sub merge { > if ( defined $controlled_ind->{sub2} ) { > > # Add or replace >- $field_to->update( 2 => $controlled_ind->{sub2} ); >+ if ( $controlled_ind->{sub2} ne q{} ) { >+ $field_to->update( 2 => $controlled_ind->{sub2} ); >+ } > } else { > > # Key alerts us here to remove $2 >-- >2.39.5
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 40119
:
183165
|
183166
|
183175
|
183176
|
183192
|
183193
|
183194