-
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] [DISTANCE] LOW: Distance IOU - Addresses are cleared after navigating between address and confirmation page #28913
Comments
Triggered auto assignment to @johncschuster ( |
Bug0 Triage Checklist (Main S/O)
|
Hey, I checked it since it was found when checking my PR. Just want to say, that this issue also occurs in production, so it's probably not related to my PR. Video Screen.Recording.2023-10-05.at.16.52.32.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.Distance IOU - Addresses are cleared after navigating between address and confirmation page What is the root cause of that problem?In multiple places through the money request components we are using the following logic: const shouldReset = props.iou.id !== moneyRequestId;
if (shouldReset) {
IOU.resetMoneyRequestInfo(moneyRequestId);
} This logic becomes problematic when IOU.navigateToNextPage is being called by the navigateToNextPage function and in MoneyRequestParticipantsPage as it repetedly checks shouldReset within it's useEffect but the issue here is that these two don't always have access to the updated reportID and so when the user chooses where the distance request will be shared, iou.id becomes "request" + the reportID but for the components I mentioned since they don't have access to that reportID the value of moneyRequestId will remain just "request" and so they will call IOU.resetMoneyRequestInfo What changes do you think we should make in order to solve the problem?We can either make some changes to make sure that these components are having the most recent reportID or we can add a safeguard check to make sure that a reportID does indeed exist before checking if it equals iou.id In MoneyRequestParticipantsPage: if(reportID.current){
const moneyRequestId = `${iouType.current}${reportID.current}`;
const shouldReset = iou.id !== moneyRequestId && !isNewReportIDSelectedLocally.current;
if (shouldReset) {
IOU.resetMoneyRequestInfo(moneyRequestId);
}
} In IOU.navigateToNextPage: if(report.reportID){
if (shouldReset) {
resetMoneyRequestInfo(moneyRequestID);
}
} There are a bunch of other possible options we can do here but the general idea is to not allow calling resetMoneyRequestInfo unless we do some control regarding reportID ResultScreen.Recording.2023-10-05.at.7.10.00.PM.mov |
I think this will be fixed by #26538 (comment), so I'm holding it on that. |
@johncschuster Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Still holding. Not overdue. |
Still holding |
Shall we bump to Weekly while we wait, @neil-marcellini? |
Bumping to Weekly |
Still holding |
Looks like we're still on hold |
off hold @johncschuster! 🎉 |
Job added to Upwork: https://www.upwork.com/jobs/~01e02f1e0185235867 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
Triggered auto assignment to @muttmuure ( |
I will be OOO starting Monday, December 18, and will return Tuesday, January 2. Current status: If this issue is open when I'm back from OOO, I'll take it back over. Thank you! |
Bug0 Triage Checklist (Main S/O)
|
Not reproducible after the IOU flow refactoring |
This has been resolved using |
@muttmuure We can close this! |
I happened to be traipsing through to finish up my OOO checklist. I'll go ahead and close it. Thanks, @jjcoffee! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when executing PR #26307
Action Performed:
Expected Result:
The addresses that are entered are preserved
Actual Result:
The addresses that are entered are cleared
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.78-0
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
Notes/Photos/Videos: Any additional supporting documentation
Bug6225738_1696503258441.20231005_181639.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: