3 +--------------------------------------------------------------------+
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2019 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
30 * File for the CRM_Contact_Imports_Parser_ContactTest class.
34 * Test contact import parser.
39 class CRM_Contact_Import_Parser_ContactTest
extends CiviUnitTestCase
{
40 protected $_tablesToTruncate = ['civicrm_address', 'civicrm_phone'];
45 public function setUp() {
50 * Test that import parser will add contact with employee of relationship.
54 public function testImportParserWtihEmployeeOfRelationship() {
55 $this->organizationCreate(array(
56 "organization_name" => "Agileware",
57 "legal_name" => "Agileware",
59 $contactImportValues = array(
60 "first_name" => "Alok",
61 "last_name" => "Patel",
62 "Employee of" => "Agileware",
65 $fields = array_keys($contactImportValues);
66 $values = array_values($contactImportValues);
67 $parser = new CRM_Contact_Import_Parser_Contact($fields, []);
68 $parser->_contactType
= 'Individual';
70 $this->mapRelationshipFields($fields, $parser->getAllFields());
72 $parser = new CRM_Contact_Import_Parser_Contact($fields, [], [], [], array(
84 ), [], [], [], [], []);
86 $parser->_contactType
= 'Individual';
87 $parser->_onDuplicate
= CRM_Import_Parser
::DUPLICATE_UPDATE
;
90 $this->assertEquals(CRM_Import_Parser
::VALID
, $parser->import(CRM_Import_Parser
::DUPLICATE_UPDATE
, $values), 'Return code from parser import was not as expected');
91 $this->callAPISuccess("Contact", "get", array(
92 "first_name" => "Alok",
93 "last_name" => "Patel",
94 "organization_name" => "Agileware",
99 * Test that import parser will not fail when same external_identifier found of deleted contact.
103 public function testImportParserWtihDeletedContactExternalIdentifier() {
104 $contactId = $this->individualCreate(array(
105 "external_identifier" => "ext-1",
107 CRM_Contact_BAO_Contact
::deleteContact($contactId);
108 list($originalValues, $result) = $this->setUpBaseContact(array(
109 'external_identifier' => 'ext-1',
111 $originalValues['nick_name'] = 'Old Bill';
112 $this->runImport($originalValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
);
113 $originalValues['id'] = $result['id'];
114 $this->assertEquals('ext-1', $this->callAPISuccessGetValue('Contact', array('id' => $result['id'], 'return' => 'external_identifier')));
115 $this->callAPISuccessGetSingle('Contact', $originalValues);
119 * Test import parser will update based on a rule match.
121 * In this case the contact has no external identifier.
125 public function testImportParserWithUpdateWithoutExternalIdentifier() {
126 list($originalValues, $result) = $this->setUpBaseContact();
127 $originalValues['nick_name'] = 'Old Bill';
128 $this->runImport($originalValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
);
129 $originalValues['id'] = $result['id'];
130 $this->assertEquals('Old Bill', $this->callAPISuccessGetValue('Contact', array('id' => $result['id'], 'return' => 'nick_name')));
131 $this->callAPISuccessGetSingle('Contact', $originalValues);
135 * Test import parser will update contacts with an external identifier.
137 * This is the basic test where the identifier matches the import parameters.
141 public function testImportParserWithUpdateWithExternalIdentifier() {
142 list($originalValues, $result) = $this->setUpBaseContact(array('external_identifier' => 'windows'));
144 $this->assertEquals($result['id'], CRM_Core_DAO
::getFieldValue('CRM_Contact_DAO_Contact', 'windows', 'id', 'external_identifier', TRUE));
145 $this->assertEquals('windows', $result['external_identifier']);
147 $originalValues['nick_name'] = 'Old Bill';
148 $this->runImport($originalValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
);
149 $originalValues['id'] = $result['id'];
151 $this->assertEquals('Old Bill', $this->callAPISuccessGetValue('Contact', array('id' => $result['id'], 'return' => 'nick_name')));
152 $this->callAPISuccessGetSingle('Contact', $originalValues);
156 * Test import parser will fallback to external identifier.
158 * In this case no primary match exists (e.g the details are not supplied) so it falls back on external identifier.
164 public function testImportParserWithUpdateWithExternalIdentifierButNoPrimaryMatch() {
165 list($originalValues, $result) = $this->setUpBaseContact(array(
166 'external_identifier' => 'windows',
170 $this->assertEquals('windows', $result['external_identifier']);
172 $originalValues['nick_name'] = 'Old Bill';
173 $this->runImport($originalValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
);
174 $originalValues['id'] = $result['id'];
176 $this->assertEquals('Old Bill', $this->callAPISuccessGetValue('Contact', array('id' => $result['id'], 'return' => 'nick_name')));
177 $this->callAPISuccessGetSingle('Contact', $originalValues);
181 * Test that the import parser adds the external identifier where none is set.
185 public function testImportParserWithUpdateWithNoExternalIdentifier() {
186 list($originalValues, $result) = $this->setUpBaseContact();
187 $originalValues['nick_name'] = 'Old Bill';
188 $originalValues['external_identifier'] = 'windows';
189 $this->runImport($originalValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
);
190 $originalValues['id'] = $result['id'];
191 $this->assertEquals('Old Bill', $this->callAPISuccessGetValue('Contact', array('id' => $result['id'], 'return' => 'nick_name')));
192 $this->callAPISuccessGetSingle('Contact', $originalValues);
196 * Test that the import parser changes the external identifier when there is a dedupe match.
200 public function testImportParserWithUpdateWithChangedExternalIdentifier() {
201 list($contactValues, $result) = $this->setUpBaseContact(array('external_identifier' => 'windows'));
202 $contact_id = $result['id'];
203 $contactValues['nick_name'] = 'Old Bill';
204 $contactValues['external_identifier'] = 'android';
205 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
);
206 $contactValues['id'] = $contact_id;
207 $this->assertEquals('Old Bill', $this->callAPISuccessGetValue('Contact', array('id' => $contact_id, 'return' => 'nick_name')));
208 $this->callAPISuccessGetSingle('Contact', $contactValues);
212 * Test that the import parser adds the address to the right location.
216 public function testImportBillingAddress() {
217 list($contactValues) = $this->setUpBaseContact();
218 $contactValues['nick_name'] = 'Old Bill';
219 $contactValues['external_identifier'] = 'android';
220 $contactValues['street_address'] = 'Big Mansion';
221 $contactValues['phone'] = '911';
222 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
, array(0 => NULL, 1 => NULL, 2 => NULL, 3 => NULL, 4 => NULL, 5 => 2, 6 => 2));
223 $address = $this->callAPISuccessGetSingle('Address', array('street_address' => 'Big Mansion'));
224 $this->assertEquals(2, $address['location_type_id']);
226 $phone = $this->callAPISuccessGetSingle('Phone', array('phone' => '911'));
227 $this->assertEquals(2, $phone['location_type_id']);
229 $contact = $this->callAPISuccessGetSingle('Contact', $contactValues);
230 $this->callAPISuccess('Contact', 'delete', array('id' => $contact['id']));
234 * Test that the import parser adds the address to the primary location.
238 public function testImportPrimaryAddress() {
239 list($contactValues) = $this->setUpBaseContact();
240 $contactValues['nick_name'] = 'Old Bill';
241 $contactValues['external_identifier'] = 'android';
242 $contactValues['street_address'] = 'Big Mansion';
243 $contactValues['phone'] = 12334;
244 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
, array(0 => NULL, 1 => NULL, 2 => NULL, 3 => NULL, 4 => NULL, 5 => 'Primary', 6 => 'Primary'));
245 $address = $this->callAPISuccessGetSingle('Address', array('street_address' => 'Big Mansion'));
246 $this->assertEquals(1, $address['location_type_id']);
247 $this->assertEquals(1, $address['is_primary']);
249 $this->markTestIncomplete('phone actually doesn\'t work');
250 $phone = $this->callAPISuccessGetSingle('Phone', array('phone' => '12334'));
251 $this->assertEquals(1, $phone['location_type_id']);
253 $contact = $this->callAPISuccessGetSingle('Contact', $contactValues);
254 $this->callAPISuccess('Contact', 'delete', array('id' => $contact['id']));
258 * Test that address custom fields can be imported
260 public function testAddressWithCustomData() {
261 $ids = $this->entityCustomGroupWithSingleFieldCreate('Address', 'AddressTest.php');
262 list($contactValues) = $this->setUpBaseContact();
263 $contactValues['nick_name'] = 'Old Bill';
264 $contactValues['external_identifier'] = 'android';
265 $contactValues['street_address'] = 'Big Mansion';
266 $contactValues['custom_' . $ids['custom_field_id']] = 'Update';
267 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
, array(0 => NULL, 1 => NULL, 2 => NULL, 3 => NULL, 4 => NULL, 5 => 'Primary', 6 => 'Primary'));
268 $address = $this->callAPISuccessGetSingle('Address', ['street_address' => 'Big Mansion', 'return' => 'custom_' . $ids['custom_field_id']]);
269 $this->assertEquals('Update', $address['custom_' . $ids['custom_field_id']]);
273 * Test that the import parser adds the address to the primary location.
277 public function testImportDeceased() {
278 list($contactValues) = $this->setUpBaseContact();
279 CRM_Core_Session
::singleton()->set("dateTypes", 1);
280 $contactValues['birth_date'] = '1910-12-17';
281 $contactValues['deceased_date'] = '2010-12-17';
282 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
);
283 $contact = $this->callAPISuccessGetSingle('Contact', $contactValues);
284 $this->assertEquals('1910-12-17', $contact['birth_date']);
285 $this->assertEquals('2010-12-17', $contact['deceased_date']);
286 $this->assertEquals(1, $contact['is_deceased']);
287 $this->callAPISuccess('Contact', 'delete', array('id' => $contact['id']));
291 * Test that the import parser adds the address to the primary location.
295 public function testImportTwoAddressFirstPrimary() {
296 list($contactValues) = $this->setUpBaseContact();
297 $contactValues['nick_name'] = 'Old Bill';
298 $contactValues['external_identifier'] = 'android';
299 $contactValues['street_address'] = 'Big Mansion';
300 $contactValues['phone'] = 12334;
301 $fields = array_keys($contactValues);
302 $contactValues['street_address_2'] = 'Teeny Mansion';
303 $contactValues['phone_2'] = 4444;
304 $fields[] = 'street_address';
306 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
, array(0 => NULL, 1 => NULL, 2 => NULL, 3 => NULL, 4 => NULL, 5 => 'Primary', 6 => 'Primary', 7 => 3, 8 => 3), $fields);
307 $contact = $this->callAPISuccessGetSingle('Contact', array('external_identifier' => 'android'));
308 $address = $this->callAPISuccess('Address', 'get', array('contact_id' => $contact['id'], 'sequential' => 1));
310 $this->assertEquals(3, $address['values'][0]['location_type_id']);
311 $this->assertEquals(0, $address['values'][0]['is_primary']);
312 $this->assertEquals('Teeny Mansion', $address['values'][0]['street_address']);
314 $this->assertEquals(1, $address['values'][1]['location_type_id']);
315 $this->assertEquals(1, $address['values'][1]['is_primary']);
316 $this->assertEquals('Big Mansion', $address['values'][1]['street_address']);
318 $this->markTestIncomplete('phone import primary actually IS broken');
319 $phone = $this->callAPISuccess('Phone', 'get', array('contact_id' => $contact['id'], 'sequential' => 1));
320 $this->assertEquals(1, $phone['values'][0]['location_type_id']);
321 $this->assertEquals(1, $phone['values'][0]['is_primary']);
322 $this->assertEquals(12334, $phone['values'][0]['phone']);
323 $this->assertEquals(3, $phone['values'][1]['location_type_id']);
324 $this->assertEquals(0, $phone['values'][1]['is_primary']);
325 $this->assertEquals(4444, $phone['values'][1]['phone']);
327 $this->callAPISuccess('Contact', 'delete', array('id' => $contact['id']));
331 * Test that the import parser adds the address to the primary location.
335 public function testImportTwoAddressSecondPrimary() {
336 list($contactValues) = $this->setUpBaseContact();
337 $contactValues['nick_name'] = 'Old Bill';
338 $contactValues['external_identifier'] = 'android';
339 $contactValues['street_address'] = 'Big Mansion';
340 $contactValues['phone'] = 12334;
341 $fields = array_keys($contactValues);
342 $contactValues['street_address_2'] = 'Teeny Mansion';
343 $contactValues['phone_2'] = 4444;
344 $fields[] = 'street_address';
346 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
, array(0 => NULL, 1 => NULL, 2 => NULL, 3 => NULL, 4 => NULL, 5 => 3, 6 => 3, 7 => 'Primary', 8 => 'Primary'), $fields);
347 $contact = $this->callAPISuccessGetSingle('Contact', array('external_identifier' => 'android'));
348 $address = $this->callAPISuccess('Address', 'get', array('contact_id' => $contact['id'], 'sequential' => 1))['values'];
350 $this->assertEquals(1, $address[1]['location_type_id']);
351 $this->assertEquals(1, $address[1]['is_primary']);
352 $this->assertEquals('Teeny Mansion', $address[1]['street_address']);
354 $this->assertEquals(3, $address[0]['location_type_id']);
355 $this->assertEquals(0, $address[0]['is_primary']);
356 $this->assertEquals('Big Mansion', $address[0]['street_address']);
358 $this->markTestIncomplete('phone import primary actually IS broken');
359 $phone = $this->callAPISuccess('Phone', 'get', array('contact_id' => $contact['id'], 'sequential' => 1))['values'];
360 $this->assertEquals(3, $phone[1]['location_type_id']);
361 $this->assertEquals(0, $phone[1]['is_primary']);
362 $this->assertEquals(12334, $phone[1]['phone']);
363 $this->assertEquals(1, $phone[0]['location_type_id']);
364 $this->assertEquals(1, $phone[0]['is_primary']);
365 $this->assertEquals(4444, $phone[0]['phone']);
367 $this->callAPISuccess('Contact', 'delete', array('id' => $contact['id']));
371 * Test that the import parser updates the address on the existing primary location.
375 public function testImportPrimaryAddressUpdate() {
376 list($contactValues) = $this->setUpBaseContact(array('external_identifier' => 'android'));
377 $contactValues['nick_name'] = 'Old Bill';
378 $contactValues['external_identifier'] = 'android';
379 $contactValues['street_address'] = 'Big Mansion';
380 $contactValues['city'] = 'Big City';
381 $contactID = $this->callAPISuccessGetValue('Contact', array('external_identifier' => 'android', 'return' => 'id'));
382 $originalAddress = $this->callAPISuccess('Address', 'create', array('location_type_id' => 2, 'street_address' => 'small house', 'contact_id' => $contactID));
383 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
, array(0 => NULL, 1 => NULL, 2 => NULL, 3 => NULL, 4 => NULL, 5 => 'Primary', 6 => 'Primary'));
384 $address = $this->callAPISuccessGetSingle('Address', array('street_address' => 'Big Mansion'));
385 $this->assertEquals(2, $address['location_type_id']);
386 $this->assertEquals($originalAddress['id'], $address['id']);
387 $this->assertEquals('Big City', $address['city']);
388 $this->callAPISuccessGetSingle('Contact', $contactValues);
392 * Test the determination of whether a custom field is valid.
394 public function testCustomFieldValidation() {
395 $errorMessage = array();
396 $customGroup = $this->customGroupCreate(array(
397 'extends' => 'Contact',
400 $customField = $this->customFieldOptionValueCreate($customGroup, 'fieldABC', array('html_type' => 'Multi-Select'));
402 'custom_' . $customField['id'] => 'Label1|Label2',
404 CRM_Contact_Import_Parser_Contact
::isErrorInCustomData($params, $errorMessage);
405 $this->assertEquals(array(), $errorMessage);
409 * Test that setting duplicate action to fill doesn't blow away data
410 * that exists, but does fill in where it's empty.
414 public function testImportFill() {
415 // Create a custom field group for testing.
416 $custom_group_name = 'importFillGroup';
417 $results = $this->callAPISuccess('customGroup', 'get', array('title' => $custom_group_name));
418 if ($results['count'] == 0) {
420 'title' => $custom_group_name,
421 'extends' => 'Individual',
424 $customGroup = $this->callAPISuccess('customGroup', 'create', $api_params);
427 // Add two custom fields.
429 'custom_group_id' => $customGroup['id'],
430 'label' => 'importFillField1',
431 'html_type' => 'Select',
432 'data_type' => 'String',
433 'option_values' => array(
438 $result = $this->callAPISuccess('custom_field', 'create', $api_params);
439 $customField1 = $result['id'];
442 'custom_group_id' => $customGroup['id'],
443 'label' => 'importFillField2',
444 'html_type' => 'Select',
445 'data_type' => 'String',
446 'option_values' => array(
451 $result = $this->callAPISuccess('custom_field', 'create', $api_params);
452 $customField2 = $result['id'];
454 // Now set up values.
455 $original_gender = 'Male';
456 $original_custom1 = 'foo';
457 $original_job_title = '';
458 $original_custom2 = '';
459 $original_email = 'test-import-fill@example.org';
461 $import_gender = 'Female';
462 $import_custom1 = 'bar';
463 $import_job_title = 'Chief data importer';
464 $import_custom2 = 'baz';
466 // Create contact with both one known core field and one custom
469 'contact_type' => 'Individual',
470 'email' => $original_email,
471 'gender' => $original_gender,
472 'custom_' . $customField1 => $original_custom1,
474 $result = $this->callAPISuccess('contact', 'create', $api_params);
475 $contact_id = $result['id'];
479 'email' => $original_email,
480 'gender_id' => $import_gender,
481 'custom_' . $customField1 => $import_custom1,
482 'job_title' => $import_job_title,
483 'custom_' . $customField2 => $import_custom2,
486 $this->runImport($import, CRM_Import_Parser
::DUPLICATE_FILL
, CRM_Import_Parser
::VALID
);
489 'gender' => $original_gender,
490 'custom_' . $customField1 => $original_custom1,
491 'job_title' => $import_job_title,
492 'custom_' . $customField2 => $import_custom2,
499 'custom_' . $customField1,
501 'custom_' . $customField2,
504 $result = civicrm_api3('Contact', 'get', $params);
505 $values = array_pop($result['values']);
506 foreach ($expected as $field => $expected_value) {
507 if (!isset($values[$field])) {
511 $given_value = $values[$field];
515 // job_title: Chief Data Importer
516 // importFillField1: foo
517 // importFillField2: baz
518 $this->assertEquals($expected_value, $given_value, "$field properly handled during Fill import");
523 * CRM-19888 default country should be used if ambigous.
525 public function testImportAmbiguousStateCountry() {
526 $this->callAPISuccess('Setting', 'create', ['defaultContactCountry' => 1228]);
527 $countries = CRM_Core_PseudoConstant
::country(FALSE, FALSE);
528 $this->callAPISuccess('Setting', 'create', array('countryLimit' => array(array_search('United States', $countries), array_search('Guyana', $countries), array_search('Netherlands', $countries))));
529 $this->callAPISuccess('Setting', 'create', array('provinceLimit' => array(array_search('United States', $countries), array_search('Guyana', $countries), array_search('Netherlands', $countries))));
530 $mapper = array(0 => NULL, 1 => NULL, 2 => 'Primary', 3 => NULL);
531 list($contactValues) = $this->setUpBaseContact();
532 $fields = array_keys($contactValues);
533 $addressValues = array(
534 'street_address' => 'PO Box 2716',
536 'state_province' => 'UT',
537 'postal_code' => 84049,
538 'country' => 'United States',
540 $locationTypes = $this->callAPISuccess('Address', 'getoptions', array('field' => 'location_type_id'));
541 $locationTypes = $locationTypes['values'];
542 foreach ($addressValues as $field => $value) {
543 $contactValues['home_' . $field] = $value;
544 $mapper[] = array_search('Home', $locationTypes);
545 $contactValues['work_' . $field] = $value;
546 $mapper[] = array_search('Work', $locationTypes);
550 $contactValues['work_country'] = '';
552 $this->runImport($contactValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
, $mapper, $fields);
553 $addresses = $this->callAPISuccess('Address', 'get', array('contact_id' => array('>' => 2), 'sequential' => 1));
554 $this->assertEquals(2, $addresses['count']);
555 $this->assertEquals(array_search('United States', $countries), $addresses['values'][0]['country_id']);
556 $this->assertEquals(array_search('United States', $countries), $addresses['values'][1]['country_id']);
560 * Run the import parser.
562 * @param array $originalValues
564 * @param int $onDuplicateAction
565 * @param int $expectedResult
566 * @param array|null $mapperLocType
567 * Array of location types that map to the input arrays.
568 * @param array|null $fields
569 * Array of field names. Will be calculated from $originalValues if not passed in, but
570 * that method does not cope with duplicates.
572 protected function runImport($originalValues, $onDuplicateAction, $expectedResult, $mapperLocType = [], $fields = NULL) {
574 $fields = array_keys($originalValues);
576 $values = array_values($originalValues);
577 $parser = new CRM_Contact_Import_Parser_Contact($fields, $mapperLocType);
578 $parser->_contactType
= 'Individual';
579 $parser->_onDuplicate
= $onDuplicateAction;
581 $this->assertEquals($expectedResult, $parser->import($onDuplicateAction, $values), 'Return code from parser import was not as expected');
585 * @param array $fields Array of fields to be imported
586 * @param array $allfields Array of all fields which can be part of import
588 private function mapRelationshipFields(&$fields, $allfields) {
589 foreach ($allfields as $key => $fieldtocheck) {
590 $elementIndex = array_search($fieldtocheck->_title
, $fields);
591 if ($elementIndex !== FALSE) {
592 $fields[$elementIndex] = $key;
598 * Set up the underlying contact.
600 * @param array $params
601 * Optional extra parameters to set.
606 protected function setUpBaseContact($params = array()) {
607 $originalValues = array_merge(array(
608 'first_name' => 'Bill',
609 'last_name' => 'Gates',
610 'email' => 'bill.gates@microsoft.com',
611 'nick_name' => 'Billy-boy',
613 $this->runImport($originalValues, CRM_Import_Parser
::DUPLICATE_UPDATE
, CRM_Import_Parser
::VALID
);
614 $result = $this->callAPISuccessGetSingle('Contact', $originalValues);
615 return array($originalValues, $result);