Closed
Description
Preconditions
- Magento 2.1.8
- PHP7
Steps to reproduce
- Create a select attribute
- Make this attribute use visual or text swatch
- 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.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.1 release lineThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 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 development