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

Expense - Unable to select a different currency in transaction thread #42655

Closed
6 tasks done
m-natarajan opened this issue May 27, 2024 · 11 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@m-natarajan
Copy link

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.4.76-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: https://expensify.testrail.io/index.php?/tests/view/4574596
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. Go to staging.new.expensify.com
  2. Submit expense to any user.
  3. Go to transaction thread.
  4. Click Amount.
  5. Click on the currency.
  6. Select a different currency.

Expected Result:

The new currency is saved.

Actual Result:

The new currency is not saved.

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

Bug6493158_1716830963546.20240528_012719.mp4

View all open jobs on GitHub

@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels May 27, 2024
Copy link

melvin-bot bot commented May 27, 2024

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

Copy link

melvin-bot bot commented May 27, 2024

Triggered auto assignment to @JmillsExpensify (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.

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.

@m-natarajan
Copy link
Author

@bondydaa FYI 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

@m-natarajan
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@bondydaa
Copy link
Contributor

this PR seems suspicious to me #40240 cc @jasperhuangg @MonilBhavsar @dukenv0307 can you take a look?

@cretadn22
Copy link
Contributor

Proposal

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

This is regression from #40240

What is the root cause of that problem?

In IOURequestStepAmount, we utilize the withFullTransactionOrNotFound hook to retrieve the transaction information. In this hook

if (userAction === CONST.IOU.ACTION.CREATE || IOUUtils.isMovingTransactionFromTrackExpense(userAction)) {
return `${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}` as `${typeof ONYXKEYS.COLLECTION.TRANSACTION}${string}`;
}
return `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`;

When editing the transaction, it consistently returns the transaction field. However, when updating the currency, we save it in draftTransaction, and we don't update the currency in transaction.

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

We need to revert this change. In IOURequestStepAmount, we still require subscribing to draftTransaction from Onyx to obtain accurate data for the currency by this logic

const {currency: originalCurrency} = ReportUtils.getTransactionDetails(isEditing ? draftTransaction : transaction) ?? {currency: CONST.CURRENCY.USD};

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@bondydaa
Copy link
Contributor

we've reverted #40240 and are deploying that to staging now. once it's ready i'll confirm so we can retest.

@bondydaa
Copy link
Contributor

the revert #42670 has been deployed, please retest and confirm this is no longer reproducible.

@kavimuru
Copy link

Issue is fixed

Recording.130.mp4

@puneetlath
Copy link
Contributor

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants