Skip to content
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 2023-11-27] Personal details - City and Postcode fields are not populated with suggested address #31091

Closed
6 tasks done
kbecciv opened this issue Nov 9, 2023 · 13 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Nov 9, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.3.97.0
Reproducible in staging?: y
Reproducible in production?: n
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:

  1. Navigate to staging.new.expensify.com
  2. Go to Settings > Profile > Personal details.
  3. Click Address.
  4. Enter Terrance Street in Address line 1.
  5. Select the result with Fort Worth as the City.

Expected Result:

City and Postcode fields will be populated.

Actual Result:

City and Postcode fields are not populated.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6269381_1699489904055.20231109_081104.mp4

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Nov 9, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Nov 9, 2023

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Nov 9, 2023

Triggered auto assignment to @robertjchen (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Nov 9, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

City and Postcode fields are not populated with suggested address

What is the root cause of that problem?

We always clear other fields when a field is changed

const handleAddressChange = useCallback((value, key) => {

What changes do you think we should make in order to solve the problem?

We should add a new param like isSuggestedAddress with default value as false, we will not clear other fields if it is true. And then here we will pass this param as true. We should add an extra prop like fieldsPreventDefault that will contain a list field that we will call onValueChange instead of onInputChange

if (props.fieldsPreventDefault.includes(inputKey)) {
    props.onValueChange(value, inputKey, true);
} else {
    props.onInputChange(value, inputKey);
}

props.onInputChange(value, inputKey);

And change defaultValue here to value prop

What alternative solutions did you explore? (Optional)

NA

Result

Screen.Recording.2023-11-09.at.10.20.37.mov

@DylanDylann
Copy link
Contributor

Proposal

Please 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 change the country we will reset state, city, zipcode to empty
  • when we change the state we will reset city, zipcode to empty
  • when we change the city we will reset zipcode to empty

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
To do that in here

country: '',
// When locality is not returned, many countries return the city as postalTown (e.g. 5 New Street
// Square, London), otherwise as sublocality (e.g. 384 Court Street Brooklyn). If postalTown is
// returned, the sublocality will be a city subdivision so shouldn't take precedence (e.g.
// Salagatan, Upssala, Sweden).
city: locality || postalTown || sublocality || cityAutocompleteFallback,
zipCode,
state: state || stateAutoCompleteFallback,

Should move the state field to before city field like this

            country: '',
            state: state || stateAutoCompleteFallback,
            city: locality || postalTown || sublocality || cityAutocompleteFallback,
            zipCode,

What alternative solutions did you explore? (Optional)

@bernhardoj
Copy link
Contributor

Regression from #30831?

@robertKozik
Copy link
Contributor

@DylanDylann please ping me if you will have the fix for this regression 🙇🏼

@DylanDylann
Copy link
Contributor

DylanDylann commented Nov 9, 2023

@robertjchen Please help to check this one #31091 (comment). Because this issue have another RCA, I don't notice that It is regression from our PR

@lakchote
Copy link
Contributor

lakchote commented Nov 9, 2023

@DylanDylann I've just tested to revert your PR and I don't have the problem anymore, so it looks like it's a regression.

You can test it doing git revert --no-commit 040c8a7

@DylanDylann
Copy link
Contributor

Agree it is a regression. I mean Because this issue have another RCA, I miss to check if It is regression from our PR

@robertjchen
Copy link
Contributor

Yes, it appears to be a regression from #30304 I believe the procedure here is to close this out and address it in the original issue?

@robertjchen robertjchen removed the DeployBlockerCash This issue or pull request should block deployment label Nov 10, 2023
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Nov 13, 2023
@lanitochka17
Copy link

Issue reproducible on latest build 1.3.99-0

RPReplay_Final1700002195.MP4

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 20, 2023
@melvin-bot melvin-bot bot changed the title Personal details - City and Postcode fields are not populated with suggested address [HOLD for payment 2023-11-27] Personal details - City and Postcode fields are not populated with suggested address Nov 20, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 20, 2023
Copy link

melvin-bot bot commented Nov 20, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Nov 20, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.0-3 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 2023-11-27. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants