{"data":{"id":"magento2-38927","source":"github-pr","sourceRef":"magento/magento2#38927","title":"Default Product Attribute Settings Issue","pr":{"number":38927,"url":"https://github.com/magento/magento2/pull/38927","author":"rostilos","mergedAt":"2024-12-13T16:06:45Z","mergeCommit":"960c68da5c41dd467503485ef1f1979d8651b08c","headCommit":"da5e7cc0b723b0ba4183a26c29742cdc47a32e45","baseRef":"2.4-develop","diffSha256":"0704c5fe1e419da55e72e1bec5e7e936ada592bb0eccc7f986d8233401ad7298"},"issues":[{"number":38703,"url":"https://github.com/magento/magento2/issues/38703","title":"Default Product Attribute Settings Issue","labels":["Area: Performance","Component: Attributes","Issue: Confirmed","Priority: P1","Progress: done","Reported on 2.4.7","Reproduced on 2.4.x"],"kind":"human"}],"fixedIn":"2.4.8","containingTags":["2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5","2.4.9"],"reportedOn":"2.4.7","codeMatch":{"2.4.6":"conflict","2.4.6-p1":"conflict","2.4.6-p2":"conflict","2.4.6-p3":"conflict","2.4.6-p4":"conflict","2.4.6-p5":"conflict","2.4.6-p6":"conflict","2.4.6-p7":"conflict","2.4.6-p8":"conflict","2.4.6-p9":"conflict","2.4.6-p10":"conflict","2.4.6-p11":"conflict","2.4.6-p12":"conflict","2.4.6-p13":"conflict","2.4.6-p14":"conflict","2.4.6-p15":"conflict","2.4.7":"conflict","2.4.7-p1":"conflict","2.4.7-p2":"conflict","2.4.7-p3":"conflict","2.4.7-p4":"conflict","2.4.7-p5":"conflict","2.4.7-p6":"conflict","2.4.7-p7":"conflict","2.4.7-p8":"conflict","2.4.7-p9":"conflict","2.4.7-p10":"conflict","2.4.8":"conflict","2.4.8-p1":"conflict","2.4.8-p2":"conflict","2.4.8-p3":"conflict","2.4.8-p4":"conflict","2.4.8-p5":"conflict","2.4.9":"conflict"},"affectedVersions":[],"components":["magento/module-catalog","magento/module-swatches"],"files":[{"path":"app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php","change":"modified","package":"magento/module-catalog"},{"path":"app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml","change":"modified","package":"magento/module-catalog"},{"path":"app/code/Magento/Catalog/view/adminhtml/web/js/options.js","change":"modified","package":"magento/module-catalog"},{"path":"app/code/Magento/Swatches/view/adminhtml/templates/catalog/product/attribute/text.phtml","change":"modified","package":"magento/module-swatches"},{"path":"app/code/Magento/Swatches/view/adminhtml/templates/catalog/product/attribute/visual.phtml","change":"modified","package":"magento/module-swatches"},{"path":"app/code/Magento/Swatches/view/adminhtml/web/js/text.js","change":"modified","package":"magento/module-swatches"},{"path":"app/code/Magento/Swatches/view/adminhtml/web/js/visual.js","change":"modified","package":"magento/module-swatches"}],"stripped":{"tests":["app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection/AttributePropertiesSection.xml","app/code/Magento/Swatches/Test/Mftf/ActionGroup/AddVisualSwatchActionGroup.xml","app/code/Magento/Swatches/Test/Mftf/Test/AdminProductAttributeVisualSwatchIsResetDefaultTest.xml"],"docs":[],"outsideCode":[]},"linesChanged":161,"mergeBatched":false,"excluded":null,"sections":{"description":"Scenario 1: Once a default is set, there is no way to turn defaults off for that option\nScenario 2: Once a default is set, after we deselect it , its never saved","stepsToReproduce":"1. Go into admin view \n2. Select Stores in admin side panel \n3. Select product under attributes \n\n Scenario 1:\n\n4. Select an attribute to edit which has Catalog Input Type for Store Owner is Visual swatch or dropdown\n5. If the \"is default\" option is selected, there is no way to set the attribute to no longer have a default option\n\nScenario 2:\n\n6. Select an attribute to edit which has Catalog Input Type for Store Owner is Multiple Select\n7. If you deselect the default option then save or save and continue it still is set as the default\n8. If you select multiple options as default and deselect the default options then save or save and continue all the options \n    are selected as default","expectedResult":"Scenario 1: If a default is selected, there would be a way to unselect having a default set\n Scenario 2: If you deselect the default option then save or save and continue it should removed from default","actualResult":"Scenario 1: Once a default is set, there is no way to turn defaults off for that option\nScenario 2: Once a default is set, after we deselect it , its never saved","source":"issue"},"signatures":[],"labels":{"area":["Performance"],"component":["Attributes"],"priority":"P1","severity":null,"reportedOn":["2.4.7"]},"categories":["Catalog/Product"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"358895ecb095b18fd3c87518837f278e3937e443bef063bdfd1caec2c009dc01","isBugfix":0.9639,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9126,"feature":0.0552,"refactor":0.0126,"tests_only":0.0097,"docs_only":0.0044,"dependency":0.0055},"confidence":0.8034},"scope":{"score":1.0197,"probabilities":{"0":0.297,"1":0.3864,"2":0.3166},"confidence":0.0066},"risk":{"score":0.7528,"probabilities":{"0":0.2804,"1":0.6864,"2":0.0332},"confidence":0.3263},"area":{"choice":"catalog","probabilities":{"catalog":0.5905,"checkout":0.0031,"customer":0.0027,"admin":0.3686,"graphql_api":0.0023,"framework":0.0054,"frontend":0.0234,"other":0.004},"confidence":0.4115},"securityRelevant":0.0062,"reportedVersion":{"choice":"2.4.7","probabilities":{"2.4.0":0.0026,"2.4.0-p1":0.0026,"2.4.1":0.0024,"2.4.1-p1":0.0025,"2.4.2":0.0027,"2.4.2-p1":0.0027,"2.4.2-p2":0.0028,"2.4.3":0.003,"2.4.3-p1":0.0032,"2.4.3-p2":0.0036,"2.4.3-p3":0.0032,"2.4.4":0.003,"2.4.4-p1":0.003,"2.4.4-p10":0.0034,"2.4.4-p11":0.0034,"2.4.4-p12":0.0034,"2.4.4-p13":0.0034,"2.4.4-p14":0.0035,"2.4.4-p15":0.0032,"2.4.4-p16":0.0033,"2.4.4-p17":0.0038,"2.4.4-p18":0.0033,"2.4.4-p2":0.0025,"2.4.4-p3":0.0027,"2.4.4-p4":0.0029,"2.4.4-p5":0.003,"2.4.4-p6":0.0033,"2.4.4-p7":0.0038,"2.4.4-p8":0.0034,"2.4.4-p9":0.0028,"2.4.5":0.0037,"2.4.5-p1":0.0033,"2.4.5-p10":0.0029,"2.4.5-p11":0.004,"2.4.5-p12":0.0042,"2.4.5-p13":0.0038,"2.4.5-p14":0.0044,"2.4.5-p15":0.0033,"2.4.5-p16":0.0032,"2.4.5-p17":0.0036,"2.4.5-p2":0.0027,"2.4.5-p3":0.0028,"2.4.5-p4":0.0032,"2.4.5-p5":0.0031,"2.4.5-p6":0.0034,"2.4.5-p7":0.0039,"2.4.5-p8":0.0033,"2.4.5-p9":0.0027,"2.4.6":0.0074,"2.4.6-p1":0.0092,"2.4.6-p10":0.0065,"2.4.6-p11":0.0076,"2.4.6-p12":0.0076,"2.4.6-p13":0.0071,"2.4.6-p14":0.0077,"2.4.6-p15":0.0064,"2.4.6-p2":0.0033,"2.4.6-p3":0.0039,"2.4.6-p4":0.0055,"2.4.6-p5":0.0053,"2.4.6-p6":0.0054,"2.4.6-p7":0.0069,"2.4.6-p8":0.0044,"2.4.6-p9":0.0032,"2.4.7":0.5955,"2.4.7-p1":0.016,"2.4.7-p10":0.0083,"2.4.7-p2":0.01,"2.4.7-p3":0.0112,"2.4.7-p4":0.0115,"2.4.7-p5":0.0101,"2.4.7-p6":0.0097,"2.4.7-p7":0.0119,"2.4.7-p8":0.0079,"2.4.7-p9":0.0057,"2.4.8":0.0062,"2.4.8-p1":0.0054,"2.4.8-p2":0.0055,"2.4.8-p3":0.0057,"2.4.8-p4":0.0052,"2.4.8-p5":0.0055,"2.4.9":0.0054,"unspecified":0.012},"confidence":0.3494},"backportWorthy":{"score":1.5322,"probabilities":{"0":0.0931,"1":0.2816,"2":0.6253},"confidence":0.2185}},"curated":{"title":"Fixes the issue where a default attribute option cannot be unselected","description":"In the admin product attribute page, once a default option is set there is no way to turn defaults off for dropdown, Visual and Text Swatch attributes. The change adds a Reset Is Default button under the options list that unchecks the default options, and the attribute Save controller sets default_value to null when reset_is-default_option is sent.","categories":["Catalog/Product"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-38927 details"}