-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$500] Profile - Address - Zip-code is saved when changing country but the city is cleared #30304
Comments
Triggered auto assignment to @laurenreidexpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~01637e39759029f96e |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @robertKozik ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Zip Code not cleared when country changes What is the root cause of that problem?On Address Change, when country is set, we reset the related fields here: App/src/pages/settings/Profile/PersonalDetails/AddressPage.js Lines 143 to 148 in dd87393
What changes do you think we should make in order to solve the problem?We should also clear the zip field, when country is changed. We will be add a zip state, and calling Branch here Result:Choosing address: Screencast.from.27-10-23.09.24.10.PM.IST.webmChanging Country: Screencast.from.27-10-23.09.38.39.PM.IST.webmZipcode now reacts to address changes. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Zip Code not cleared when country changes What is the root cause of that problem?When we change country, we didn't reset zipcode. App/src/pages/settings/Profile/PersonalDetails/AddressPage.js Lines 143 to 148 in f8fc21d
What changes do you think we should make in order to solve the problem?
App/src/pages/settings/Profile/PersonalDetails/AddressPage.js Lines 146 to 148 in f8fc21d
3. I think we need to add these code too.
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Zipcode field is not clear when select another country What is the root cause of that problem?We only use useState for country and state, city fields because we need to re-set 3 fields when changing country App/src/pages/settings/Profile/PersonalDetails/AddressPage.js Lines 139 to 154 in a8482e2
I think the zipcode field also should be clear after changing country like state, city fields. What changes do you think we should make in order to solve the problem?Firstly, we need to use useState for zipcode field
When country change we need to re-set zipcode to empty like this
and then in here
we should use value instead of default value
One more thing, in here
add this line setZipcode(address.zip); to avoid this bug #27814
|
@robertKozik bump for review on these proposals thanks |
Hi all! After reviewing your proposals, I've noticed that they all suggest a similar approach to solving the problem. In this case, I believe we should acknowledge the contributor who first posted their proposal - @neonbhai. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@robertKozik Could you help to check again? @neonbhai edited his proposal (and his branch )3 days ago after I posted the proposal. My proposal is first one that is fully and cover all edge cases |
@robertKozik This is the original proposal of @neonbhai And I don't think It covers all cases |
Adding zipcode to state logic is a simple change 🤔 Many times I've seen in app, the first contributor who presents the idea is assigned. I hope the right decision is made 🙇 |
I see your point of view @DylanDylann. I got misled by the edited proposals. The explicit coverage of the regression-prone cases is a meaningful change and this proposal should be, in my opinion, considered as a separate one. Also, as stated inside the That's why I think my previous decision was not right, and @DylanDylann's proposal should be recommended by me. But as now we have CME assigned, let's wait for his input on that topic. |
Sometimes a simple change can make or break an app. Even though @DylanDylann adds just one line of code, this line of code is important to prevent bugs. He has covered all edge cases. @neonbhai you should have notified everyone you did change your proposal as stated in [CONTRIBUTING.MD] guidelines:(https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md) For these reasons, I'm assigning @DylanDylann. |
📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@robertKozik The PR is ready for review |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Personal details - City and Postcode fields are not populated with suggested address What is the root cause of that problem?Currently in address page
When we update address line 1, all fields will be updated in order to: country, city, zipCode, state zipcode and city fields is updated before state field, so that when state field is updated the App will reset zipcode and city What changes do you think we should make in order to solve the problem?When we update address line 1, all fields should be updated in order to: country, state, city, zipCode App/src/components/AddressSearch/index.js Lines 231 to 239 in dee9b31
Should move the state field to before city field like this
What alternative solutions did you explore? (Optional) |
Proposal to fix regression |
I'm ok with your approach 🚀 If you could create the PR with it |
ah shucks this was deployed to prod weeks ago - #30831 - i'll work on payments today, the automation failed |
Payment Summary:
|
@robertKozik can you confirm normal checklist items / whether we need a regression test thanks |
I think we don't need new regression test here
|
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.3.90-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
When changing the country, fields uniquely related to the country could be cleared - state/province and zip code
Actual Result:
Zip-code is saved when changing country but the city is cleared
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
Bug6249456_1698185032677.T3891508-Address-City-cleared-after-country-change.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: