-
Notifications
You must be signed in to change notification settings - Fork 9.4k
FIX #11022 in 2.1-develop: Filter Groups of search criteria parameter have not been included for further processing #11432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX #11022 in 2.1-develop: Filter Groups of search criteria parameter have not been included for further processing #11432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not actually seem to fix this problem in 2.1
@davidverholen after testing this with 2.1 it does not actually seem to fix the issue. When you call the described API endpoints you still get all the data back. Unlike the 2.2 fix which showed only those that match the search. |
751ea43
to
525f90a
Compare
@dmanners the problem is, that the filters of the search criteria are ignored in the eav attribute repository getList function in 2.1. I've added a workaround which should fix this until it's replaced by the CollectionProcessor in 2.2 |
@@ -212,7 +212,7 @@ public function testGetList() | |||
$searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteriaInterface'); | |||
|
|||
$filterGroupMock = $this->getMock('\Magento\Framework\Api\Search\FilterGroup', [], [], '', false); | |||
$searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroupMock]); | |||
$searchCriteriaMock->expects($this->exactly(2))->method('getFilterGroups')->willReturn([$filterGroupMock]); | |||
|
|||
$filterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false); | |||
$filterGroupMock->expects($this->once())->method('getFilters')->willReturn([$filterMock]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidverholen I think this is the method that needs to be called more than once in the tests.
…teria parameter have not been included for further processing #11432
Description
The Filter Groups and the Sort Order of the $searchCriteria parameter have not been included in the searchCriteria Object that is finally provided for the eav set repository.
This Pull request sets the filtergroups and sort order in the searchCriteriaBuilder
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist
//cc @dmanners