{"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":"1b9e1001b85b0533c6310a6ab70add93dc47a19c7f89c41e13f55c0d08cfa179","isBugfix":0.975,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9544,"feature":0.0167,"refactor":0.013,"tests_only":0.0088,"docs_only":0.0033,"dependency":0.0038},"confidence":0.8936},"scope":{"score":0.6129,"probabilities":{"0":0.5437,"1":0.2996,"2":0.1567},"confidence":0.1149},"risk":{"score":0.5537,"probabilities":{"0":0.6527,"1":0.1409,"2":0.2064},"confidence":0.2327},"area":{"choice":"catalog","probabilities":{"catalog":0.8872,"checkout":0.0066,"customer":0.0043,"admin":0.0727,"graphql_api":0.0036,"framework":0.0143,"frontend":0.0054,"other":0.0059},"confidence":0.7632},"securityRelevant":0.0066,"reportedVersion":{"choice":"2.4.6","probabilities":{"2.4.0":0.0024,"2.4.0-p1":0.0023,"2.4.1":0.0021,"2.4.1-p1":0.0021,"2.4.2":0.0024,"2.4.2-p1":0.0023,"2.4.2-p2":0.0023,"2.4.3":0.0034,"2.4.3-p1":0.0033,"2.4.3-p2":0.0033,"2.4.3-p3":0.0031,"2.4.4":0.0034,"2.4.4-p1":0.0028,"2.4.4-p10":0.0027,"2.4.4-p11":0.003,"2.4.4-p12":0.0032,"2.4.4-p13":0.0034,"2.4.4-p14":0.0039,"2.4.4-p15":0.003,"2.4.4-p16":0.0036,"2.4.4-p17":0.0029,"2.4.4-p18":0.0027,"2.4.4-p2":0.0021,"2.4.4-p3":0.0024,"2.4.4-p4":0.0025,"2.4.4-p5":0.0028,"2.4.4-p6":0.0042,"2.4.4-p7":0.0036,"2.4.4-p8":0.0035,"2.4.4-p9":0.0028,"2.4.5":0.0055,"2.4.5-p1":0.0031,"2.4.5-p10":0.0026,"2.4.5-p11":0.0031,"2.4.5-p12":0.0052,"2.4.5-p13":0.0038,"2.4.5-p14":0.0047,"2.4.5-p15":0.0032,"2.4.5-p16":0.0039,"2.4.5-p17":0.0035,"2.4.5-p2":0.0023,"2.4.5-p3":0.0025,"2.4.5-p4":0.0029,"2.4.5-p5":0.0035,"2.4.5-p6":0.0046,"2.4.5-p7":0.0031,"2.4.5-p8":0.004,"2.4.5-p9":0.0025,"2.4.6":0.2639,"2.4.6-p1":0.027,"2.4.6-p10":0.0163,"2.4.6-p11":0.0192,"2.4.6-p12":0.0184,"2.4.6-p13":0.0136,"2.4.6-p14":0.0139,"2.4.6-p15":0.0088,"2.4.6-p2":0.0055,"2.4.6-p3":0.011,"2.4.6-p4":0.0163,"2.4.6-p5":0.0133,"2.4.6-p6":0.0176,"2.4.6-p7":0.0101,"2.4.6-p8":0.0108,"2.4.6-p9":0.0066,"2.4.7":0.0305,"2.4.7-p1":0.0133,"2.4.7-p10":0.0054,"2.4.7-p2":0.0061,"2.4.7-p3":0.0105,"2.4.7-p4":0.0197,"2.4.7-p5":0.0086,"2.4.7-p6":0.0155,"2.4.7-p7":0.0076,"2.4.7-p8":0.008,"2.4.7-p9":0.0048,"2.4.8":0.0918,"2.4.8-p1":0.0265,"2.4.8-p2":0.0174,"2.4.8-p3":0.016,"2.4.8-p4":0.0139,"2.4.8-p5":0.0109,"2.4.9":0.0054,"unspecified":0.0643},"confidence":0.0787},"backportWorthy":{"score":1.5754,"probabilities":{"0":0.0941,"1":0.2363,"2":0.6696},"confidence":0.2695}},"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"}