Skip to content

Commit

Permalink
ENGCOM-3655: Fix issue causing attribute not loading when using getList
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Jan 3, 2019
2 parents a26051d + e36dcdd commit d8e1ed4
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 @@ -346,7 +346,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 @@ -618,7 +618,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 d8e1ed4

Please sign in to comment.