Bugzilla – Attachment 60607 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: Final polishing
Bug-9988-Final-polishing.patch (text/plain), 2.76 KB, created by
Marcel de Rooy
on 2017-02-23 12:16:23 UTC
(
hide
)
Description:
Bug 9988: Final polishing
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-02-23 12:16:23 UTC
Size:
2.76 KB
patch
obsolete
>From e5314d80f04c9469d2a60c3e9513ffec4a51d1c6 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 23 Feb 2017 12:46:52 +0100 >Subject: [PATCH] Bug 9988: Final polishing >Content-Type: text/plain; charset=utf-8 > >[1] DelAuthority: There is actually no need to call GetAuthority in > this routine. The subfields of the old record are not relevant > when removing all references in the linked biblio records. >[2] Added a few POD lines to merge. >[3] Removed a trailing space in a comment line in merge. > >Test plan: >[1] Run Merge.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/AuthoritiesMarc.pm | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index c2609a9..d22093f 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -692,7 +692,7 @@ Deletes $authid and calls merge to cleanup in linked biblio records > sub DelAuthority { > my ($authid) = @_; > my $dbh=C4::Context->dbh; >- merge({ mergefrom => $authid, MARCfrom => GetAuthority($authid) }); >+ merge({ mergefrom => $authid }); > $dbh->do( "DELETE FROM auth_header WHERE authid=?", undef, $authid ); > logaction( "AUTHORITIES", "DELETE", $authid, "authority" ) if C4::Context->preference("AuthoritiesLog"); > ModZebra( $authid, "recordDelete", "authorityserver", undef); >@@ -1370,7 +1370,7 @@ sub AddAuthorityTrees{ > > $count = merge({ > mergefrom => mergefrom, >- MARCfrom => $MARCfrom, >+ [ MARCfrom => $MARCfrom, ] > [ mergeto => $mergeto, ] > [ MARCto => $MARCto, ] > [ biblionumbers => [ $a, $b, $c ], ] >@@ -1382,6 +1382,12 @@ If $mergeto equals mergefrom, the linked biblio field is updated. > If $mergeto is different, the biblio field will be linked to $mergeto. > If $mergeto is missing, the biblio field is deleted. > >+MARCfrom and MARCto are not needed when merging deleted authority records. >+MARCfrom is used to determine if a cleared subfield in the authority record >+should be removed from a biblio. MARCto is used to populate the biblio >+record with the updated values. So it is not optional when merging >+existing records! >+ > Normally all biblio records linked to $mergefrom, will be considered. But > you can pass specific numbers via the biblionumbers parameter. > >@@ -1436,7 +1442,7 @@ sub merge { > my @record_from; > @record_from = $MARCfrom->field($auth_tag_to_report_from)->subfields() if $auth_tag_to_report_from && $MARCfrom && $MARCfrom->field($auth_tag_to_report_from); > >- # Get All candidate Tags for the change >+ # Get all candidate tags for the change > # (This will reduce the search scope in marc records). > # For a deleted authority record, we scan all auth controlled fields > my $dbh = C4::Context->dbh; >-- >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