Skip to content

Commit 3aae285

Browse files
ENGCOM-3655: Fix issue causing attribute not loading when using getList #19620
- Merge Pull Request #19620 from Militree/magento2:fix/17759-load-company-as-custom-customer-attribute - Merged commits: 1. d600179
2 parents 35c4f04 + d600179 commit 3aae285

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public function getList(SearchCriteriaInterface $searchCriteria)
342342
->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
343343
->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
344344
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left')
345-
->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left');
345+
->joinAttribute('billing_company', 'customer_address/company', 'default_billing', null, 'left');
346346

347347
$this->collectionProcessor->process($searchCriteria, $collection);
348348

app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ public function testGetList()
740740
->willReturnSelf();
741741
$collection->expects($this->at(7))
742742
->method('joinAttribute')
743-
->with('company', 'customer_address/company', 'default_billing', null, 'left')
743+
->with('billing_company', 'customer_address/company', 'default_billing', null, 'left')
744744
->willReturnSelf();
745745
$this->collectionProcessorMock->expects($this->once())
746746
->method('process')

0 commit comments

Comments
 (0)