Skip to content

EspoCRM – Open Source CRM Application

Generate duplicate where building check address change

Yuriif93d276e8789
diff --git a/application/Espo/Classes/DuplicateWhereBuilders/General.php b/application/Espo/Classes/DuplicateWhereBuilders/General.php
index 245dcc1f78..6ded5a62c6 100644
--- a/application/Espo/Classes/DuplicateWhereBuilders/General.php
+++ b/application/Espo/Classes/DuplicateWhereBuilders/General.php
@@ -245,7 +245,7 @@ class General implements WhereBuilder
return $eaGroup->getAddressList();
}
- if ($entity->get('emailAddress')) {
+ if ($entity->get('emailAddress') && $entity->isAttributeChanged('emailAddress')) {
return [
$entity->get('emailAddress')
];
@@ -266,7 +266,7 @@ class General implements WhereBuilder
return $eaGroup->getNumberList();
}
- if ($entity->get('phoneNumber')) {
+ if ($entity->get('phoneNumber') && $entity->isAttributeChanged('phoneNumber')) {
return [$entity->get('phoneNumber')];
}