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-11-25] [$175] Expense - Report files is enable when all report contain non-reimbursable expense #104162
Version Number: 9.5.10-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:https://github.com/Expensify/Expensify/issues/602527 Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: Windows Windows 11 - Chrome
Action Performed:
Precondition:
Submission frequency is changed to Instantly.
Disable Approvals and Payments in Workflows settings.
Go to workspace chat.
Create two non-reimbursable expenses in two reports.
Open both reports and retract them from More menu.
Click + > Create expense > Manual.
Enter amount > Next.
On confirm page, observe Report field.
Expected Result:
Verify that report field is disabled when all reports contain non-reimbursable expense.
Conclusion: This is expected behavior, not a bug. The regression test's expected result is wrong. You should close this issue and update the test step.
Change the regression test step 6–7 to: "Click the Report field. Verify both retracted reports are listed."
Investigation details
How the confirm page decides whether the Report field is enabled
ReportField.tsx:116 enables the field when the user has more than one outstanding report. isReportOutstanding counts any Open report, and it doesn't check whether the expenses are reimbursable. After the retract, both reports are Open again, so the count is 2 and the field is enabled.
Report picker
IOURequestEditReportCommon.tsx:183-189 filters reports with canAddTransaction. That function excludes reports with only non-reimbursable expenses when the workspace uses Instant Submit plus Submit & Close (ReportUtils.ts:3143-3150). However, workspace admins and report managers skip this filter. The tester changed Workflows settings, so they are an admin and see both reports. That matches the behavior chosen in the fix above.
Small, separate gap (optional)
A workspace member who is neither an admin nor the report manager sees an enabled Report field. When they open it, the picker hides both reports and shows only "Create report." If you want to tighten this, have ReportField.tsx count reports with the same filter the picker uses. Do not add a blanket non-reimbursable exclusion. That would bring back the blank-page bug from #81608. The open PR fix: hide ineligible move report destinations also keeps retracted Open drafts as valid destinations.
Not verified: I didn't reproduce this in the app. The conclusion is based on the code at b9a9521 and the PR history above.
Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.
changed the title [-]Expense - Report files is enable when all report contain non-reimbursable expense[/-][+][$175] Expense - Report files is enable when all report contain non-reimbursable expense[/+]on Oct 15, 2026
Please re-state the problem that we are trying to solve in this issue.
On the expense confirmation page, the Report field remains enabled/interactive when all existing reports in the workspace contain non-reimbursable expenses and have been retracted.
What is the root cause of that problem?
1. Analysis of Current Behavior vs Intended Production Behavior:
This exact scenario was previously addressed in Issue #81608 and resolved in PR #81676 ("[CP Staging] fix Expense - Report field opens a blank page when all reports contain non-reimbursable expense").
In PR #81676, the testing steps explicitly defined the expected behavior:
Precondition:
Submission frequency is changed to Instantly.
Disable Approvals and Payments in Workflows settings.
Go to workspace chat.
Create two non-reimbursable expenses in two reports.
Open both reports and retract them from More menu.
Click + > Create expense > Manual.
Enter amount > Next.
On confirm page, click Report field.
Verify that reports are available (this matches production behavior)
When an expense report is retracted, its status resets to Open (CONST.REPORT.STATUS_NUM.OPEN). As long as the user has more than one open outstanding report, having the Report field enabled is intentional so the user can choose which open report to attach their expense to. The regression test in BrowserStack/TestRail (https://github.com/Expensify/Expensify/issues/602527) was based on the outdated expected result from before PR #81676 settled on matching production behavior.
2. Code-level Root Cause (if the field is intended to be disabled):
useOutstandingReports counts all open reports via isReportOutstanding without verifying whether those reports can accept the current transaction type via canAddTransaction.
Even though IOURequestEditReportCommon.tsx uses canAddTransaction(report, rules, undefined, true) to filter report picker options, ReportField.tsx determines interactivity based purely on outstandingReports.length > 1.
For workspace admins (or report managers), IOURequestEditReportCommon.tsx:187-189 allows both retracted reports anyway (isReportPolicyAdmin || isReportManager), so both reports are visible and selectable when opening the picker.
What changes do you think we should make in order to solve the problem?
Approach 1: Close as Expected Behavior & Update Regression Test (Recommended)
Since PR #81676 deliberately ensured reports are available and selectable to match production behavior, close this issue as expected behavior and update TestRail test case 602527 step 6–7 to:
"On confirm page, click Report field. Verify both retracted reports are available to select."
Approach 2: Align ReportField.tsx with canAddTransaction Eligibility Check
If the product team specifically wants the Report field to be disabled whenever the user does not have more than 1 eligible destination report, update ReportField.tsx to filter outstandingReports against canAddTransaction:
In src/components/MoneyRequestConfirmationList/sections/ReportField.tsx:
--- a/src/components/MoneyRequestConfirmationList/sections/ReportField.tsx+++ b/src/components/MoneyRequestConfirmationList/sections/ReportField.tsx@@ -113,4 +113,8 @@ function ReportField({selectedParticipants, iouType, reportID, reportActionID,
const outstandingReports = useOutstandingReports(undefined, isFromGlobalCreate && !isPerDiemRequest ? undefined : policyID, ownerAccountID, false);
+ const eligibleOutstandingReports = useMemo(() => {+ return outstandingReports.filter((report) => canAddTransaction(report, rules, undefined, true));+ }, [outstandingReports, rules]);+
// When creating an expense in an individual report, the report field becomes read-only
// since the destination is already determined and there's no need to show a selectable list.
- const shouldReportBeEditable = (isUnreported ? outstandingReports.length >= 1 : outstandingReports.length > 1) && !isMoneyRequestReport(reportID);+ const shouldReportBeEditable = (isUnreported ? eligibleOutstandingReports.length >= 1 : eligibleOutstandingReports.length > 1) && !isMoneyRequestReport(reportID);
What alternative solutions did you explore? (Optional)
Please re-state the problem that we are trying to solve in this issue.
On the expense confirmation page, the Report field remains interactive/clickable even when all outstanding reports for the workspace contain only non-reimbursable expenses (and cannot accept new transactions), leading to an interactive field that cannot attach to those reports.
What is the root cause of that problem?
In src/components/MoneyRequestConfirmationList/sections/ReportField.tsx (lines 113–116):
useOutstandingReports returns all outstanding reports by checking open status, but it does NOT verify whether the user/expense is eligible to add transactions to those reports.
Under workspaces with instant submission and submit & close (or where existing reports contain only non-reimbursable expenses), ReportUtils.canAddTransaction(report, rules, undefined, true) returns false (lines 3102–3108 of ReportUtils.ts).
Consequently, while outstandingReports.length > 1 evaluates to true, none of those reports can actually accept the expense. ReportField incorrectly sets shouldReportBeEditable = true, leaving the field interactive when it should be disabled / read-only.
What changes do you think we should make in order to solve the problem?
In src/components/MoneyRequestConfirmationList/sections/ReportField.tsx:
Filter outstandingReports using canAddTransaction(report, rules, undefined, true) to obtain eligibleOutstandingReports.
Update shouldReportBeEditable to base its threshold on eligibleOutstandingReports:
--- a/src/components/MoneyRequestConfirmationList/sections/ReportField.tsx+++ b/src/components/MoneyRequestConfirmationList/sections/ReportField.tsx@@ -9,7 +9,7 @@ import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/crea
import Navigation from '@libs/Navigation/Navigation';
import Parser from '@libs/Parser';
import {getReportName} from '@libs/ReportNameUtils';
-import {generateReportID, getOutstandingReportsForUser, isMoneyRequestReport, isReportOutstanding, sortOutstandingReportsBySelected} from '@libs/ReportUtils';+import {canAddTransaction, generateReportID, getOutstandingReportsForUser, isMoneyRequestReport, isReportOutstanding, sortOutstandingReportsBySelected} from '@libs/ReportUtils';
import CONST from '@src/CONST';
import type {IOUAction, IOUType} from '@src/CONST';
@@ -21,7 +21,7 @@ import type {Participant} from '@src/types/onyx/IOU';
import type {OnyxEntry} from 'react-native-onyx';
import {createOutstandingReportsForPolicySelector} from '@selectors/Report';
-import React from 'react';+import React, {useMemo} from 'react';
import ExpenseFieldRow from './ExpenseFieldRow';
import {useExpenseFormLayout} from './ExpenseFormLayoutContext';
@@ -111,9 +111,13 @@ function ReportField({selectedParticipants, iouType, reportID, reportActionID, a
})();
const outstandingReports = useOutstandingReports(undefined, isFromGlobalCreate && !isPerDiemRequest ? undefined : policyID, ownerAccountID, false);
+ const eligibleOutstandingReports = useMemo(() => {+ return outstandingReports.filter((report) => canAddTransaction(report, rules, undefined, true));+ }, [outstandingReports, rules]);+
// When creating an expense in an individual report, the report field becomes read-only
// since the destination is already determined and there's no need to show a selectable list.
- const shouldReportBeEditable = (isUnreported ? outstandingReports.length >= 1 : outstandingReports.length > 1) && !isMoneyRequestReport(reportID);+ const shouldReportBeEditable = (isUnreported ? eligibleOutstandingReports.length >= 1 : eligibleOutstandingReports.length > 1) && !isMoneyRequestReport(reportID);
const openReportPage = () => {
if (!transactionID || !selectedReportID) {
What alternative solutions did you explore? (Optional)
Filtering out non-reimbursable reports inside useOutstandingReports hook globally. However, that hook is shared by other flows (including search and workspace overview) where open reports need to be listed regardless of transaction eligibility. Filtering at the field level where interactivity is determined is cleaner and avoids side-effects.
Please re-state the problem that we are trying to solve in this issue.
On the expense confirmation page, the Report field appears interactive/clickable (shouldReportBeEditable = true) even when all existing outstanding reports in a workspace contain only non-reimbursable expenses (under Instant Submit and Submit & Close), leading to a state where opening the field displays no selectable reports for standard members.
What is the root cause of that problem?
There is a discrepancy between how ReportField.tsx determines interactivity and how IOURequestEditReportCommon.tsx determines report eligibility:
In src/components/MoneyRequestConfirmationList/sections/ReportField.tsx (lines 114–116):
ReportField determines whether the field is editable purely by checking outstandingReports.length > 1 (where isReportOutstanding only checks if the report is open/submitted).
In src/libs/ReportUtils.ts (lines 3143–3150):
Under Instant Submit with Submit & Close policies, canAddTransaction(report, rules, undefined, true) returns false for reports that contain only non-reimbursable transactions (hasOnlyNonReimbursableTransactions).
In src/pages/iou/request/step/IOURequestEditReportCommon.tsx (lines 183–189):
When the user opens the report selection step, the list filters reports using:
For a standard employee who is neither an admin nor the report manager, IOURequestEditReportCommon filters out all non-reimbursable reports, leaving no existing reports to choose from. Yet on the confirmation page, ReportField evaluated shouldReportBeEditable = true, presenting a clickable control that has nowhere to navigate.
Important note on previous fixes & permissions:
Simply filtering outstandingReports by canAddTransaction(...) alone (as proposed elsewhere) causes a regression for Workspace Admins and Report Managers (who are authorized to add transactions to those reports, as handled in PR #81676 for issue #81608). Any eligibility check in ReportField must align with the exact predicate used in IOURequestEditReportCommon.tsx.
What changes do you think we should make in order to solve the problem?
In src/components/MoneyRequestConfirmationList/sections/ReportField.tsx:
Import usePolicy, useCurrentUserPersonalDetails, isPolicyAdmin, and canAddTransaction.
Filter outstandingReports to eligibleOutstandingReports using the identical authorization predicate as IOURequestEditReportCommon:
For non-admin, non-manager employees with no eligible reports, shouldReportBeEditable correctly evaluates to false, rendering the field read-only and preventing empty/misleading report picker flows.
What alternative solutions did you explore? (Optional)
Filtering canAddTransaction without checking isPolicyAdmin || isReportManager: rejected because it incorrectly disables the field for admins who can manage and add to those reports.
Filtering within useOutstandingReports: rejected because useOutstandingReports is a shared hook used across search, workspace overview, and LHN, where non-reimbursable open reports must still be counted.
PR 106275 merged on November 16. It makes the Report field offer only reports that can actually accept the new expense, while preserving the existing rules for moving expenses.
Production deployment and manual QA still need confirmation before calling this complete.
changed the title [-][$175] Expense - Report files is enable when all report contain non-reimbursable expense[/-][+][Due for payment 2026-11-25] [$175] Expense - Report files is enable when all report contain non-reimbursable expense[/+]on Nov 18, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.41-2 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-11-25. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
MelvinBot commentedon Oct 15, 2026
Issue Analysis
Conclusion: This is expected behavior, not a bug. The regression test's expected result is wrong. You should close this issue and update the test step.
Why: These exact steps were already handled in [Due for payment 2026-02-16] [$250] Expense - Report field opens a blank page when all reports contain non-reimbursable expense. Its fix, [CP Staging] fix Expense - Report field opens a blank page when all reports contain non-reimbursable expense, was a partial revert "to match production behavior." Its test step 7 says: "Verify that reports are available (this matches production behavior)." The regression test seems to have copied the original bug's expected result ("report field is disabled…") rather than the behavior the fix settled on.
Recommended action:
Investigation details
How the confirm page decides whether the Report field is enabled
ReportField.tsx:116enables the field when the user has more than one outstanding report.isReportOutstandingcounts any Open report, and it doesn't check whether the expenses are reimbursable. After the retract, both reports are Open again, so the count is 2 and the field is enabled.Report picker
IOURequestEditReportCommon.tsx:183-189filters reports withcanAddTransaction. That function excludes reports with only non-reimbursable expenses when the workspace uses Instant Submit plus Submit & Close (ReportUtils.ts:3143-3150). However, workspace admins and report managers skip this filter. The tester changed Workflows settings, so they are an admin and see both reports. That matches the behavior chosen in the fix above.Small, separate gap (optional)
A workspace member who is neither an admin nor the report manager sees an enabled Report field. When they open it, the picker hides both reports and shows only "Create report." If you want to tighten this, have
ReportField.tsxcount reports with the same filter the picker uses. Do not add a blanket non-reimbursable exclusion. That would bring back the blank-page bug from #81608. The open PR fix: hide ineligible move report destinations also keeps retracted Open drafts as valid destinations.Not verified: I didn't reproduce this in the app. The conclusion is based on the code at
b9a9521and the PR history above.Next Steps: Reply with
@MelvinBot <your feedback>to refine this analysis.view run
melvin-bot commentedon Oct 15, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Krishna2323 (
External)[-]Expense - Report files is enable when all report contain non-reimbursable expense[/-][+][$175] Expense - Report files is enable when all report contain non-reimbursable expense[/+]melvin-bot commentedon Oct 15, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022110833816404111157
janiya2 commentedon Oct 15, 2026
Contributor details
Your Expensify account email: janithad2@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/janithad
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the expense confirmation page, the Report field remains enabled/interactive when all existing reports in the workspace contain non-reimbursable expenses and have been retracted.
What is the root cause of that problem?
1. Analysis of Current Behavior vs Intended Production Behavior:
This exact scenario was previously addressed in Issue #81608 and resolved in PR #81676 ("[CP Staging] fix Expense - Report field opens a blank page when all reports contain non-reimbursable expense").
In PR #81676, the testing steps explicitly defined the expected behavior:
When an expense report is retracted, its status resets to
Open(CONST.REPORT.STATUS_NUM.OPEN). As long as the user has more than one open outstanding report, having the Report field enabled is intentional so the user can choose which open report to attach their expense to. The regression test in BrowserStack/TestRail (https://github.com/Expensify/Expensify/issues/602527) was based on the outdated expected result from before PR #81676 settled on matching production behavior.2. Code-level Root Cause (if the field is intended to be disabled):
In
src/components/MoneyRequestConfirmationList/sections/ReportField.tsx:113-116:useOutstandingReportscounts all open reports viaisReportOutstandingwithout verifying whether those reports can accept the current transaction type viacanAddTransaction.IOURequestEditReportCommon.tsxusescanAddTransaction(report, rules, undefined, true)to filter report picker options,ReportField.tsxdetermines interactivity based purely onoutstandingReports.length > 1.IOURequestEditReportCommon.tsx:187-189allows both retracted reports anyway (isReportPolicyAdmin || isReportManager), so both reports are visible and selectable when opening the picker.What changes do you think we should make in order to solve the problem?
Approach 1: Close as Expected Behavior & Update Regression Test (Recommended)
Since PR #81676 deliberately ensured reports are available and selectable to match production behavior, close this issue as expected behavior and update TestRail test case
602527step 6–7 to:Approach 2: Align
ReportField.tsxwithcanAddTransactionEligibility CheckIf the product team specifically wants the Report field to be disabled whenever the user does not have more than 1 eligible destination report, update
ReportField.tsxto filteroutstandingReportsagainstcanAddTransaction:In
src/components/MoneyRequestConfirmationList/sections/ReportField.tsx:What alternative solutions did you explore? (Optional)
useOutstandingReports: Rejected because it would cause a regression of Issue [Due for payment 2026-02-16] [$250] Expense - Report field opens a blank page when all reports contain non-reimbursable expense #81608 (causing the Report field to open to an empty/blank page).melvin-bot commentedon Oct 15, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
jloa-dev commentedon Oct 17, 2026
Contributor details
Your Expensify account email: jloa.dev@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0163955a2ba22190aa
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the expense confirmation page, the Report field remains interactive/clickable even when all outstanding reports for the workspace contain only non-reimbursable expenses (and cannot accept new transactions), leading to an interactive field that cannot attach to those reports.
What is the root cause of that problem?
In
src/components/MoneyRequestConfirmationList/sections/ReportField.tsx(lines 113–116):useOutstandingReportsreturns all outstanding reports by checking open status, but it does NOT verify whether the user/expense is eligible to add transactions to those reports.ReportUtils.canAddTransaction(report, rules, undefined, true)returnsfalse(lines 3102–3108 ofReportUtils.ts).outstandingReports.length > 1evaluates totrue, none of those reports can actually accept the expense.ReportFieldincorrectly setsshouldReportBeEditable = true, leaving the field interactive when it should be disabled / read-only.What changes do you think we should make in order to solve the problem?
src/components/MoneyRequestConfirmationList/sections/ReportField.tsx:outstandingReportsusingcanAddTransaction(report, rules, undefined, true)to obtaineligibleOutstandingReports.shouldReportBeEditableto base its threshold oneligibleOutstandingReports:Pre-coded and tested in branch:
fix/104162-report-field-non-reimbursable(https://github.com/jloa-dev/App/tree/fix/104162-report-field-non-reimbursable).What alternative solutions did you explore? (Optional)
Filtering out non-reimbursable reports inside
useOutstandingReportshook globally. However, that hook is shared by other flows (including search and workspace overview) where open reports need to be listed regardless of transaction eligibility. Filtering at the field level where interactivity is determined is cleaner and avoids side-effects.melvin-bot commentedon Oct 17, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
sijo0218 commentedon Oct 18, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the expense confirmation page, the Report field appears interactive/clickable (
shouldReportBeEditable = true) even when all existing outstanding reports in a workspace contain only non-reimbursable expenses (under Instant Submit and Submit & Close), leading to a state where opening the field displays no selectable reports for standard members.What is the root cause of that problem?
There is a discrepancy between how
ReportField.tsxdetermines interactivity and howIOURequestEditReportCommon.tsxdetermines report eligibility:In
src/components/MoneyRequestConfirmationList/sections/ReportField.tsx(lines 114–116):ReportFielddetermines whether the field is editable purely by checkingoutstandingReports.length > 1(whereisReportOutstandingonly checks if the report is open/submitted).In
src/libs/ReportUtils.ts(lines 3143–3150):Under Instant Submit with Submit & Close policies,
canAddTransaction(report, rules, undefined, true)returnsfalsefor reports that contain only non-reimbursable transactions (hasOnlyNonReimbursableTransactions).In
src/pages/iou/request/step/IOURequestEditReportCommon.tsx(lines 183–189):When the user opens the report selection step, the list filters reports using:
For a standard employee who is neither an admin nor the report manager,
IOURequestEditReportCommonfilters out all non-reimbursable reports, leaving no existing reports to choose from. Yet on the confirmation page,ReportFieldevaluatedshouldReportBeEditable = true, presenting a clickable control that has nowhere to navigate.What changes do you think we should make in order to solve the problem?
In
src/components/MoneyRequestConfirmationList/sections/ReportField.tsx:usePolicy,useCurrentUserPersonalDetails,isPolicyAdmin, andcanAddTransaction.outstandingReportstoeligibleOutstandingReportsusing the identical authorization predicate asIOURequestEditReportCommon:Result:
shouldReportBeEditablecorrectly evaluates tofalse, rendering the field read-only and preventing empty/misleading report picker flows.What alternative solutions did you explore? (Optional)
canAddTransactionwithout checkingisPolicyAdmin || isReportManager: rejected because it incorrectly disables the field for admins who can manage and add to those reports.useOutstandingReports: rejected becauseuseOutstandingReportsis a shared hook used across search, workspace overview, and LHN, where non-reimbursable open reports must still be counted.Contributor details
Your Expensify account email: sijo0218@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~011091133bbb09cd1c
32 remaining items
melvin-bot commentedon Nov 10, 2026
@Krishna2323 Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Nov 12, 2026
@deetergp @Krishna2323 this issue is now 4 weeks old, please consider:
Thanks!
melvin-bot commentedon Nov 12, 2026
@Krishna2323 Eep! 4 days overdue now. Issues have feelings too...
deetergp commentedon Nov 18, 2026
PR 106275 merged on November 16. It makes the Report field offer only reports that can actually accept the new expense, while preserving the existing rules for moving expenses.
Production deployment and manual QA still need confirmation before calling this complete.
[-][$175] Expense - Report files is enable when all report contain non-reimbursable expense[/-][+][Due for payment 2026-11-25] [$175] Expense - Report files is enable when all report contain non-reimbursable expense[/+]melvin-bot commentedon Nov 18, 2026
@Krishna2323
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.41-2 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-11-25. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]