Skip to content

Commit 7237cd5

Browse files
ENGCOM-3868: [Backport] Fix issue causing attribute not loading when using getList #20284
- Merge Pull Request #20284 from GovindaSharma/magento2:2.2-develop-PR-port-19620 - Merged commits: 1. 0600244 2. a59c0b4
2 parents d20f927 + a59c0b4 commit 7237cd5

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
@@ -365,7 +365,7 @@ public function getList(SearchCriteriaInterface $searchCriteria)
365365
->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
366366
->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
367367
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left')
368-
->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left');
368+
->joinAttribute('billing_company', 'customer_address/company', 'default_billing', null, 'left');
369369

370370
$this->collectionProcessor->process($searchCriteria, $collection);
371371

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)