magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Include SQL wild cards by default when using 'like' in search criteria #13

Closed magento-engcom-team closed 3 years ago

magento-engcom-team commented 6 years ago

As a developer, I don't want to think about passing SQL wildcard characters when sending 'like' search criteria through a request to the Product API.

Preconditions

  1. Magento CE 2.2.1

Steps to reproduce

  1. Install Magento CE 2.2.1
  2. Install provided sample data using bin/magento sampledata:deploy
  3. Remove WebApi security authorization in Admin > Stores > Configuration > Services > Magento WebApi
  4. Make request to: http://[magento host]/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=red&searchCriteria[filter_groups][0][filters][0][condition_type]=like

Expected result

  1. Products with sku that contains 'red' are returned in the response xml.

Actual result

  1. No products returned.

Original Report: https://github.com/magento/magento2/issues/12456 by @nbennett25

sivaschenko commented 3 years ago

Duplicate https://github.com/magento/community-features/issues/12