Skip to content

Commit

Permalink
Merge pull request #1634 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
[EngCom] Public Pull Requests - develop
- MAGETWO-82760: Dashboard Fix Y Axis for range #11752
- MAGETWO-81910: FIX #11022: Filter Groups of search criteria parameter have not been included for further processing #11418
  • Loading branch information
ishakhsuvarov authored Oct 27, 2017
2 parents 4e5f937 + de02e87 commit 07ed4b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 2 additions & 0 deletions app/code/Magento/Backend/Block/Dashboard/Graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ public function getChartUrl($directUrl = true)
$tmpstring = implode('|', $this->_axisLabels[$idx]);

$valueBuffer[] = $indexid . ":|" . $tmpstring;
} elseif ($idx == 'y') {
$valueBuffer[] = $indexid . ":|" . implode('|', $yLabels);
}
$indexid++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function save(\Magento\Eav\Api\Data\AttributeSetInterface $attributeSet)
*/
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
{
$this->searchCriteriaBuilder->setFilterGroups((array)$searchCriteria->getFilterGroups());
$this->searchCriteriaBuilder->addFilters(
[
$this->filterBuilder
Expand All @@ -71,9 +72,15 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
->create(),
]
);

$this->searchCriteriaBuilder->setSortOrders((array)$searchCriteria->getSortOrders());
$this->searchCriteriaBuilder->setCurrentPage($searchCriteria->getCurrentPage());
$this->searchCriteriaBuilder->setPageSize($searchCriteria->getPageSize());
return $this->attributeSetRepository->getList($this->searchCriteriaBuilder->create());

$searchResult = $this->attributeSetRepository->getList($this->searchCriteriaBuilder->create());
$searchResult->setSearchCriteria($searchCriteria);

return $searchResult;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,9 @@ public function testGetList()
{
$searchCriteria = [
'searchCriteria' => [
'filter_groups' => [
[
'filters' => [
[
'field' => 'entity_type_code',
'value' => 'catalog_product',
'condition_type' => 'eq',
],
],
],
],
'filter_groups' => [],
'current_page' => 1,
'page_size' => 2,
'page_size' => 2
],
];

Expand Down

0 comments on commit 07ed4b2

Please sign in to comment.