Bugzilla – Attachment 102444 Details for
Bug 22437
Subsequent authority merges in cron may cause biblios to lose authority information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22437: Delete older merge requests at new merge time
Bug-22437-Delete-older-merge-requests-at-new-merge.patch (text/plain), 1.78 KB, created by
Marcel de Rooy
on 2020-04-06 13:47:44 UTC
(
hide
)
Description:
Bug 22437: Delete older merge requests at new merge time
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-04-06 13:47:44 UTC
Size:
1.78 KB
patch
obsolete
>From 1bccbd415cc0d7a4ac16f80fc3281cc219e9b4cc Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 3 Apr 2020 08:55:45 +0000 >Subject: [PATCH] Bug 22437: Delete older merge requests at new merge time >Content-Type: text/plain; charset=utf-8 > >If you merge A to B, we should remove older AA merges (regular >merge to itself) in the queue before deleting A. > >Test plan: >[1] Set merge limit in prefs to say X. >[2] Find three authorities A, B, C with linkcount >X, >X, <X. >[3] Merge C to B. This creates a 'BB merge' in the queue. > Auth C is deleted. >[4] Merge B to A. Creating AA and BA in the queue. > Auth B is deleted. > Optionally verify that BB is no longer in the queue. >[5] Run the merge_authorities.pl cron job. > Verify that the linkcount to A is the former total of ABC. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > authorities/merge.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/authorities/merge.pl b/authorities/merge.pl >index 80c3640dc1..5b8c4fb260 100755 >--- a/authorities/merge.pl >+++ b/authorities/merge.pl >@@ -25,6 +25,7 @@ use C4::AuthoritiesMarc; > use C4::Koha; > use C4::Biblio; > >+use Koha::Authority::MergeRequests; > use Koha::Authority::Types; > use Koha::MetadataRecord::Authority; > >@@ -84,6 +85,9 @@ if ($merge) { > > # Delete the other record. Do not merge. It is unneeded and could under > # special circumstances have unwanted side-effects. >+ # Remove older pending merge requests for $recordid2 to itself. The above merge did the job already or will do. (See bug 22437) >+ my $condition = { authid => $recordid2, authid_new => [undef, 0, $recordid2], done => 0 }; >+ Koha::Authority::MergeRequests->search($condition)->delete; > DelAuthority({ authid => $recordid2, skip_merge => 1 }); > > # Parameters >-- >2.11.0
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 22437
:
95836
|
95848
|
102338
|
102444
|
102445
|
103298
|
103299
|
104557
|
104558
|
104559
|
104698
|
104699
|
104700