Skip to content

Update zip_codes.xml patterns for Guernsey & Jersey #33128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 24, 2021

Conversation

DrJohnM
Copy link
Contributor

@DrJohnM DrJohnM commented Jun 2, 2021

Update zip_codes.xml patterns for Guernsey to support GY10 postcodes for the Island of Sark e.g. https://en.wikipedia.org/wiki/GY_postcode_area

Description (*)

Guernsey postcodes for the island of Sark start with GY10 e.g. "GY10 1PB" which the previous "pattern" did not cover.

Source:

Manual testing scenarios (*)

  1. Add product to basket
  2. Go to checkout
  3. Select "Guernsey" as country for shipping address
  4. Use postcode of "GY10 1PB" (Sark Post Office)

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • 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)

Resolved issues:

  1. resolves [Issue] Update zip_codes.xml patterns for Guernsey #33144: Update zip_codes.xml patterns for Guernsey

Update zip_codes.xml patterns for Guernsey to support GY10 postcodes for the Island of Sark e.g. https://en.wikipedia.org/wiki/GY_postcode_area
@m2-assistant
Copy link

m2-assistant bot commented Jun 2, 2021

Hi @DrJohnM. Thank you for your contribution
Here are some useful tips 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

❗ 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:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@DrJohnM
Copy link
Contributor Author

DrJohnM commented Jun 2, 2021

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@DrJohnM
Copy link
Contributor Author

DrJohnM commented Jun 3, 2021

@magento run Functional Tests EE, Functional Tests B2B

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@gabrieldagama
Copy link
Contributor

@magento create issue

@gabrieldagama gabrieldagama added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jun 3, 2021
@Den4ik
Copy link
Contributor

Den4ik commented Jun 3, 2021

@magento run Functional Tests EE, Functional Tests B2B

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@Den4ik
Copy link
Contributor

Den4ik commented Jun 3, 2021

Guernsey postcodes start from GY. Why do we allow all chars in patterns?

Updates to restrict postcodes to GY, inline with suggestion from contributor "Den4ik".
@DrJohnM
Copy link
Contributor Author

DrJohnM commented Jun 4, 2021

Guernsey postcodes start from GY. Why do we allow all chars in patterns?

Updates made https://github.com/magento/magento2/pull/33128/files

@DrJohnM
Copy link
Contributor Author

DrJohnM commented Jun 4, 2021

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@DrJohnM
Copy link
Contributor Author

DrJohnM commented Jun 4, 2021

@magento run Integration Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@@ -258,7 +258,8 @@
</zip>
<zip countryCode="GG">
<codes>
<code id="pattern_1" active="true" example="AB1 2CD">^[a-zA-Z]{2}[0-9]{1}\s[0-9]{1}[a-zA-Z]{2}$</code>
<code id="pattern_1" active="true" example="GY1 2AB">^GY[0-9]{1}\s[0-9]{1}[a-zA-Z]{2}$</code>
<code id="pattern_2" active="true" example="GY10 1PB">^GY[0-9]{2}\s?[0-9]{1}[a-zA-Z]{2}$</code>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just expand a single pattern instead of adding a new one (GY[0-9]{1} -> GY[0-9]{2}).

Would be really nice to cover this revealed case with a unit test.

After changes are applied and all builds are green, please squash them into a single commit so that we have perfectly clean history 😉

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just expand a single pattern instead of adding a new one (GY[0-9]{1} -> GY[0-9]{2}).

@orlangur postcode could have digit from 0-9 or 10.

I suggest another pattern ^GY([0-9]|10)\s[0-9][a-zA-Z]{2}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied updates via d2e11d0

I also fixed another bug with Jersey postcodes if customers enter postcodes without spaces.

@Den4ik
Copy link
Contributor

Den4ik commented Jun 23, 2021

@engcom-Alfa Thanks for the comment. I believe that writing postcodes by small chars is incorrect, but may be it make sense.
2-3. Good point

@DrJohnM Could you update PR?

@engcom-Bravo
Copy link
Contributor

@DrJohnM @Den4ik And @engcom-Alfa Thanks for your contribution!
@DrJohnM I am working on the requested changes.

@engcom-Bravo
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

2 similar comments
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Bravo
Copy link
Contributor

Hi @Den4ik ,

I have updated PR with requested changes.

Requesting you for review.

Thank You!

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-9122 has been created to process this Pull Request

@m2-assistant
Copy link

m2-assistant bot commented Oct 24, 2021

Hi @DrJohnM, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: category of expertise Component: Directory Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Update zip_codes.xml patterns for Guernsey
8 participants