Bugzilla – Attachment 183192 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.90 KB, created by
Marcel de Rooy
on 2025-06-12 09:17:37 UTC
(
hide
)
Description:
Bug 40119: Merge should not leave empty 6XX subfield $2 (MARC 21)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-06-12 09:17:37 UTC
Size:
1.90 KB
patch
obsolete
>From 8722923c22d372c69595a868ae05ae2cdee8e4be 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) >Content-Type: text/plain; charset=utf-8 > >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> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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