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

Product list does not contain [extension_attributes][stock_item] #36533

Closed
1 of 5 tasks
olsavmic opened this issue Nov 25, 2022 · 7 comments
Closed
1 of 5 tasks

Product list does not contain [extension_attributes][stock_item] #36533

olsavmic opened this issue Nov 25, 2022 · 7 comments
Labels
Area: APIs Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.3.1 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@olsavmic
Copy link

Preconditions and environment

  • Magento version 2.3.1, probably all newer versions affected as well 2.4-development

Steps to reproduce

Call /rest/V1/products?searchCriteria API, look for extension_attributes and compare the output with the API documentation

Expected result

stock_item should be part of extension_attributes in product listing

Actual result

stock_item is available only on the product detail

Additional information

I'd like to reopen the discussion around already existing but closed issues:
#24418
#22737

The official API documentation for /rest/V1/products endpoint contains stock_item record in the extension_attributes. The stock_item is indeed part of the /rest/V1/products/{productSku} extension_attributes.

From the comment and code on one of the issues, it seems like the stock_item field will be removed in the future and /stockItems/{productSku} endpoint should be used instead.

Since it took us hours to find out that the documentation is invalid, I'd propose one of following:

  1. Fix the API docs to reflect that the stock_item is missing from extension_attributes (although not ideal, the intent would be clear)
  2. Add stock_items (already tried in Fixed rest API products stockitem /V1/products?searchCriteria #22737  #28435, closed for inactivity)

Correct me please if the issue was fixed as I see #24418 in "status:done" (and I don't have a testing environment with the latest release) but I did not find any finished PR with the fix.

We'd highly prefer the option to get the stock_item information during product listing as we're integrating Magento with our ERP and right now we have to execute thousands of additional queries (I don't know of any bulk endpoint to retrieve the stock details for all products) but we can work with the workaround, fixing the docs would be enough if that's the agreed direction.

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”.
@m2-assistant
Copy link

m2-assistant bot commented Nov 25, 2022

Hi @olsavmic. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Nov 26, 2022

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November
Copy link
Contributor

Hi @olsavmic ,
Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is reproducible. No "stock_item" in the GET API response for /rest/V1/products
As per Magento devdocs, all fields of stock_item should be displayed under "extension_attributes" in the GET API response of rest/default/V1/products. Hence confirming this issue.

@engcom-November engcom-November added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Reported on 2.3.1 Indicates original Magento version for the Issue report. Area: APIs labels Nov 28, 2022
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-7112 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Nov 28, 2022

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-November engcom-November added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Issue: ready for confirmation labels Nov 28, 2022
@Kannakiraj123
Copy link
Contributor

@magento I am working on this

@github-jira-sync-bot github-jira-sync-bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: ready for grooming labels Apr 11, 2023
@m2-community-project m2-community-project bot removed the Progress: PR Created Indicates that Pull Request has been created to fix issue label Apr 11, 2023
@github-jira-sync-bot github-jira-sync-bot added Priority: P3 May be fixed according to the position in the backlog. and removed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. labels Apr 13, 2023
@engcom-Hotel engcom-Hotel moved this to Pull Request In Progress in Low Priority Backlog Aug 19, 2024
@m2-community-project m2-community-project bot added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Oct 15, 2024
@engcom-Bravo
Copy link
Contributor

Hi @olsavmic,

Thanks for your Contribution!!.

As per this comment #36615 (comment) we are closing this issue.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: APIs Component: Api Use with concrete module component label E.g. "Component: Api" + "Catalog" Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.3.1 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants