{"data":{"id":"ACSD-63454","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where the default value for a dropdown and multi-select attributes is not saved properly in the database.","categories":["Admin","Other"],"components":["magento/module-catalog","magento/module-eav","magento/module-swatches"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-59/acsd-63454-default-value-for-a-dropdown","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-59/acsd-63454-default-value-for-a-dropdown.md","blobSha":"85cb46746abfaff926b000c6592ec93aa7a85fa0","description":"The default value for Dropdown and Multiple Select attributes is not saved correctly in the database; instead of updating the default value, the new value is appended to the old one, separated by a comma.","stepsToReproduce":"1. Login to the backend, go to Stores > Attributes > Product. 1. Click Add New Attribute. 1. In the Properties tab, set the following: * Default Label: test * Catalog Input Type for Store Owner: Multiple Select * Manage Options: Add two options without selecting Is Default. 1. Click Save Attribute. 1. Check in the databasse that the default_value column is empty. select attribute_code, default_value from eav_attribute where attribute_code = 'test'; 1. Go back and set one of the two options as Is Default. 1. Check the database again to ensure that default_value now contains the selected option ID. 1. Go back and change the default option by selecting the other option.","introducedInQpt":"1.1.59","createdFor":["2.4.7-p2"],"documentedRange":"2.4.7 - 2.4.7-p3","scheduledFixRelease":"2.4.8"},"files":[{"package":"magento/magento2-base","constraint":">=2.4.7 <2.4.8","path":"patches/os/ACSD-63454_2.4.7-p2.patch","blobSha":"e4a10a2780f5c281ee1f9934c534af4d38643d5b","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/ACSD-63454_2.4.7-p2.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-catalog/Controller/Adminhtml/Product/Attribute/Save.php","change":"modified","package":"magento/module-catalog"},{"path":"vendor/magento/module-catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml","change":"modified","package":"magento/module-catalog"},{"path":"vendor/magento/module-catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml","change":"modified","package":"magento/module-catalog"},{"path":"vendor/magento/module-catalog/view/adminhtml/web/js/options.js","change":"modified","package":"magento/module-catalog"},{"path":"vendor/magento/module-eav/Model/ResourceModel/Entity/Attribute.php","change":"modified","package":"magento/module-eav"},{"path":"vendor/magento/module-swatches/view/adminhtml/templates/catalog/product/attribute/text.phtml","change":"modified","package":"magento/module-swatches"},{"path":"vendor/magento/module-swatches/view/adminhtml/templates/catalog/product/attribute/visual.phtml","change":"modified","package":"magento/module-swatches"},{"path":"vendor/magento/module-swatches/view/adminhtml/web/js/text.js","change":"modified","package":"magento/module-swatches"},{"path":"vendor/magento/module-swatches/view/adminhtml/web/js/visual.js","change":"modified","package":"magento/module-swatches"}],"packages":["magento/module-catalog","magento/module-eav","magento/module-swatches"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"magento-commerce":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"magento-commerce":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"mage-os":[]},"conditions":null,"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch ACSD-63454 details"}