Skip to content

Commit

Permalink
ENGCOM-3868: [Backport] Fix issue causing attribute not loading when …
Browse files Browse the repository at this point in the history
…using getList #20284

 - Merge Pull Request #20284 from GovindaSharma/magento2:2.2-develop-PR-port-19620
 - Merged commits:
   1. 0600244
   2. a59c0b4
  • Loading branch information
magento-engcom-team committed Jan 15, 2019
2 parents d20f927 + a59c0b4 commit 7237cd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Model/Search/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function load()

$this->searchCriteriaBuilder->setCurrentPage($this->getStart());
$this->searchCriteriaBuilder->setPageSize($this->getLimit());
$searchFields = ['firstname', 'lastname', 'company'];
$searchFields = ['firstname', 'lastname', 'billing_company'];
$filters = [];
foreach ($searchFields as $field) {
$filters[] = $this->filterBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public function getList(SearchCriteriaInterface $searchCriteria)
->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left')
->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left');
->joinAttribute('billing_company', 'customer_address/company', 'default_billing', null, 'left');

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ public function testGetList()
->willReturnSelf();
$collection->expects($this->at(7))
->method('joinAttribute')
->with('company', 'customer_address/company', 'default_billing', null, 'left')
->with('billing_company', 'customer_address/company', 'default_billing', null, 'left')
->willReturnSelf();
$this->collectionProcessorMock->expects($this->once())
->method('process')
Expand Down

0 comments on commit 7237cd5

Please sign in to comment.