From 97be189084b444436234219ab5a3dcdb7a4438b5 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 9 Jan 2020 16:20:29 +1300 Subject: [PATCH] Check field to carry over custom data by default when none is in the other contact's field This partially addresses reviewer feedback about the limitations of https://github.com/civicrm/civicrm-core/pull/15595 --- CRM/Dedupe/Merger.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index f6a2e4749e..d0a158dbd0 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -1383,12 +1383,13 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m $rows["move_custom_$fid"]['title'] = $field['label']; $elements[] = [ - 'advcheckbox', - "move_custom_$fid", - NULL, - NULL, - NULL, - $value, + 0 => 'advcheckbox', + 1 => "move_custom_$fid", + 2 => NULL, + 3 => NULL, + 4 => NULL, + 5 => $value, + 'is_checked' => (!isset($rows["move_custom_$fid"]['main']) || $rows["move_custom_$fid"]['main'] === ''), ]; $migrationInfo["move_custom_$fid"] = $value; } -- 2.25.1