{"data":{"id":"magento2-38076","source":"github-pr","sourceRef":"magento/magento2#38076","title":"Upgrading Magento resets general/region/state_required when new country with required state/region is added.","pr":{"number":38076,"url":"https://github.com/magento/magento2/pull/38076","author":"yaroslav-kozar","mergedAt":"2024-05-28T15:06:26Z","mergeCommit":"30a4b6e2675f9aee3f59ed729141cb4e2bebc88e","headCommit":"0f4696b3be7568fc59b4751e4011ad4f0d18522b","baseRef":"2.4-develop","diffSha256":"9669ebaedff792f32decb49ee367cbb747a56d43593985272d3b64c28af28586"},"issues":[{"number":37796,"url":"https://github.com/magento/magento2/issues/37796","title":"Upgrading Magento resets general/region/state_required when new country with required state/region is added.","labels":["Area: Framework","Component: Backend","Issue: Confirmed","Priority: P2","Progress: done","Reported on 2.4.x","Reproduced on 2.4.x","Triage: Dev.Experience"],"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":null,"codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","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":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10"],"components":["magento/module-directory"],"files":[{"path":"app/code/Magento/Directory/Setup/DataInstaller.php","change":"modified","package":"magento/module-directory"}],"stripped":{"tests":["dev/tests/integration/testsuite/Magento/Directory/Setup/DataInstallerTest.php"],"docs":[],"outsideCode":[]},"linesChanged":47,"mergeBatched":false,"excluded":null,"sections":{"description":null,"stepsToReproduce":null,"expectedResult":null,"actualResult":null,"source":null},"signatures":[],"labels":{"area":["Framework"],"component":["Backend"],"priority":"P2","severity":null,"reportedOn":["2.4.x"]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"604fde1bd29d79566bd373b4007be487afffa0f7f03012fa422dab64887b4a43","isBugfix":0.9797,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9657,"feature":0.0093,"refactor":0.011,"tests_only":0.0078,"docs_only":0.0029,"dependency":0.0033},"confidence":0.9195},"scope":{"score":0.8062,"probabilities":{"0":0.3675,"1":0.4588,"2":0.1737},"confidence":0.0636},"risk":{"score":0.4663,"probabilities":{"0":0.648,"1":0.2378,"2":0.1142},"confidence":0.2342},"area":{"choice":"framework","probabilities":{"catalog":0.0215,"checkout":0.0787,"customer":0.0437,"admin":0.2842,"graphql_api":0.006,"framework":0.4102,"frontend":0.0183,"other":0.1374},"confidence":0.1735},"securityRelevant":0.0067,"reportedVersion":{"choice":"2.4.6","probabilities":{"2.4.0":0.0023,"2.4.0-p1":0.0025,"2.4.1":0.0021,"2.4.1-p1":0.0022,"2.4.2":0.0032,"2.4.2-p1":0.0032,"2.4.2-p2":0.0041,"2.4.3":0.0054,"2.4.3-p1":0.0054,"2.4.3-p2":0.0055,"2.4.3-p3":0.0039,"2.4.4":0.0034,"2.4.4-p1":0.0042,"2.4.4-p10":0.0032,"2.4.4-p11":0.0038,"2.4.4-p12":0.004,"2.4.4-p13":0.0042,"2.4.4-p14":0.0041,"2.4.4-p15":0.0037,"2.4.4-p16":0.0037,"2.4.4-p17":0.0034,"2.4.4-p18":0.0029,"2.4.4-p2":0.002,"2.4.4-p3":0.0021,"2.4.4-p4":0.0023,"2.4.4-p5":0.0029,"2.4.4-p6":0.0038,"2.4.4-p7":0.0031,"2.4.4-p8":0.0029,"2.4.4-p9":0.0027,"2.4.5":0.008,"2.4.5-p1":0.0062,"2.4.5-p10":0.0035,"2.4.5-p11":0.0053,"2.4.5-p12":0.0054,"2.4.5-p13":0.0051,"2.4.5-p14":0.0047,"2.4.5-p15":0.0041,"2.4.5-p16":0.0049,"2.4.5-p17":0.0044,"2.4.5-p2":0.0022,"2.4.5-p3":0.0029,"2.4.5-p4":0.003,"2.4.5-p5":0.0027,"2.4.5-p6":0.0045,"2.4.5-p7":0.0029,"2.4.5-p8":0.0036,"2.4.5-p9":0.0023,"2.4.6":0.4361,"2.4.6-p1":0.0398,"2.4.6-p10":0.0155,"2.4.6-p11":0.0157,"2.4.6-p12":0.013,"2.4.6-p13":0.013,"2.4.6-p14":0.0116,"2.4.6-p15":0.0095,"2.4.6-p2":0.0072,"2.4.6-p3":0.0152,"2.4.6-p4":0.0156,"2.4.6-p5":0.021,"2.4.6-p6":0.0257,"2.4.6-p7":0.0146,"2.4.6-p8":0.0103,"2.4.6-p9":0.0075,"2.4.7":0.0074,"2.4.7-p1":0.0068,"2.4.7-p10":0.0047,"2.4.7-p2":0.0051,"2.4.7-p3":0.0074,"2.4.7-p4":0.0077,"2.4.7-p5":0.0064,"2.4.7-p6":0.0078,"2.4.7-p7":0.0059,"2.4.7-p8":0.0044,"2.4.7-p9":0.0029,"2.4.8":0.0047,"2.4.8-p1":0.0059,"2.4.8-p2":0.0069,"2.4.8-p3":0.0075,"2.4.8-p4":0.007,"2.4.8-p5":0.0074,"2.4.9":0.0052,"unspecified":0.0397},"confidence":0.1881},"backportWorthy":{"score":1.4588,"probabilities":{"0":0.1325,"1":0.2762,"2":0.5913},"confidence":0.1652}},"curated":{"title":"Adding new country regions resets the general/region/state_required config","description":"When new regions are added for some specific country, general/region/state_required gets reset to the default countries with required states, even if you changed that configuration from the admin panel previously. Directory DataInstaller::addCountryRegions now gets the current default value from core_config_data before any DB updates, adds the country of each new region and saves that list.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":{"2.4.7-p10":{"before":"fail","after":"pass","adapted":false,"runAt":"2026-10-06T09:38:58.738Z","releaseCommit":"72561bf80652f57cc642a03e2c9a51d74a285b14","suites":{"integration":{"before":"fail","after":"pass","runAt":"2026-10-06T09:38:58.738Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-38076 details"}