magento2
magento2 copied to clipboard
magento/magento2#37796: Fixed issue with adding new country regions
Fixed issue when the configuration 'general/region/state_required' gets reset to the default countries with a required states.
Description (*)
According to #37796 in \Magento\Directory\Setup\DataInstaller::class weren't declared proper logic of saving configuration 'general/region/state_required'. That could lead to problems for the web-site if you changed that configuration from the admin panel previously and then decided to add some new regions for some specific country. Based on that I've fixed the bug with the help of getting current configuration value before any DB updates, then I'm merging it with new data that should be added and finally updating the configuration with proper value.
Fixed Issues (if relevant)
- Fixes magento/magento2#37796
Manual testing scenarios (*)
- Go to the admin panel and open Stores > Settings > Configuration > General > General > State Options
- Unselect US from "State is Required for" and save configuration.
3.Then go to the project root and check with CLI command config value and make sure that US is not in there.
4.Then use this custom module to add Japan with regions to state_required config. RequiredVendor.zip 5.In case if my fix is applied you would get a proper result for config - including JP but still excluding US.
Contribution checklist (*)
- [x] Pull request has a meaningful description of its purpose
- [x] All commits are accompanied by meaningful commit messages
- [x] All new or changed code is covered with unit/integration tests (if applicable)
- [x] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- [ ] All automated tests passed successfully (all builds are green)
Hi @Yaroslav1301. Thank you for your contribution! Here are some useful tips on how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:
-
@magento give me test instance
- deploy test instance based on PR changes -
@magento give me 2.4-develop instance
- deploy vanilla Magento instance
:exclamation: Automated tests can be triggered manually with an appropriate comment:
-
@magento run all tests
- run or re-run all required tests against the PR changes -
@magento run <test-build(s)>
- run or re-run specific test build(s) For example:@magento run Unit Tests
<test-build(s)>
is a comma-separated list of build names.
Allowed build names are:
-
Database Compare
-
Functional Tests CE
-
Functional Tests EE
-
Functional Tests B2B
-
Integration Tests
-
Magento Health Index
-
Sample Data Tests CE
-
Sample Data Tests EE
-
Sample Data Tests B2B
-
Static Tests
-
Unit Tests
-
WebAPI Tests
-
Semantic Version Checker
You can find more information about the builds here :information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.
For more details, review the Code Contributions documentation. Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento run all tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run all tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run all tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run Functional Tests B2B, Functional Tests CE, Integration Tests, Static Tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run all tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
Hello @Yaroslav1301,
Thanks for the contribution!
Please check the static test failure.
Other, B2B and CE failures are different in 2 consecutive runs so they might be flaky.
Thanks
Hello @engcom-Hotel I've made an update for static tests.
@magento run all tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run Functional Tests EE
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run Functional Tests B2B, Functional Tests CE
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run all tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run Functional Tests B2B
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
:heavy_check_mark: QA Passed
Preconditions:
- Install fresh Magento
2.4-develop
Manual testing scenario:
- We have follow steps from comment
Before: :heavy_multiplication_x:
After: :heavy_check_mark:
Hence moving it to Merge In Progress
@magento run Integration Tests
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run Functional Tests EE
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.
@magento run all tests