Skip to content

Commit

Permalink
dev/core#1998 Address dedupe clash on dashboard contact
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton authored and colemanw committed Sep 4, 2020
1 parent 6535799 commit f8c35ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CRM/Dedupe/Merger.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,12 @@ public static function moveContactBelongings($mergeHandler, $tables, $tableOpera
continue;
}

if ($table === 'civicrm_dashboard_contact') {
$sqls[] = "UPDATE IGNORE civicrm_dashboard_contact SET contact_id = $mainId WHERE contact_id = $otherId";
$sqls[] = "DELETE FROM civicrm_dashboard_contact WHERE contact_id = $otherId";
continue;
}

if ($table === 'civicrm_dedupe_exception') {
$sqls[] = "UPDATE IGNORE civicrm_dedupe_exception SET contact_id1 = $mainId WHERE contact_id1 = $otherId";
$sqls[] = "UPDATE IGNORE civicrm_dedupe_exception SET contact_id2 = $mainId WHERE contact_id2 = $otherId";
Expand Down

0 comments on commit f8c35ca

Please sign in to comment.