-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2024-04-15] Address - Saved address without zip code is not reflected on secondary device #39168
Comments
Triggered auto assignment to @laurenreidexpensify ( |
@laurenreidexpensify I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
This looks BE to me. And it still works with some places like Cairo Desert. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Saving an address without zip code isn't reflected on the secondary device. What is the root cause of that problem?When we save an address with the US (or some other countries) as the country without a zip code, the request actually fails, that's why it's not reflected on the 2nd device. For the US country, a zip code is required. This issue happens after this PR. We have a list of zip code regex for each country here: If it's a US country, then it will use the regex for the US address. However, we only apply the regex if the zip code is not empty. App/src/components/AddressForm.tsx Lines 121 to 129 in 469b112
Before the PR, we always test the regex even when the zip code is empty. What changes do you think we should make in order to solve the problem?Always test the regex if exists by removing Also, I think we can improve the failure handling of the address by reverting it to the prev value if fails so it's clear that the saving has failed. We can also show the error message from BE, but I'm not sure where to put the error as the error is attached to |
ProposalPlease re-state the problem that we are trying to solve in this issue.What is the root cause of that problem?As metioned by @bernhardoj , the Also, We don't include App/src/components/AddressForm.tsx Line 95 in 469b112
What changes do you think we should make in order to solve the problem?We should make const requiredFields = ['addressLine1', 'city', 'country', 'state', 'zipPostCode' ] as const; This will also make sure that we always test the regex against values Note If we want to make zip code mandatory for only certain counties then we can have a check for the country code, and if in const.ts file we don't have a empty json for that then we will mandate zip code other wise we won't
Lines 2162 to 2173 in 50d35d8
Over here we will madate zip code for App/src/components/AddressForm.tsx Line 113 in 469b112
What alternative solutions did you explore? (Optional)N/A |
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura ( |
@paultsimura can you take a look and confirm is this is BE? |
At first glance, the points provided by @bernhardoj look reasonable, and I would alter the expected behavior described in this issue. But I need some time to investigate deeper – will post an update shortly. |
The proposal by @bernhardoj looks good to me – IMO it makes more sense than the expected behavior on the issue. The request validation fails on the BE – and it's expected – but the FE validation needs to be fixed as described in the proposal to match the BE logic. 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I agree with the proposal, but should we also add zipCode to the list of |
We can't do this because these are some countries where addresses do not require zipCode, and making zipCode required regardless of the country will break the logic for them. For such countries, the BE request doesn't fail. |
@trjExpensify this feels like a settings sync issue - would you consider it a #wave-collect bug? |
Thanks for clarifying! In that case proposal looks good to me. |
PR is ready cc: @paultsimura |
Yeah, I would, because the address in private details is used for Ecard shipping etc. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-04-15. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Note: I believe there should have been a regression test for zip codes to be mandatory for specific countries. If not - please let me know, I'll suggest one |
@laurenreidexpensify just a heads up: this issue was created before the announced price drop. |
Payment Summary:
|
Applied! |
Same for me, thanks |
Payment Summary
BugZero Checklist (@laurenreidexpensify)
|
Payment Summary:
|
@laurenreidexpensify accepted |
Payment Summary:
|
@laurenreidexpensify I don't see it's being paid yet Is it delayed? |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.57-2
Reproducible in staging?: y
Reproducible in production?: y
Issue reported by:
Action Performed:
Expected Result:
Added address should be reflected on secondary device
Actual Result:
Added address is not reflected on secondary device
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6429118_1711566314478.Screen_Recording_2024-03-27_at_9.55.11_at_night.mp4
View all open jobs on GitHub
Issue Owner
Current Issue Owner: @paultsimuraThe text was updated successfully, but these errors were encountered: