Skip to content

Create attribute option via API for swatch attribute fails #10707

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

Closed
bartlubbersen opened this issue Aug 30, 2017 · 4 comments
Closed

Create attribute option via API for swatch attribute fails #10707

bartlubbersen opened this issue Aug 30, 2017 · 4 comments
Assignees
Labels
bug report Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line 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

Comments

@bartlubbersen
Copy link
Contributor

Preconditions

  1. Magento 2.1.8
  2. PHP7

Steps to reproduce

  1. Create a select attribute
  2. Make this attribute use visual or text swatch
  3. Try adding attribute options through the API via POST /V1/products/attributes/{attributeCode}/options

Expected result

The attribute options should be added the same as without swatch options selected for attribute.

Actual result

Although the API is not giving any errors and returns true with code 200, the option is not added to the attribute.

Problem

The problem is due to the swatch module plugin EavAttribute, in this plugin the option value is overwritten by optionvisual or optiontext. This is because these are used for the tables in the back-end. However through the API it is only possible to enter a value for option. So the option you entered through the API is replaced by an empty value.

@bartlubbersen
Copy link
Contributor Author

This issue seems to be the same as #10737

@bartlubbersen bartlubbersen reopened this Sep 7, 2017
@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 11, 2017
@okorshenko okorshenko added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Sep 14, 2017
@magento-engcom-team
Copy link
Contributor

@bartlubbersen thank you for your bug report.
We've created internal ticket MAGETWO-75336 to track progress on the issue

@gomencal
Copy link
Contributor

gomencal commented Nov 4, 2017

I am working on it at #mm17es :)

@okorshenko
Copy link
Contributor

The issue has been fixed and delivered to 2.1-develop and 2.2-develop branches

@okorshenko okorshenko added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line 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
Projects
None yet
Development

No branches or pull requests

6 participants