inventory
inventory copied to clipboard
Default source check missing on source item decrement for Legacy stock status update
Preconditions (*)
- Magento Inventory Version: 1.2.1-p1, develop
- Magento Version 2.4.3-p1
Steps to reproduce (*)
- Decrement a source item for a source that is not the Default source
Expected result (*)
- The legacy stock status should not be updated if the decremented source item is not for the default source
Actual result (*)
- Legacy stock status is updated regardless of the source code
There is missing source code check at the beginning of the for loop in the SynchronizeLegacyStockAfterDecrementStockPlugin plugin https://github.com/magento/inventory/blob/develop/InventoryCatalog/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPlugin.php#L102
The check is already implemented in \Magento\InventoryCatalog\Model\ResourceModel\DecrementQtyForLegacyStock called a line 99 https://github.com/magento/inventory/blob/develop/InventoryCatalog/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPlugin.php#L99
Hi @nmarquez2. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Hi all, Do you have any updates about this issue? Because it's also reproducible in Magento 2.4.3-p2