You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-04-30] Expense - Amount field is displayed empty on distance expense undeleted offline. #88073
Version Number: 9.3.60-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#86938 Email or phone of affected tester (no customers):ibellicotest+2250@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Money Requests
Action Performed:
Prerequisite: Account has at least one workspace.
Open the Expensify app.
Open any workspace chat.
Create a map distance expense.
Delete the just created expense.
Navigate to "Reports" > "Expenses"
Tap on "Filters" > "Status" > "Deleted"
Apply the selected filter.
Once redirected to results, turn off internet connection.
Long tap and select the just deleted distance expense.
Tap on dropdown menu > "Undelete"
Navigate to Self DM.
Note that the just undeleted expense shows correct amount on preview.
Open the expense.
Note that "Amount" field is displayed empty, despite amount being visible on header.
Expected Result:
Amount on distance expense undeleted offline, should be correctly visible on preview and also on "Amount" field inside report.
Actual Result:
Amount of distance expense undeleted offline is visible on expense preview and on report header, but "Amount" field on report is displayed empty.
👋 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:
Identify the pull request that introduced this issue and revert it.
Investigation Summary - Classification: Frontend bug - Causing PR: 86938 (Deleted transactions on search V2 by @jnowakow) - Recommendation: REVERT - The PR introduced offline undelete for deleted transactions in search but broke display of Amount field for distance expenses after offline undelete. DeployBlockerCash kept. Assigned: @jnowakow@rojiphil@luacmartins
Please re-state the problem that we are trying to solve in this issue.
After undeleting a distance expense offline, the "Amount" field inside the expense detail view is empty, even though the preview and report header show the correct amount.
What is the root cause of that problem?
The optimistic update in changeTransactionsReport overwrites the transaction's comment field with {hold: null} (returned by recalculateUnreportedTransactionDetails()), destroying distance-specific fields like comment.type, comment.customUnit (containing quantity, name, distanceUnit), and comment.waypoints.
This happens because of JS object spread precedence — the later comment property at Transaction.ts:L1065 replaces the comment from ...transaction at L1063.
MoneyRequestView gates the amount display behind hasRoute, which checks for routes.route0.geometry.coordinates or comment.customUnit.quantity — both lost after the overwrite. The preview/search list doesn't have this gate, which is why it still shows the amount correctly.
What changes do you think we should make in order to fix the problem?
Preview path (TransactionPreviewUtils) does NOT gate on hasRoute, explaining why the preview shows the amount correctly
What alternative solutions did you explore? (Optional)
Alternatively, recalculateUnreportedTransactionDetails() could be modified to return a deep-mergeable structure rather than a flat comment object, but this would be more invasive. The spread-merge approach at the call site is simpler and more targeted.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Expense - Amount field is displayed empty on distance expense undeleted offline.[/-][+][Due for payment 2026-04-30] Expense - Amount field is displayed empty on distance expense undeleted offline.[/+]on Apr 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.61-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@rojiphil 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]
Activity
melvin-bot commentedon Apr 16, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #86938
melvin-bot commentedon Apr 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 16, 2026
👋 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:
OSBotify commentedon Apr 16, 2026
Investigation Summary - Classification: Frontend bug - Causing PR: 86938 (Deleted transactions on search V2 by @jnowakow) - Recommendation: REVERT - The PR introduced offline undelete for deleted transactions in search but broke display of Amount field for distance expenses after offline undelete. DeployBlockerCash kept. Assigned: @jnowakow @rojiphil @luacmartins
MelvinBot commentedon Apr 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After undeleting a distance expense offline, the "Amount" field inside the expense detail view is empty, even though the preview and report header show the correct amount.
What is the root cause of that problem?
The optimistic update in
changeTransactionsReportoverwrites the transaction'scommentfield with{hold: null}(returned byrecalculateUnreportedTransactionDetails()), destroying distance-specific fields likecomment.type,comment.customUnit(containingquantity,name,distanceUnit), andcomment.waypoints.This happens because of JS object spread precedence — the later
commentproperty at Transaction.ts:L1065 replaces thecommentfrom...transactionat L1063.MoneyRequestViewgates the amount display behindhasRoute, which checks forroutes.route0.geometry.coordinatesorcomment.customUnit.quantity— both lost after the overwrite. The preview/search list doesn't have this gate, which is why it still shows the amount correctly.What changes do you think we should make in order to fix the problem?
Merge the comment instead of replacing it. In
Transaction.ts:L1065, change:This preserves all existing comment fields (type, customUnit, waypoints) while still setting
hold: nullfor unreported transactions.Evidence chain
recalculateUnreportedTransactionDetails()returns{comment: {hold: null}}— TransactionUtils/index.ts:L2796-L2803...transactionthen overwrites withcomment: {hold: null}— Transaction.ts:L1059-L1070hasRoute()checkstransaction.routes.route0.geometry.coordinatesorcomment.customUnit.quantity— TransactionUtils/index.ts:L1767-L1768MoneyRequestViewgates amount display:shouldDisplayTransactionAmount = (isDistanceRequest && hasRoute) || !isDistanceRequest— MoneyRequestView.tsx:L293TransactionPreviewUtils) does NOT gate onhasRoute, explaining why the preview shows the amount correctlyWhat alternative solutions did you explore? (Optional)
Alternatively,
recalculateUnreportedTransactionDetails()could be modified to return a deep-mergeable structure rather than a flat comment object, but this would be more invasive. The spread-merge approach at the call site is simpler and more targeted.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.4 remaining items
[-]Expense - Amount field is displayed empty on distance expense undeleted offline.[/-][+][Due for payment 2026-04-30] Expense - Amount field is displayed empty on distance expense undeleted offline.[/+]melvin-bot commentedon Apr 23, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.61-4 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 2026-04-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 23, 2026
@rojiphil 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]
luacmartins commentedon Apr 27, 2026
This was a followup to the main delete PR. No payment due. Closing.