Closed
Description
Preconditions
- Tested with
2.4-develop
branch - PHP 7.1.22 & 7.2
Steps to reproduce
- Setup a clean Magento installation
- Create an Integration with full access rights & activate it, I'm assuming the access token is
abcd
(see step 4) - Using the adminhtml, create a new
dropdown
product attribute, use attribute code:dropdown
- 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
- Return value should be the ID of the new option
Actual result
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.
Metadata
Metadata
Assignees
Labels
Issue recommended for the contribution dayGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Type
Projects
Status
Done