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

2.3 only - creating attribute option value using API returns unexpected response #18392

Closed
hostep opened this issue Oct 4, 2018 · 11 comments
Closed
Assignees
Labels
CD Issue recommended for the contribution day Component: Catalog Component: Eav Event: mageconf Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Milestone

Comments

@hostep
Copy link
Contributor

hostep commented Oct 4, 2018

Preconditions

  1. Tested with 2.4-develop branch
  2. PHP 7.1.22 & 7.2

Steps to reproduce

  1. Setup a clean Magento installation
  2. Create an Integration with full access rights & activate it, I'm assuming the access token is abcd (see step 4)
  3. Using the adminhtml, create a new dropdown product attribute, use attribute code: dropdown
  4. Add an option through a REST call (make sure to use an option which doesn't exist yet):
curl -k -X POST "https://domain.tld/rest/all/V1/products/attributes/dropdown/options" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer abcd" -d "{ \"option\": { \"label\": \"whatever\" }}"

Expected result

  1. Return value should be the ID of the new option

Actual result

  1. Return value is "id_new_option"
    image

Further discussion

This is a follow up on #8810, this issue was supposed to be fixed by #12920
But here's what seemed to have happened:

  • The above PR was first returning the full attribute option data with the label and the ID in JSON format.
  • But @okorshenko remarked in his review that only the ID should be returned.
  • @sidolov then added commit 5eef1d9 which turned the return value (probably accidentally) into: "new_option"
  • And then @sidolov added another commit (ac48c86) which now returns: "id_new_option"

This was probably all done by accident, I'm opening this issue so this isn't getting forgotten.

@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Oct 4, 2018

Hi @hostep. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

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

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@hostep do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 4, 2018
@Nazar65
Copy link
Member

Nazar65 commented Nov 2, 2018

#mageconf

@magento-engcom-team
Copy link
Contributor

@Nazar65 thank you for joining. Please accept team invitation here and self-assign the issue.

@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Nov 2, 2018

Hi @Nazar65. 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

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

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

@Nazar65 Nazar65 added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Component: Eav Component: Catalog labels Nov 2, 2018
@shikhamis11 shikhamis11 added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Dec 23, 2018
@magento-engcom-team
Copy link
Contributor

@shikhamis11 Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97311 were created

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Dec 23, 2018
@milindsingh milindsingh self-assigned this Jan 3, 2019
@magento-engcom-team
Copy link
Contributor

Hi @milindsingh. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

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

  • 2. Verify that the issue is reproducible on 2.3-develop branch

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

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jan 17, 2019

Hi @Nazar65. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

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

  • 2. Verify that the issue is reproducible on 2.3-develop branch

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

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@Nazar65 Nazar65 added the Progress: PR Created Indicates that Pull Request has been created to fix issue label Jan 17, 2019
@Nazar65 Nazar65 removed their assignment Mar 18, 2019
@milindsingh milindsingh removed their assignment May 4, 2019
@engcom-Charlie engcom-Charlie self-assigned this Dec 27, 2019
@m2-assistant
Copy link

m2-assistant bot commented Dec 27, 2019

Hi @engcom-Charlie. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

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

  • 2. 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!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@engcom-Charlie engcom-Charlie removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue labels Dec 27, 2019
@engcom-Charlie engcom-Charlie added the Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch label Dec 27, 2019
@ghost ghost unassigned engcom-Charlie Dec 27, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-30102 were created

Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Dec 27, 2019
@sdzhepa sdzhepa added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Sep 22, 2020
@gabrieldagama gabrieldagama added this to the 2.5 milestone Sep 29, 2020
@gabrieldagama gabrieldagama added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Sep 29, 2020
@sivaschenko sivaschenko added the CD Issue recommended for the contribution day label Oct 7, 2020
@engcom-Bravo engcom-Bravo self-assigned this Jan 22, 2021
@m2-assistant
Copy link

m2-assistant bot commented Jan 22, 2021

Hi @engcom-Bravo. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. 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!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

@engcom-Bravo
Copy link
Contributor

The issue is already fixed on the latest 2.4-develop

The response body returns the id number, not the text "id_idnumber"
whatever

We are closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CD Issue recommended for the contribution day Component: Catalog Component: Eav Event: mageconf Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Archived in project
Development

No branches or pull requests

10 participants