Bugzilla – Attachment 60605 Details for
Bug 9988
Leave larger authority merges to merge_authorities cronjob (pref AuthorityMergeLimit)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9988: Fix a small last minute bug in merge
Bug-9988-Fix-a-small-last-minute-bug-in-merge.patch (text/plain), 1.92 KB, created by
Marcel de Rooy
on 2017-02-23 12:16:15 UTC
(
hide
)
Description:
Bug 9988: Fix a small last minute bug in merge
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-02-23 12:16:15 UTC
Size:
1.92 KB
patch
obsolete
>From e4619bebe79637565cb4245333cb8d129f45f9e5 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 23 Feb 2017 11:53:44 +0100 >Subject: [PATCH] Bug 9988: Fix a small last minute bug in merge >Content-Type: text/plain; charset=utf-8 > >When you postpone an 'authtype crossing' authority merge from A to B, >the record for A will be deleted. In that case the condition for tags_new >in sub merge does not work well. We should allow an empty authtypefrom >here in order to get a new field belonging to authority B. >Simply put, if we go from PERSO to CORPO, all linked records should go >from X00 to X10 etc. > >Test plan: >[1] Run Merge.t >[2] Select two authorities of different type with linked records. >[3] Set AuthorityMergeLimit to zero. And merge both auth records. > Note: Do not select Default. See also bug 17380. >[4] Run the cron job and check the linked records (especially the ones > that were linked to the deleted record). > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/AuthoritiesMarc.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index c196883..c2609a9 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1443,7 +1443,7 @@ sub merge { > my $sql = "SELECT DISTINCT tagfield FROM marc_subfield_structure WHERE authtypecode=?"; > my $tags_using_authtype = $authtypefrom ? $dbh->selectcol_arrayref( $sql, undef, ( $authtypefrom->authtypecode )) : $dbh->selectcol_arrayref( "SELECT DISTINCT tagfield FROM marc_subfield_structure WHERE authtypecode IS NOT NULL AND authtypecode<>''" ); > my $tags_new; >- if( $authtypefrom && $authtypeto && $authtypeto->authtypecode ne $authtypefrom->authtypecode ) { >+ if( $authtypeto && ( !$authtypefrom || $authtypeto->authtypecode ne $authtypefrom->authtypecode )) { > $tags_new = $dbh->selectcol_arrayref( $sql, undef, ( $authtypeto->authtypecode )); > } > >-- >2.1.4
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 9988
:
59158
|
59159
|
60256
|
60257
|
60258
|
60259
|
60594
|
60595
|
60596
|
60597
|
60598
|
60599
|
60600
|
60601
|
60602
|
60603
|
60604
|
60605
|
60606
|
60607
|
60668
|
60669
|
60670
|
60671
|
60672
|
60673
|
60674
|
60675
|
61306
|
61307
|
61308
|
61309
|
61779
|
61780
|
61781
|
61782
|
61783
|
61784
|
61785
|
61786
|
61787
|
61788
|
61789
|
61790
|
61791
|
61792
|
61890
|
61891
|
61892
|
61893
|
61894
|
61895
|
61897
|
61898
|
61899
|
61900
|
61901
|
61902
|
61903
|
61904
|
61912
|
61913
|
61914
|
61915
|
61916
|
61917
|
61918
|
61919
|
61920
|
61921
|
61922
|
61923
|
61924
|
61925
|
62055
|
62123
|
62124
|
62125
|
62126
|
62127
|
62128
|
62129
|
62130
|
62131
|
62132
|
62133
|
62134
|
62135
|
62136
|
62137