{"data":{"id":"magento2-39992","source":"github-pr","sourceRef":"magento/magento2#39992","title":"Incorrect Scope Assigned to Price Attributes at Creation","pr":{"number":39992,"url":"https://github.com/magento/magento2/pull/39992","author":"rogerdz","mergedAt":"2026-01-31T13:09:37Z","mergeCommit":"15924184f63dcbc84e27df2b89df6b91e90d9449","headCommit":"213c887147fa26ca3e04d2504aa7286ac247060f","baseRef":"2.4-develop","diffSha256":"85360a64613eac9763db7339756333aa778d7d2e1202ba87152feeb7b13cbe4b"},"issues":[{"number":39986,"url":"https://github.com/magento/magento2/issues/39986","title":"Incorrect Scope Assigned to Price Attributes at Creation","labels":["Area: Pricing","Component: Attributes","Issue: Confirmed","Priority: P2","Progress: PR Created","Progress: done","Reported on 2.4.6","Reproduced on 2.4.x"],"kind":"human"}],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":"2.4.6","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":"clean","2.4.8-p1":"clean","2.4.8-p2":"clean","2.4.8-p3":"clean","2.4.8-p4":"clean","2.4.8-p5":"clean","2.4.9":"conflict"},"affectedVersions":["2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5"],"components":["magento/module-catalog"],"files":[{"path":"app/code/Magento/Catalog/Observer/ChangePriceAttributeScopeOnCreate.php","change":"added","package":"magento/module-catalog"},{"path":"app/code/Magento/Catalog/etc/events.xml","change":"modified","package":"magento/module-catalog"}],"stripped":{"tests":["dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Save/AttributePriceTest.php"],"docs":[],"outsideCode":[]},"linesChanged":51,"mergeBatched":false,"excluded":null,"sections":{"description":"When a price attribute is created and saved for the first time, its scope is incorrectly set to Store View, regardless of the configured setting.","stepsToReproduce":"1. Navigate to Stores > Configuration > Catalog > Catalog > Price > Catalog Price Scope and set the value to either Website or Global.\n2. Create a new custom attribute of type Price.\n3. Check the attribute scope in the admin grid or directly in the database (It will be Store View).","expectedResult":"The price attribute scope should match the value set in the configuration: Stores > Configuration > Catalog > Catalog > Price > Catalog Price Scope either Website or Global).","actualResult":"When a price attribute is created and saved for the first time, its scope is incorrectly set to Store View, regardless of the configured setting.","source":"issue"},"signatures":[],"labels":{"area":["Pricing"],"component":["Attributes"],"priority":"P2","severity":null,"reportedOn":["2.4.6"]},"categories":["Catalog/Product","Price/Tax"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"317dd2ffe4be5b6f2b7dec6854b3a944caccca88643fca965e8714c3f3c1f98b","isBugfix":0.9728,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9498,"feature":0.017,"refactor":0.0113,"tests_only":0.0082,"docs_only":0.0031,"dependency":0.0032,"cleanup":0.0074},"confidence":0.8864},"scope":{"score":0.6408,"probabilities":{"0":0.5262,"1":0.3068,"2":0.167},"confidence":0.0983},"risk":{"score":0.5792,"probabilities":{"0":0.6367,"1":0.1474,"2":0.2159},"confidence":0.2106},"area":{"choice":"catalog","probabilities":{"catalog":0.8899,"checkout":0.0066,"customer":0.0042,"admin":0.0705,"graphql_api":0.0035,"framework":0.0138,"frontend":0.0055,"other":0.006},"confidence":0.7682},"securityRelevant":0.0065,"reportedVersion":{"choice":"2.4.6","probabilities":{"2.4.0":0.0024,"2.4.0-p1":0.0023,"2.4.1":0.002,"2.4.1-p1":0.002,"2.4.2":0.0023,"2.4.2-p1":0.0021,"2.4.2-p2":0.0023,"2.4.3":0.0032,"2.4.3-p1":0.0035,"2.4.3-p2":0.0031,"2.4.3-p3":0.0029,"2.4.4":0.0035,"2.4.4-p1":0.0027,"2.4.4-p10":0.0026,"2.4.4-p11":0.0032,"2.4.4-p12":0.0032,"2.4.4-p13":0.0033,"2.4.4-p14":0.0036,"2.4.4-p15":0.003,"2.4.4-p16":0.0035,"2.4.4-p17":0.0031,"2.4.4-p18":0.0028,"2.4.4-p2":0.0021,"2.4.4-p3":0.0023,"2.4.4-p4":0.0027,"2.4.4-p5":0.0028,"2.4.4-p6":0.0043,"2.4.4-p7":0.0037,"2.4.4-p8":0.0038,"2.4.4-p9":0.0027,"2.4.5":0.0063,"2.4.5-p1":0.0033,"2.4.5-p10":0.0026,"2.4.5-p11":0.0032,"2.4.5-p12":0.0055,"2.4.5-p13":0.004,"2.4.5-p14":0.0039,"2.4.5-p15":0.0033,"2.4.5-p16":0.0044,"2.4.5-p17":0.0033,"2.4.5-p2":0.0023,"2.4.5-p3":0.0024,"2.4.5-p4":0.0031,"2.4.5-p5":0.0034,"2.4.5-p6":0.0042,"2.4.5-p7":0.0028,"2.4.5-p8":0.0037,"2.4.5-p9":0.0023,"2.4.6":0.2894,"2.4.6-p1":0.0275,"2.4.6-p10":0.0179,"2.4.6-p11":0.0171,"2.4.6-p12":0.0147,"2.4.6-p13":0.0127,"2.4.6-p14":0.0148,"2.4.6-p15":0.0075,"2.4.6-p2":0.0056,"2.4.6-p3":0.0098,"2.4.6-p4":0.0151,"2.4.6-p5":0.0133,"2.4.6-p6":0.0161,"2.4.6-p7":0.0097,"2.4.6-p8":0.0101,"2.4.6-p9":0.0059,"2.4.7":0.0284,"2.4.7-p1":0.0137,"2.4.7-p10":0.0056,"2.4.7-p2":0.0065,"2.4.7-p3":0.0101,"2.4.7-p4":0.0129,"2.4.7-p5":0.0079,"2.4.7-p6":0.0141,"2.4.7-p7":0.0075,"2.4.7-p8":0.0075,"2.4.7-p9":0.0046,"2.4.8":0.1092,"2.4.8-p1":0.0248,"2.4.8-p2":0.0154,"2.4.8-p3":0.014,"2.4.8-p4":0.0147,"2.4.8-p5":0.0107,"2.4.9":0.0047,"unspecified":0.0495},"confidence":0.0939},"backportWorthy":{"score":1.5758,"probabilities":{"0":0.0981,"1":0.228,"2":0.6739},"confidence":0.2736}},"curated":{"title":"Fixes new price attributes getting Store View scope instead of the price scope","description":"A new custom attribute of type Price gets the Store View scope, whatever the Catalog Price Scope configuration says, unless that configuration is saved at least once. A new ChangePriceAttributeScopeOnCreate observer on catalog_entity_attribute_save_before sets a new price attribute to Website scope when Catalog Price Scope is Website and to Global otherwise.","categories":["Catalog/Product","Price/Tax"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":{"2.4.8-p5":{"before":"not-runnable","after":"error","adapted":false,"runAt":"2026-10-06T09:29:00.342Z","releaseCommit":"870a22c63d9d9b68fa3297962e2d5d5841115814","suites":{"integration":{"before":"not-runnable","after":"error","runAt":"2026-10-06T09:29:00.342Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-39992 details"}