From 34e69a4a9eb8449c400cf928d9c3701cc8eab45f Mon Sep 17 00:00:00 2001 From: mxbeaulieu Date: Mon, 15 Jun 2015 11:05:51 -0400 Subject: [PATCH] Bug 14387: Merge reference selection has no effect when merging authorities. This patch swaps the authority records according to the refenrece record selection. To TEST: Merge two authority records, select the second as merge reference. The reference authority is always the first. Apply the patch. Repeat previous steps, the authority is now merged using the selected reference record. modified: authorities/merge.pl Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit ee7666a5fdd1b04f1bf50aa89900488e1a01402b) Signed-off-by: Chris Cormack Signed-off-by: Liz Rea --- authorities/merge.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/authorities/merge.pl b/authorities/merge.pl index 362838150f..6176daf517 100755 --- a/authorities/merge.pl +++ b/authorities/merge.pl @@ -123,10 +123,13 @@ else { } } - my $notreference = - ( $authid[0] == $mergereference ) - ? $authid[1] - : $authid[0]; + #Setting $notreference + my $notreference = $authid[1]; + if($mergereference == $notreference){ + $notreference = $authid[0]; + #Swap so $recordObj1 is always the correct merge reference + ($recordObj1, $recordObj2) = ($recordObj2, $recordObj1); + } # Creating a loop for display -- 2.39.5