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
Scan - Empty amount changes to "0,00" when expense has deleted/undeleted status. #103056
Version Number: 9.5.2-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#98871 Email or phone of affected tester (no customers):ibellicotest+3215@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Money Requests
Action Performed:
Prerequisite: Account has a workspace.
Open the Expensify app.
Naviagte to workspace chat.
Create a scan expense with a receipt/image that will fail SmartScan.
Wait until the scan fails.
Open the expense details.
Note that the Amount field is empty instead of showing $0.00.
Navigate to "Spend" > "Expenses"
Note that expense preview doesn´t show any amount instead of showing "0,00"
Select and delete the expense.
Tap on the filters icon > "Status" > "Deleted"
Apply the filter.
Note that now, expense preview shows "0,00" on preview, instead of showing an empty space.
Select and undelete the expense.
Clear the filter.
Note that expense still shows "0,00" as amount on preview, different to state before being deleted.
Expected Result:
Amount field on report and on preview, should remain empty on failed scan expense after being deleted and undeleted.
Actual Result:
Amount field on report and on preview, changes from empty state to "0,00" when expense has "Deleted" or "Undeleted" status.
👋 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.
Recommendation: demote, don't revert. This is not a regression compared to production. Production shows "0,00" for a failed scan in every state. The PR made the amount blank for failed scans. After delete/undelete, the expense falls back to the old production behavior ("0,00"). Reverting would bring back "$0.00 with no error" for every failed scan, which is worse. Fix it forward as a follow-up to [$300] Scan - When the scan fails, the amount field is filled with $0, error is not shown.
Why delete/undelete breaks it: The App does not change the fields this check reads on delete or undelete. The optimistic undelete update only changes reportID, comment and originalAmount/originalCurrency (src/libs/actions/Transaction.ts:1181-1195). So the transaction the server returns after delete/restore most likely fails the check. The likely cause is that receipt.state moves from SCANFAILED to OPEN, or a modified amount gets set. Not verified: I could not reproduce this live, because it needs a real SmartScan failure.
@arosiclair, The delete/undelete behavior wasn’t discussed as part of issue #94494 or PR #98871, and the changes in that PR weren’t intended to handle this case. Please assign it to me, and I’ll open a PR to address it. Thanks!
Activity
applause-bot commentedon Oct 5, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/45a4c973ae83479a61d94c532c9dce4e89417a74531e37273e24945bf78a7814
melvin-bot commentedon Oct 5, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #98871
melvin-bot commentedon Oct 5, 2026
@arosiclair @Ollyws you have been assigned to this deploy blocker because you reviewed the offending PR: #98871
github-actions commentedon Oct 5, 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:
melvin-bot commentedon Oct 5, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Oct 5, 2026
Deploy Blocker Analysis
Causing PR: fix: show scan error instead of populating $0 amount when scan fails (high confidence).
Recommendation: demote, don't revert. This is not a regression compared to production. Production shows "0,00" for a failed scan in every state. The PR made the amount blank for failed scans. After delete/undelete, the expense falls back to the old production behavior ("0,00"). Reverting would bring back "$0.00 with no error" for every failed scan, which is worse. Fix it forward as a follow-up to [$300] Scan - When the scan fails, the amount field is filled with $0, error is not shown.
Investigation details
Why this PR: It added
isFailedScanAmountPlaceholder()in src/libs/TransactionUtils/amountUtils.ts:14-33. The amount is blank only when all of these are true:iouRequestTypeisSCANreceipt.stateisSCANFAILED, orOPENwith an unconfirmed amount or a pending field editamountis 0 or undefinedmodifiedAmount, andisAmountSetis not setIt is used in:
MoneyRequestView.tsxWhy delete/undelete breaks it: The App does not change the fields this check reads on delete or undelete. The optimistic undelete update only changes
reportID,commentandoriginalAmount/originalCurrency(src/libs/actions/Transaction.ts:1181-1195). So the transaction the server returns after delete/restore most likely fails the check. The likely cause is thatreceipt.statemoves fromSCANFAILEDtoOPEN, or a modified amount gets set. Not verified: I could not reproduce this live, because it needs a real SmartScan failure.Other PRs ruled out: None of the other PRs on Deploy Checklist: New Expensify 2026-10-04 touch amount display, Search rows, delete/undelete, or receipt state.
Suggested fix forward:
receipt.state,modifiedAmountandisAmountSeton the transaction before delete and after undelete.Next Steps: Reply with
@MelvinBot <your feedback>to refine this analysis.view run
arosiclair commentedon Oct 5, 2026
Agreed
x-dev90 commentedon Oct 6, 2026
@arosiclair, The delete/undelete behavior wasn’t discussed as part of issue #94494 or PR #98871, and the changes in that PR weren’t intended to handle this case. Please assign it to me, and I’ll open a PR to address it. Thanks!
melvin-bot commentedon Oct 8, 2026
@arosiclair, @Ollyws Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Oct 9, 2026
@arosiclair — to hire @x-dev90 on Upwork, add the External label so a job is created and the offer is sent automatically.