Bugzilla – Attachment 48889 Details for
Bug 16018
Merge.pl code cleanup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Bug16018 - Skip ModAuthority sub in AuthoritiesMarc.pm to make merges work properly
Bug16018---Skip-ModAuthority-sub-in-AuthoritiesMar.patch (text/plain), 1.50 KB, created by
Rémi Mayrand-Provencher
on 2016-03-09 16:51:27 UTC
(
hide
)
Description:
Bug16018 - Skip ModAuthority sub in AuthoritiesMarc.pm to make merges work properly
Filename:
MIME Type:
Creator:
Rémi Mayrand-Provencher
Created:
2016-03-09 16:51:27 UTC
Size:
1.50 KB
patch
obsolete
>From aecc1c56fe0ea6eaab5e73d2502235353647c40c 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] Bug16018 - 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 4956335..61da78b 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 ) { > >-- >1.9.1
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 Raw
Actions:
View
Attachments on
bug 16018
:
48889
|
58578
|
59497
|
59502
|
59531
|
59532
|
59547
|
59927
|
59930
|
59935