Skip to content

Commit 3aa4295

Browse files
committed
AC-7039:: Customer Import: update to  disable_auto_group_change ignored 
1 parent 8ae859b commit 3aa4295

File tree

2 files changed

+4
-4
lines changed
  • app/code/Magento/CustomerImportExport/Model/Import
  • dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import

2 files changed

+4
-4
lines changed

app/code/Magento/CustomerImportExport/Model/Import/Customer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,15 +481,15 @@ protected function _prepareDataForUpdate(array $rowData)
481481
$entitiesToCreate[] = $entityRow;
482482
} else {
483483
// edit
484-
$columnDisableAutoGroupChange=CustomerInterface::DISABLE_AUTO_GROUP_CHANGE;
485484
$entityRow['updated_at'] = $now->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT);
486485
if (!empty($rowData[self::COLUMN_STORE])) {
487486
$entityRow['store_id'] = $this->_storeCodeToId[$rowData[self::COLUMN_STORE]];
488487
} else {
489488
$entityRow['store_id'] = $this->getCustomerStoreId($emailInLowercase, $rowData[self::COLUMN_WEBSITE]);
490489
}
491-
if (!empty($rowData[$columnDisableAutoGroupChange])) {
492-
$entityRow[$columnDisableAutoGroupChange] = $rowData[$columnDisableAutoGroupChange];
490+
if (!empty($rowData[CustomerInterface::DISABLE_AUTO_GROUP_CHANGE])) {
491+
$entityRow[CustomerInterface::DISABLE_AUTO_GROUP_CHANGE] =
492+
$rowData[CustomerInterface::DISABLE_AUTO_GROUP_CHANGE];
493493
}
494494
$entitiesToUpdate[] = $entityRow;
495495
}

dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function testImportData()
160160
$this->assertNotEquals(
161161
$existingCustomer->getDisableAutoGroupChange(),
162162
$updatedCustomer->getDisableAutoGroupChange(),
163-
'disable_auto_group_change must be changed'
163+
'Disable automatic group change based on VAT ID must be changed'
164164
);
165165
$this->assertEquals(
166166
$existingCustomer->getGender(),

0 commit comments

Comments
 (0)