From 152e402e32e9a58d8af63ee39b4a157baa79dd5f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 19 May 2022 23:18:58 +1200 Subject: [PATCH] [Import] Remove handling for unavailable field current_employer --- CRM/Contact/Import/Parser/Contact.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index cae7b3a311..ef854c573b 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -2056,24 +2056,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { return civicrm_api3_create_error($error->pop()); } } - - // check for organisations with same name - if (!empty($params['current_employer'])) { - $organizationParams = ['organization_name' => $params['current_employer']]; - $dupeIds = CRM_Contact_BAO_Contact::getDuplicateContacts($organizationParams, 'Organization', 'Supervised', [], FALSE); - - // check for mismatch employer name and id - if (!empty($params['employer_id']) && !in_array($params['employer_id'], $dupeIds) - ) { - throw new CRM_Core_Exception('Employer name and Employer id Mismatch'); - } - - // show error if multiple organisation with same name exist - if (empty($params['employer_id']) && (count($dupeIds) > 1) - ) { - return civicrm_api3_create_error('Found more than one Organisation with same Name.'); - } - } } /** -- 2.25.1