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

StockRegistryInterface :: getLowStockItems() returns StockStatusCollection instead of StockItemCollection #15085

Closed
jesse-dev opened this issue May 8, 2018 · 3 comments
Labels
Component: CatalogInventory Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development 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

Comments

@jesse-dev
Copy link

Preconditions

  1. Magento 2.2.4
  2. This is a typo/mistake in the API, so the environment doesn't matter

Steps to reproduce

  1. call REST API : /V1/stockItems/lowStock/
  2. observe the response is \Magento\CatalogInventory\Api\Data\StockStatusCollectionInterface

Expected result

  1. return \Magento\CatalogInventory\Api\Data\StockItemCollectionInterface
  2. The implementation in Magento\CatalogInventory\Model\StockRegistry :: getLowStockItems() returns \Magento\CatalogInventory\Api\Data\StockItemCollectionInterface , so this is clearly a typo/mistake.

Actual result

  1. returns \Magento\CatalogInventory\Api\Data\StockStatusCollectionInterface
  2. The implementation in Magento\CatalogInventory\Model\StockRegistry :: getLowStockItems() returns \Magento\CatalogInventory\Api\Data\StockItemCollectionInterface , so this is clearly a typo/mistake.

The Fix

  1. the return docblock for getLowStockItems() in \Magento\CatalogInventory\Api\StockRegistryInterface just needs to be updated to return \Magento\CatalogInventory\Api\Data\StockItemCollectionInterface instead of \Magento\CatalogInventory\Api\Data\StockStatusCollectionInterface
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label May 8, 2018
@engcom-backlog-nickolas engcom-backlog-nickolas added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed 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 good first issue Component: CatalogInventory labels Jul 13, 2018
@engcom-backlog-nickolas

Hello @jesse-dev, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team
Copy link
Contributor

Hi @jesse-dev. Thank you for your report.
The issue has been fixed in #17562 by @vasilii-b in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 9, 2018
@magento-engcom-team
Copy link
Contributor

Hi @jesse-dev. Thank you for your report.
The issue has been fixed in #18427 by @lewisvoncken in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CatalogInventory Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development 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

No branches or pull requests

3 participants