Open
Description
Preconditions and environment
- Magento 2.4.7-p4
Steps to reproduce
- Create a simple product with below information and create stock with default source
- Assign source for new product and set Qty is 0
- Update Advanced Inventory config:
- Out-of-Stock Threshold: -10
- Backorders: No Backorders
- Run full reindex
- Edit product and check Product Salable Quantity is 0
- Check value of
is_salable
column in the tableinventory_stock_{storeId}
Expected result
is_salable = 0
Actual result
is_salable = 1
Additional information
The product salable quantity is 0 because min_qty is set to 0 if product is no backorder. It is set by plugin \Magento\InventoryCatalog\Plugin\CatalogInventory\Api\Data\StockItemInterface\AdaptMinQtyToBackordersPlugin::afterGetMinQty
But for indexer, this logic is not applied so min_qty is still -10 and available qty is 0 - (-10) = 10
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.