{"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":"bae4a7455fc03a1c3ebda6ff27a9695a4fd94684255da53e991ee851599eeb4b","isBugfix":0.9816,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9622,"feature":0.0082,"refactor":0.01,"tests_only":0.0071,"docs_only":0.0026,"dependency":0.0029,"cleanup":0.007},"confidence":0.9137},"scope":{"score":0.8425,"probabilities":{"0":0.3468,"1":0.4639,"2":0.1893},"confidence":0.057},"risk":{"score":0.4839,"probabilities":{"0":0.6365,"1":0.2432,"2":0.1203},"confidence":0.2181},"area":{"choice":"framework","probabilities":{"catalog":0.0206,"checkout":0.0798,"customer":0.0534,"admin":0.2704,"graphql_api":0.006,"framework":0.4176,"frontend":0.016,"other":0.1362},"confidence":0.1726},"securityRelevant":0.0067,"reportedVersion":{"choice":"2.4.6","probabilities":{"2.4.0":0.0024,"2.4.0-p1":0.0025,"2.4.1":0.0021,"2.4.1-p1":0.0021,"2.4.2":0.0034,"2.4.2-p1":0.0032,"2.4.2-p2":0.0047,"2.4.3":0.005,"2.4.3-p1":0.0048,"2.4.3-p2":0.0055,"2.4.3-p3":0.0037,"2.4.4":0.0039,"2.4.4-p1":0.0045,"2.4.4-p10":0.0035,"2.4.4-p11":0.0036,"2.4.4-p12":0.0045,"2.4.4-p13":0.0044,"2.4.4-p14":0.0046,"2.4.4-p15":0.0042,"2.4.4-p16":0.0043,"2.4.4-p17":0.0035,"2.4.4-p18":0.003,"2.4.4-p2":0.002,"2.4.4-p3":0.0021,"2.4.4-p4":0.0023,"2.4.4-p5":0.0028,"2.4.4-p6":0.0036,"2.4.4-p7":0.003,"2.4.4-p8":0.0028,"2.4.4-p9":0.0025,"2.4.5":0.0084,"2.4.5-p1":0.0062,"2.4.5-p10":0.0036,"2.4.5-p11":0.0053,"2.4.5-p12":0.0056,"2.4.5-p13":0.0048,"2.4.5-p14":0.0047,"2.4.5-p15":0.0045,"2.4.5-p16":0.0045,"2.4.5-p17":0.0041,"2.4.5-p2":0.0023,"2.4.5-p3":0.0029,"2.4.5-p4":0.0031,"2.4.5-p5":0.0029,"2.4.5-p6":0.0046,"2.4.5-p7":0.0032,"2.4.5-p8":0.0037,"2.4.5-p9":0.0024,"2.4.6":0.4496,"2.4.6-p1":0.0406,"2.4.6-p10":0.0151,"2.4.6-p11":0.0149,"2.4.6-p12":0.0131,"2.4.6-p13":0.0109,"2.4.6-p14":0.0109,"2.4.6-p15":0.0099,"2.4.6-p2":0.0075,"2.4.6-p3":0.0164,"2.4.6-p4":0.0157,"2.4.6-p5":0.0196,"2.4.6-p6":0.0223,"2.4.6-p7":0.0136,"2.4.6-p8":0.0114,"2.4.6-p9":0.0072,"2.4.7":0.0067,"2.4.7-p1":0.0061,"2.4.7-p10":0.0045,"2.4.7-p2":0.0048,"2.4.7-p3":0.007,"2.4.7-p4":0.0074,"2.4.7-p5":0.0059,"2.4.7-p6":0.008,"2.4.7-p7":0.0056,"2.4.7-p8":0.0043,"2.4.7-p9":0.0027,"2.4.8":0.0043,"2.4.8-p1":0.0056,"2.4.8-p2":0.0067,"2.4.8-p3":0.0073,"2.4.8-p4":0.0068,"2.4.8-p5":0.0067,"2.4.9":0.0047,"unspecified":0.0349},"confidence":0.1995},"backportWorthy":{"score":1.5287,"probabilities":{"0":0.1089,"1":0.2535,"2":0.6376},"confidence":0.224}},"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"}