salable quantity is not available in the elastic search bucket list
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 357
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
Preconditions (*)
- Magento 2.4.1
- MultiSourceInventory
Steps to reproduce (*)
- Create two websites
- Create a few different sources
- Create 2 stocks for two websites (Stock1 -> Website 1 , Stock 2 -> Website 2 )
- Create a product and assign to both websites
- Add stock quantity only to Stock 1 but not Stock 2 so that the product is salable in Website 1 and out of stock in Website 2
Case 1: Try to add an elastic search query for is_salable
Case 2: Try to build an elastic search query for stock_status
Expected result (*)
Case 1: The is_salable field is added in the bucket list and we can use it for searches
Case 2: The stock_status field should be about the the current website
Actual result (*)
Case 1: The is_salable field is ignored because it's not in the bucket list.
Case 2: We get incorrect results regarding stock status.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing both Elasticsearch query cases in Magento 2.4.1 with MultiSourceInventory, using the two websites, stocks, and product setup described. No file or test is named; done means is_salable is available for bucket-list searches and stock_status reflects the current website.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, php
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100