magento / inventory

Magento Inventory Project (a.k.a MSI)
Open Software License 3.0
338 stars 248 forks source link

Update StockStatusExpressionForDefaultStock.php #3388

Open pmathbliss opened 1 year ago

pmathbliss commented 1 year ago

Indexed cataloginventory_stock_status.stock_status not updating if the inventory goes from out of stock to in stock. The original code used the same value in the cataloginventory_stock_status.

Description (*)

Fixed Issues (if relevant)

  1. Fixes magento/inventory#: Issue title

Manual testing scenarios (*)

  1. Take a simple product with that is out of stock, enabled and has a row in cataloginventory_stock_status
  2. Update quantity > 0 and is_in_stock to 1.
  3. Run the cataloginventory_stock indexer.

Questions or comments

Contribution checklist (*)

LudwigDev9 commented 7 months ago

any update on the issue yet?

dio5 commented 7 months ago

Running into this issue also, and while it seems to fix the reindexing, it feels a bit weird as a fix to me...

as if stock status is not null, we use

'cisi.is_in_stock'

otherwise

$isAggregate ? 'MAX(cisi.is_in_stock)' : 'cisi.is_in_stock'