Bugzilla – Attachment 58578 Details for
Bug 16018
Merge.pl code cleanup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16018 - Merges in AuthoritiesMarc do not work
Bug-16018---Merges-in-AuthoritiesMarc-do-not-work.patch (text/plain), 1.55 KB, created by
Mark Tompsett
on 2017-01-03 18:39:05 UTC
(
hide
)
Description:
Bug 16018 - Merges in AuthoritiesMarc do not work
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-01-03 18:39:05 UTC
Size:
1.55 KB
patch
obsolete
>From e81391986d33a06e506f0a092b2e65396b59943a Mon Sep 17 00:00:00 2001 >From: remi <remi.mayrand-provencher@inLibro.com> >Date: Wed, 9 Mar 2016 11:48:31 -0500 >Subject: [PATCH] Bug 16018 - Merges in AuthoritiesMarc do not work > >Skip ModAuthority sub in AuthoritiesMarc.pm to make merges >work properly. > >Test plan: >1) Go to authority, search for anything >2) Click merge on two authorities of the same type that are > used at least one time >3) Validate which subfields are corresponding to each > authorities in the biblios that uses them >4) Do the whole merge process >5) Validate that the biblios are updated properly >--- > authorities/merge.pl | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/authorities/merge.pl b/authorities/merge.pl >index b423122..fe50df0 100755 >--- a/authorities/merge.pl >+++ b/authorities/merge.pl >@@ -58,8 +58,17 @@ if ($merge) { > $record->leader( GetAuthority($recordid1)->leader() ); > > # Modifying the reference record >- ModAuthority( $recordid1, $record, $typecode ); > >+ my $dbh=C4::Context->dbh; >+ my $overwrite = C4::Context->preference('overwriteSubfieldsOnMerge'); >+ my $MARCto = GetAuthority($recordid1); >+ my $MARCfrom = GetAuthority($recordid2); >+ if(C4::Context->preference('dontmerge') ne '1'){ >+ &merge($recordid2,$MARCfrom,$recordid1,$MARCto); >+ }else{ >+ my $sqlinsert="INSERT INTO need_merge_authorities (authid, done) "."VALUES (?,?)"; >+ $dbh->do($sqlinsert,undef,($recordid1,0)); >+ } > # Deleting the other record > if ( scalar(@errors) == 0 ) { > >-- >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 16018
:
48889
|
58578
|
59497
|
59502
|
59531
|
59532
|
59547
|
59927
|
59930
|
59935