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

Update StockStatusExpressionForDefaultStock.php #3388

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

pmathbliss
Copy link

@pmathbliss pmathbliss commented Jun 13, 2023

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_number>: 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 (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

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.
@LudwigDev9
Copy link

any update on the issue yet?

@dio5
Copy link

dio5 commented Apr 9, 2024

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'

Copy link

@stefanskotte stefanskotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and works on 2.4.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Reviewer Approved
Development

Successfully merging this pull request may close these issues.

5 participants