Skip to content
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: Filter Groups of search criteria parameter have not been included for further processing #11418

Merged
merged 3 commits into from
Oct 27, 2017

Conversation

davidverholen
Copy link
Member

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)

  1. GET v1/products/attribute-sets/sets/list inconsistent return result #11022: GET v1/products/attribute-sets/sets/list inconsistent return result

Manual testing scenarios

  1. Create an additional product attribute set
  2. call to GET http://URL/rest/v1/products/attribute-sets/sets/list?searchCriteria[filter_groups][0][filters][0][field]=attribute_set_name&searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[filter_groups][0][filters][0][value]=default
  3. Result should be only the default attribute set (before it always returned all product attribute sets)

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@dmanners dmanners added develop Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog labels Oct 13, 2017
@dmanners
Copy link
Contributor

Hi @davidverholen thank you for this PR. Is there any reason this is going to develop branch and not the 2.2-develop branch? It would be great if we could get this fix into 2.2. Thanks

@davidverholen
Copy link
Member Author

no, no reason ;) I think I've read "TODO in branch develop". Now that I look at it, that was just the Project "branch [develop]" where this issue is assigned and on todo.

But I can just make another pr quickly

@dmanners dmanners added this to the October 2017 milestone Oct 13, 2017
@dmanners dmanners added 2.2.x Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release and removed 2.2.x Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Oct 13, 2017
@dmanners
Copy link
Contributor

@davidverholen if you feel like 1 more pr you could also backport this change to 2.1-develop :)

@dmanners
Copy link
Contributor

Also there is a fail on Magento\Catalog\Api\AttributeSetRepositoryTest::testGetList with the api tests.

Magento\Catalog\Api\AttributeSetRepositoryTest::testGetList
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'filter_groups' => Array (
         0 => Array (...)
+        1 => Array (...)
     )
     'current_page' => 1
     'page_size' => 2
+    'sort_orders' => Array ()
 )

@dmanners
Copy link
Contributor

Another failure in the internal build system.

Magento\Catalog\Test\Unit\Model\Product\Attribute\SetRepositoryTest::testGetList
TypeError: Argument 1 passed to Mock_SearchCriteriaBuilder_79677db7::setFilterGroups() must be of the type array, null given

@magento-engcom-team magento-engcom-team changed the base branch from develop to 2.3-develop October 20, 2017 15:32
@okorshenko okorshenko merged commit 81e8313 into magento:2.3-develop Oct 27, 2017
okorshenko pushed a commit that referenced this pull request Oct 27, 2017
… have not been included for further processing #11418
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants