Closed izarutskaya closed 5 months ago
Triggered auto assignment to @Beamanator (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
Triggered auto assignment to @joekaufmanexpensify (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.
:wave: 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:
@joekaufmanexpensify 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.
We think this issue might be related to the #collect project.
The currency in Amount editor is USD, when the request is created in local currency.
We're passing wrong transaction
data to get the currency here. we should pass it as transaction
when we're editing instead of draftTransaction
Update this line to
const {currency: originalCurrency} = ReportUtils.getTransactionDetails(isEditing ? transaction : draftTransaction) ?? {currency: CONST.CURRENCY.USD};
NA
Seems like a legit bug. I could see this being a legit blocker. @Beamanator you agree?
Oof ya i would say this is a blocker, it's not great to show it's $100
when it's actually 100 in some other currency 😬
Hmm this one looks pretty sus: https://github.com/Expensify/App/pull/38892
cc @roryabraham @sobitneupane @bernhardoj
Posted in slack & tagged ^ those people - https://expensify.slack.com/archives/C01GTK53T8Q/p1713538343234679?thread_ts=1713521084.907369&cid=C01GTK53T8Q
Sadly I'm unable to quickly revert the PR to test, probably b/c the PR was started a while ago
Hmm, based on @nkdengineer root cause and solution which I already tested, it shouldn't be coming from our PR because we don't change the isEditing ? draftTransaction : transaction
code/logic.
I think it's coming from https://github.com/Expensify/App/pull/39144. In amount page, we are creating a backup transaction if we are editing a money request. https://github.com/Expensify/App/blob/4654d6ed3389916e750ecdfdbdad08d637535b8d/src/pages/iou/request/step/IOURequestStepAmount.tsx#L107-L114
createBackupTransaction
will take the current transaction data and copy it to transactionsDraft, but the PR above changes the name to transactionsBackup.
That's why when we are editing, we pass the draftTransaction instead of transaction to get the data from the backup data. https://github.com/Expensify/App/blob/4654d6ed3389916e750ecdfdbdad08d637535b8d/src/pages/iou/request/step/IOURequestStepAmount.tsx#L82
Rename the key to transactionsBackup and the issue is fixed. https://github.com/Expensify/App/blob/4654d6ed3389916e750ecdfdbdad08d637535b8d/src/pages/iou/request/step/IOURequestStepAmount.tsx#L269-L272
ONYXKEYS.COLLECTION.TRANSACTION_BACKUP
Thanks @bernhardoj ! I agree it does look like https://github.com/Expensify/App/pull/39144 is the real culprit - they modified createBackupTransaction
which now updates a new onyx key, and they didn't look where else that function was used & if we needed to subscribe to the new onyx key there (which it looks like we do need to)
Ok I have a PR up for the fix - note I used @bernhardoj 's solution
⚠️ Looks like this issue was linked to a Deploy Blocker here
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.
My proposal will cover this issue . @Beamanator please take a look
@Beamanator @allroundexperts The new field ONYXKEYS.COLLECTION.TRANSACTION_BACKUP
should only be used in distance requests as explained here. With the manual request, we should use draftTransaction
as before.
cc @mountiny @bernhardoj
@DylanDylann I see you were already paid for this PR in https://github.com/Expensify/App/issues/40631#issuecomment-2089321279, so I don't think any payment is due here. Closing this out for now, but LMK if you think that is not correct!
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.4.63-5 Reproducible in staging?: Y Reproducible in production?: N Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
The currency in Amount editor should be the local currency,.
Actual Result:
The currency in Amount editor is USD, when the request is created in local currency.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/95f49bee-4c0c-4803-a28a-02afa03c0fae
View all open jobs on GitHub