Skip to content

Commit d8e1ed4

Browse files
authored
ENGCOM-3655: Fix issue causing attribute not loading when using getList #19620
2 parents a26051d + e36dcdd commit d8e1ed4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/code/Magento/Backend/Model/Search/Customer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function load()
8989

9090
$this->searchCriteriaBuilder->setCurrentPage($this->getStart());
9191
$this->searchCriteriaBuilder->setPageSize($this->getLimit());
92-
$searchFields = ['firstname', 'lastname', 'company'];
92+
$searchFields = ['firstname', 'lastname', 'billing_company'];
9393
$filters = [];
9494
foreach ($searchFields as $field) {
9595
$filters[] = $this->filterBuilder

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

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

351351
$this->collectionProcessor->process($searchCriteria, $collection);
352352

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ public function testGetList()
618618
->willReturnSelf();
619619
$collection->expects($this->at(7))
620620
->method('joinAttribute')
621-
->with('company', 'customer_address/company', 'default_billing', null, 'left')
621+
->with('billing_company', 'customer_address/company', 'default_billing', null, 'left')
622622
->willReturnSelf();
623623
$this->collectionProcessorMock->expects($this->once())
624624
->method('process')

0 commit comments

Comments
 (0)