From 8fde70954c1400b42ff60ef2671492a5f661e615 Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Tue, 17 Aug 2021 18:30:29 -0400 Subject: [PATCH] closes core#2770: Dedupe by website --- CRM/Dedupe/BAO/DedupeRule.php | 1 + CRM/Dedupe/BAO/DedupeRuleGroup.php | 1 + tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/CRM/Dedupe/BAO/DedupeRule.php b/CRM/Dedupe/BAO/DedupeRule.php index 9d16d3331a..16683b5e5e 100644 --- a/CRM/Dedupe/BAO/DedupeRule.php +++ b/CRM/Dedupe/BAO/DedupeRule.php @@ -91,6 +91,7 @@ class CRM_Dedupe_BAO_DedupeRule extends CRM_Dedupe_DAO_DedupeRule { case 'civicrm_im': case 'civicrm_openid': case 'civicrm_phone': + case 'civicrm_website': $id = 'contact_id'; break; diff --git a/CRM/Dedupe/BAO/DedupeRuleGroup.php b/CRM/Dedupe/BAO/DedupeRuleGroup.php index 5c95f9fabe..ce14df0c54 100644 --- a/CRM/Dedupe/BAO/DedupeRuleGroup.php +++ b/CRM/Dedupe/BAO/DedupeRuleGroup.php @@ -84,6 +84,7 @@ class CRM_Dedupe_BAO_DedupeRuleGroup extends CRM_Dedupe_DAO_DedupeRuleGroup { 'civicrm_note', 'civicrm_openid', 'civicrm_phone', + 'civicrm_website', ]; foreach (['Individual', 'Organization', 'Household'] as $ctype) { diff --git a/tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php b/tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php index abb949c5b9..a716ab13e0 100644 --- a/tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php +++ b/tests/phpunit/CRM/Dedupe/BAO/RuleGroupTest.php @@ -93,6 +93,10 @@ class CRM_Dedupe_BAO_RuleGroupTest extends CiviUnitTestCase { 'phone_numeric' => 'Phone', 'phone_ext' => 'Phone Extension', ], + 'civicrm_website' => + [ + 'url' => 'Website', + ], ], $fields); } -- 2.25.1