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-05-07] [Due for payment 2026-03-30] [$250] Expenses - Uploaded receipt is not displayed when create manual expense #85669
Version Number: v9.3.40-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:#84407 Email or phone of affected tester (no customers):gocemate+b215490600@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Windows 10/Chrome App Component: Other
Action Performed:
Create workspace
Go to workspace chat and submit manual expense with receipt> Complete the process
👋 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.
Classification: Frontend bug Causing PR: #84407 - "Block restricted field edits on closed expense reports" by @grgia (High confidence) Related Issues: #81493 (the issue that PR #84407 was supposed to fix)
Recommendation: REVERT
PR #84407 adds !isClosedReport(moneyRequestReport) to the canEditFieldOfMoneyRequest function for the RECEIPT field. This prevents editing/deleting receipts on closed reports. However, this change appears to have an unintended side effect: it prevents receipts from being properly displayed when manual expenses are created in workspaces where workflows are disabled (which causes reports to immediately transition to CLOSED status).
The issue is reproducible on staging (where PR #84407 is deployed) but not on production (where it is not yet deployed), confirming this PR as the cause.
While the original issue #81493 that PR #84407 fixed was valid (preventing "Delete receipt" button on closed reports), the implementation is too aggressive and breaks receipt display for a common workflow scenario.
Labels: DeployBlockerCash label should remain (this is a frontend bug affecting the App)
Code change: The PR added !isClosedReport(moneyRequestReport) as the first condition in the RECEIPT field check in canEditFieldOfMoneyRequest()
Affected scenario: The issues reproduction steps (create workspace → submit manual expense with receipt) match the exact scenario where workflows might be disabled, causing reports to close immediately
Verification
File modified: src/libs/ReportUtils.ts, specifically the canEditFieldOfMoneyRequest function
Change location: Line 4941 adds !isClosedReport(moneyRequestReport) && to the RECEIPT field return statement
Impact: When a report is closed (which happens immediately when workflows are disabled), canEditFieldOfMoneyRequest returns false for RECEIPT field
Root Cause
When workflows are disabled on a workspace (approval mode = OPTIONAL), expense reports immediately transition to CLOSED state (statusNum=2). PR #84407 added a check to prevent receipt editing on closed reports. While this successfully prevents the "Delete receipt" button from appearing on closed reports (the original bug), it appears to have an unintended consequence where receipts uploaded during manual expense creation in closed reports are not properly displayed.
The canEditReceipt variable (calculated using canEditFieldOfMoneyRequest for RECEIPT field) is used in MoneyRequestReceiptView.tsx line 171-172, and while it should only control editing capability, the closed report check may be interfering with proper receipt rendering or upload completion in the manual expense creation flow.
PR #84407 introduced a regression where receipts are not properly editable (and may appear non-functional) when creating manual expenses on workspaces where the expense report auto-closes.
Root Cause
PR #84407 added !isClosedReport(moneyRequestReport) to the RECEIPT field check in canEditFieldOfMoneyRequest at src/libs/ReportUtils.ts:4941. This was intended to block the "Delete receipt" button on closed reports (fix for #81493), but the condition is too broad — it blocks ALL receipt operations (edit, replace, and delete) on closed reports, not just the delete action.
Why admins are affected: The canEditMoneyRequest function (line 4780-4782) lets admins and managers bypass the isClosedReport check — they can always edit coding fields. But the RECEIPT-specific check at line 4941 re-introduces !isClosedReport without the admin/manager exemption. This means an admin creating an expense on a workspace where the report auto-closes (Submit & Close) will have canEditReceipt = false.
How this manifests:
canEditReceipt = false makes the ReceiptEmptyState disabled and thumbnail-sized (disabled={!canEditReceipt}, isThumbnail={!canEditReceipt} at MoneyRequestReceiptView.tsx:401,410)
The receipt image becomes readonly (readonly={readonly || !canEditReceipt} at line 472)
The compose bar's "Add/Replace receipt" option is hidden (ReportActionCompose.tsx:246)
Why staging-only: In production (without PR #84407), the RECEIPT check doesn't have the isClosedReport gate, so admin users can interact with receipts normally on closed reports.
Solution
The isDeleteAction parameter already exists in canEditFieldOfMoneyRequest and is already used in the RECEIPT block at line 4947: (isDeleteAction ? isRequestor : true). The fix is to scope the isClosedReport check to only apply when isDeleteAction is true:
This preserves the original fix from PR #84407 (blocking receipt deletion on closed reports via TransactionReceiptModalContent.tsx:131 which passes isDeleteAction=true) while allowing receipt viewing and editing on closed reports.
What did you do to verify your analysis?
Traced the full code path: canEditMoneyRequest (line 4780-4782) → admins bypass isClosedReport → canEditFieldOfMoneyRequest RECEIPT block (line 4939-4948) → PR Block restricted field edits on closed expense reports #84407's !isClosedReport blocks all receipt ops
Verified that canEditReceipt controls editability props (disabled, readonly, isThumbnail) in MoneyRequestReceiptView.tsx
Confirmed that isDeleteAction=true is only passed from TransactionReceiptModalContent.tsx:131 for the delete receipt use case, while MoneyRequestReceiptView.tsx:172 and ReportActionCompose.tsx:245 don't pass it
Checked that policy configurations (Submit & Close, disabled workflows) can produce reports with statusNum=CLOSED via getExpenseReportStateAndStatus
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 [-][Due for payment 2026-03-30] [$250] Expenses - Uploaded receipt is not displayed when create manual expense[/-][+][Due for payment 2026-05-07] [Due for payment 2026-03-30] [$250] Expenses - Uploaded receipt is not displayed when create manual expense[/+]on Apr 30, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.64-31 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@ZhenjaHorbach@mallenexpensify 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 Mar 18, 2026
@grgia recently merged #84407, but they are OOO right now, so I'll auto-assign someone else.
melvin-bot commentedon Mar 18, 2026
Triggered auto assignment to @MonilBhavsar (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Mar 18, 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 Mar 18, 2026
💬 A slack conversation has been started in #expensify-open-source
OSBotify commentedon Mar 18, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #84407 - "Block restricted field edits on closed expense reports" by @grgia (High confidence)
Related Issues: #81493 (the issue that PR #84407 was supposed to fix)
Recommendation: REVERT
PR #84407 adds
!isClosedReport(moneyRequestReport)to thecanEditFieldOfMoneyRequestfunction for the RECEIPT field. This prevents editing/deleting receipts on closed reports. However, this change appears to have an unintended side effect: it prevents receipts from being properly displayed when manual expenses are created in workspaces where workflows are disabled (which causes reports to immediately transition to CLOSED status).The issue is reproducible on staging (where PR #84407 is deployed) but not on production (where it is not yet deployed), confirming this PR as the cause.
While the original issue #81493 that PR #84407 fixed was valid (preventing "Delete receipt" button on closed reports), the implementation is too aggressive and breaks receipt display for a common workflow scenario.
Labels: DeployBlockerCash label should remain (this is a frontend bug affecting the App)
📋 Detailed Analysis
Evidence
!isClosedReport(moneyRequestReport)as the first condition in the RECEIPT field check incanEditFieldOfMoneyRequest()Verification
src/libs/ReportUtils.ts, specifically thecanEditFieldOfMoneyRequestfunction!isClosedReport(moneyRequestReport) &&to the RECEIPT field return statementcanEditFieldOfMoneyRequestreturns false for RECEIPT fieldRoot Cause
When workflows are disabled on a workspace (approval mode = OPTIONAL), expense reports immediately transition to CLOSED state (statusNum=2). PR #84407 added a check to prevent receipt editing on closed reports. While this successfully prevents the "Delete receipt" button from appearing on closed reports (the original bug), it appears to have an unintended consequence where receipts uploaded during manual expense creation in closed reports are not properly displayed.
The
canEditReceiptvariable (calculated usingcanEditFieldOfMoneyRequestfor RECEIPT field) is used inMoneyRequestReceiptView.tsxline 171-172, and while it should only control editing capability, the closed report check may be interfering with proper receipt rendering or upload completion in the manual expense creation flow.MelvinBot commentedon Mar 18, 2026
Proposal
Problem
PR #84407 introduced a regression where receipts are not properly editable (and may appear non-functional) when creating manual expenses on workspaces where the expense report auto-closes.
Root Cause
PR #84407 added
!isClosedReport(moneyRequestReport)to the RECEIPT field check incanEditFieldOfMoneyRequestatsrc/libs/ReportUtils.ts:4941. This was intended to block the "Delete receipt" button on closed reports (fix for #81493), but the condition is too broad — it blocks ALL receipt operations (edit, replace, and delete) on closed reports, not just the delete action.Why admins are affected: The
canEditMoneyRequestfunction (line 4780-4782) lets admins and managers bypass theisClosedReportcheck — they can always edit coding fields. But the RECEIPT-specific check at line 4941 re-introduces!isClosedReportwithout the admin/manager exemption. This means an admin creating an expense on a workspace where the report auto-closes (Submit & Close) will havecanEditReceipt = false.How this manifests:
canEditReceipt = falsemakes theReceiptEmptyStatedisabled and thumbnail-sized (disabled={!canEditReceipt},isThumbnail={!canEditReceipt}atMoneyRequestReceiptView.tsx:401,410)readonly={readonly || !canEditReceipt}at line 472)ReportActionCompose.tsx:246)Why staging-only: In production (without PR #84407), the RECEIPT check doesn't have the
isClosedReportgate, so admin users can interact with receipts normally on closed reports.Solution
The
isDeleteActionparameter already exists incanEditFieldOfMoneyRequestand is already used in the RECEIPT block at line 4947:(isDeleteAction ? isRequestor : true). The fix is to scope theisClosedReportcheck to only apply whenisDeleteActionis true:Change line 4941 in
src/libs/ReportUtils.tsfrom:To:
This preserves the original fix from PR #84407 (blocking receipt deletion on closed reports via
TransactionReceiptModalContent.tsx:131which passesisDeleteAction=true) while allowing receipt viewing and editing on closed reports.What did you do to verify your analysis?
canEditMoneyRequest(line 4780-4782) → admins bypassisClosedReport→canEditFieldOfMoneyRequestRECEIPT block (line 4939-4948) → PR Block restricted field edits on closed expense reports #84407's!isClosedReportblocks all receipt opscanEditReceiptcontrols editability props (disabled, readonly, isThumbnail) inMoneyRequestReceiptView.tsxisDeleteAction=trueis only passed fromTransactionReceiptModalContent.tsx:131for the delete receipt use case, whileMoneyRequestReceiptView.tsx:172andReportActionCompose.tsx:245don't pass itstatusNum=CLOSEDviagetExpenseReportStateAndStatusNext 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.62 remaining items
mountiny commentedon Apr 7, 2026
That payment summary sounds good to me @mallenexpensify
mallenexpensify commentedon Apr 7, 2026
Payment Summary
Contributor+: @ZhenjaHorbach due $250 via NewDot
garrettmknight commentedon Apr 8, 2026
$250 approved for @ZhenjaHorbach
[-][Due for payment 2026-03-30] [$250] Expenses - Uploaded receipt is not displayed when create manual expense[/-][+][Due for payment 2026-05-07] [Due for payment 2026-03-30] [$250] Expenses - Uploaded receipt is not displayed when create manual expense[/+]melvin-bot commentedon Apr 30, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 30, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.64-31 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-05-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 30, 2026
@ZhenjaHorbach @mallenexpensify 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]