-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CatalogInventoryFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasegood first issue
Description
Preconditions
- Magento 2.2.4
- This is a typo/mistake in the API, so the environment doesn't matter
Steps to reproduce
- call REST API : /V1/stockItems/lowStock/
- observe the response is \Magento\CatalogInventory\Api\Data\StockStatusCollectionInterface
Expected result
- return \Magento\CatalogInventory\Api\Data\StockItemCollectionInterface
- The implementation in Magento\CatalogInventory\Model\StockRegistry :: getLowStockItems() returns \Magento\CatalogInventory\Api\Data\StockItemCollectionInterface , so this is clearly a typo/mistake.
Actual result
- returns \Magento\CatalogInventory\Api\Data\StockStatusCollectionInterface
- The implementation in Magento\CatalogInventory\Model\StockRegistry :: getLowStockItems() returns \Magento\CatalogInventory\Api\Data\StockItemCollectionInterface , so this is clearly a typo/mistake.
The Fix
- 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
Metadata
Metadata
Assignees
Labels
Component: CatalogInventoryFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasegood first issue