Skip to content

[Due for payment 2025-02-27] [$125] [Navigation] Expense - Currency resets to default currency after returning from confirmation page #56807

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

Closed
8 tasks done
mitarachim opened this issue Feb 13, 2025 · 26 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Feb 13, 2025

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: 9.0.98-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Account has a default group workspace.
  1. Go to staging.new.expensify.com
  2. Go to FAB > Create expense > Manual.
  3. Click currency.
  4. Select a different currency.
  5. Enter amount > Next.
  6. Click RHP back button.

Expected Result:

Currency will not reset to default currency.

Actual Result:

Currency resets to default currency after returning from confirmation page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6741373_1739407277724.20250213_083919.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021889964491189744954
  • Upwork Job ID: 1889964491189744954
  • Last Price Increase: 2025-02-13
  • Automatic offers:
    • shubham1206agra | Reviewer | 106160939
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @NicMendonca
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Feb 13, 2025
Copy link

melvin-bot bot commented Feb 13, 2025

Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 13, 2025
@melvin-bot melvin-bot bot added the Daily KSv2 label Feb 13, 2025
Copy link
Contributor

👋 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.

@melvin-bot melvin-bot bot removed the Hourly KSv2 label Feb 13, 2025
Copy link

melvin-bot bot commented Feb 13, 2025

Triggered auto assignment to @robertjchen (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Feb 13, 2025

💬 A slack conversation has been started in #expensify-open-source

@mountiny mountiny removed the DeployBlocker Indicates it should block deploying the API label Feb 13, 2025
@mountiny mountiny assigned mountiny and unassigned robertjchen Feb 13, 2025
@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Feb 13, 2025
@mountiny mountiny changed the title Expense - Currency resets to default currency after returning from confirmation page [Navigation] Expense - Currency resets to default currency after returning from confirmation page Feb 13, 2025
@mountiny
Copy link
Contributor

This does not feel like a blocker to me as the user can easily complete their task and it works well on the confirmation page

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Feb 13, 2025
Copy link

melvin-bot bot commented Feb 13, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021889964491189744954

@melvin-bot melvin-bot bot changed the title [Navigation] Expense - Currency resets to default currency after returning from confirmation page [$250] [Navigation] Expense - Currency resets to default currency after returning from confirmation page Feb 13, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 13, 2025
@mountiny mountiny changed the title [$250] [Navigation] Expense - Currency resets to default currency after returning from confirmation page [$125] [Navigation] Expense - Currency resets to default currency after returning from confirmation page Feb 13, 2025
Copy link

melvin-bot bot commented Feb 13, 2025

Current assignees @shubham1206agra and @dukenv0307 are eligible for the External assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Feb 13, 2025

Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@dukenv0307
Copy link
Contributor

@mountiny I found the following issue while testing this bug

  • Account has a default group workspace.
  1. Go to staging.new.expensify.com
  2. Go to FAB > Create expense > Manual.
  3. Click Next to go to confirmation page
  4. Go to participant page
  5. Click back button

Current behavior:

Amount page is open

Expected behavior:

Confirmation page is open

Screen.Recording.2025-02-13.at.21.40.05.mov

@dukenv0307
Copy link
Contributor

@bernhardoj Ah, I think the root cause is about goBack. Let's see the amount page URL after going back (at the first time you goBack during create expense flow), it's different from the previous one. If the URL is the same, the currency will be correct (the second time you goBack)

Screen.Recording.2025-02-13.at.21.54.45.mov

@bernhardoj
Copy link
Contributor

Ah, the goBack works differently now, but even before the navigation refactors, the URL will change if we refresh the confirm page and then go back because the fallback route will be used. I think it's fine for the route reportID to be updated. We just need to update the transaction.reportID so that both reportID param and transaction.reportID will be the same.

So, I think we need to keep initMoneyRequest being called, but don't reset the currency.

App/src/libs/actions/IOU.ts

Lines 655 to 667 in f5cbaf2

// in case we have to re-init money request, but the IOU request type is the same with the old draft transaction,
// we should keep most of the existing data by using the ONYX MERGE operation
if (currentIouRequestType === newIouRequestType) {
// so, we just need to update the reportID, isFromGlobalCreate, created, currency
Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${newTransactionID}`, {
reportID,
isFromGlobalCreate,
created,
currency,
transactionID: newTransactionID,
});
return;
}

@adamgrzybowski
Copy link
Contributor

@dukenv0307 @bernhardoj Yeah, that's the new goBack problem here 😄 The goBack have now an option to set compareParams: false. It will go back to this page no matter if params are the same. Maybe this is the right direction to look into?

@bernhardoj
Copy link
Contributor

bernhardoj commented Feb 14, 2025

Compare params false is already used here.

Navigation.goBack(ROUTES.MONEY_REQUEST_CREATE_TAB_MANUAL.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID), {compareParams: false});

@melvin-bot melvin-bot bot added the Overdue label Feb 17, 2025
Copy link

melvin-bot bot commented Feb 17, 2025

@NicMendonca, @mountiny, @shubham1206agra, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mountiny
Copy link
Contributor

Will post a summary for SWM with all the issues so they can distrubute them

@melvin-bot melvin-bot bot removed the Overdue label Feb 17, 2025
@SzymczakJ
Copy link
Contributor

Hey, I'm Jakub Szymczak from SWM and I would like to work on this issue.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 17, 2025
Copy link

melvin-bot bot commented Feb 17, 2025

📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@dukenv0307
Copy link
Contributor

@SzymczakJ @mountiny It should be fixed in #56876

@mountiny
Copy link
Contributor

Linked

@mountiny mountiny added the Reviewing Has a PR in review label Feb 18, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Feb 20, 2025
@melvin-bot melvin-bot bot changed the title [$125] [Navigation] Expense - Currency resets to default currency after returning from confirmation page [Due for payment 2025-02-27] [$125] [Navigation] Expense - Currency resets to default currency after returning from confirmation page Feb 20, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 20, 2025
Copy link

melvin-bot bot commented Feb 20, 2025

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

Copy link

melvin-bot bot commented Feb 20, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.1-6 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 2025-02-27. 🎊

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

  • @SzymczakJ does not require payment (Contractor)
  • @dukenv0307 requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Feb 20, 2025

@dukenv0307 @NicMendonca @dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@mountiny
Copy link
Contributor

No regression tests required and no payment required either this came from the big navigation update

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 Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants