Bugzilla – Attachment 41112 Details for
Bug 14583
Subfields not deleted when automatically merging authorities.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14583 - Subfields not deleted when automatically merging authorities
Bug-14583---Subfields-not-deleted-when-automatical.patch (text/plain), 1.81 KB, created by
Maxime Beaulieu
on 2015-07-21 19:03:52 UTC
(
hide
)
Description:
Bug 14583 - Subfields not deleted when automatically merging authorities
Filename:
MIME Type:
Creator:
Maxime Beaulieu
Created:
2015-07-21 19:03:52 UTC
Size:
1.81 KB
patch
obsolete
>From 6255dd3c52103d82f5d9199998651a173d9afc50 Mon Sep 17 00:00:00 2001 >From: mxbeaulieu <maxime.beaulieu@inlibro.com> >Date: Tue, 21 Jul 2015 14:14:50 -0400 >Subject: [PATCH] Bug 14583 - Subfields not deleted when automatically merging > authorities > >This problem happens when editing autorities with syspref "dontmerge" enabled. > >Subfield deletion is not reflected in the referencing record. > >How to test: >0) Set the "dontmerge" syspref to "Do" >1) Create a Topical Term authority record. >2) Set values in the 150$a and 150$v subfields. >3) Edit or create a biliographic record and link the authority. >4) Edit the linked authority: > remove the 150$v subfield > add a value in the 150$z sufield >5) Check the authority values in the bibliographic record: > The $v subfield is still there (merge failed) > The $z subfield was added (merge worked) > >6) Apply the patch >7) Edit the linked authority: > remove the 150$z subfield > add a value in the 150$x sufield >8) Check the authority values in the bibliographic record: > The deleted subfields are gone. > >modified: C4/AuthoritiesMarc.pm >--- > C4/AuthoritiesMarc.pm | 5 ----- > 1 file changed, 5 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index f617437..bb390eb 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1530,11 +1530,6 @@ sub merge { > $exclude.= $subfield->[0]; > } > $exclude='['.$exclude.']'; >-# add subfields in $field not included in @record_to >- my @restore= grep {$_->[0]!~/$exclude/} $field->subfields(); >- foreach my $subfield (@restore) { >- $field_to->add_subfields($subfield->[0] =>$subfield->[1]); >- } > $marcrecord->delete_field($field); > $marcrecord->insert_grouped_field($field_to); > $update=1; >-- >1.7.9.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 14583
: 41112