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
[$250] Expense - Report can be selected on confirm page when expense cannot be added #77661
Version Number: 9.2.78-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: Exp #75792 Email or phone of affected tester (no customers):isjdsoijsojnsiojisndj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Critical User Impact Device used: Mac 26.1 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Create a workspace.
Go to workspace chat.
Create an expense in workspace chat.
Click Submit on the expense preview.
Open the report and rename it (to easily identify later).
Go back to workspace chat and create an empty report.
Go to workspace settings > Workflows.
Disable Add approvals and Make or track payments.
Change Submission frequency to Instantly.
Go back to workspace chat.
Click + > Create expense > Manual.
Enter amount > Next.
On confirm page, click Report and select the first report from Step 6.
Click Create expense.
Expected Result:
In Step 14, user should not be able to select the outstanding report from Step 6 because app does not allow user to add expense to it after changing submission frequency from Manually to Instantly.
Actual Result:
In Step 14, user can select the outstanding report from Step 6.
In Step 15, after creating the expense, app opens the selected report in Step 14, but the expense is created in a new report.
Please re-state the problem that we are trying to solve in this issue.
Report can be selected on confirm page when expense cannot be added
What is the root cause of that problem?
Inside getOutstandingReportsForUser, we are not checking if the policy is has isInstantSubmitEnabled, isSubmitAndClose and payments are disabled configuration before we return all outstanding reports
What alternative solutions did you explore? (Optional)
Inside MoneyRequestConfirmationListFooter, we can filter availableOutstandingReports to return availableOutstandingReports when the workflow configuration mentioned above is not true and use the filteredOutStandingReports instead of availableOutstandingReports here
Please re-state the problem that we are trying to solve in this issue.
In Step 14, user can select the outstanding report from Step 6.
In Step 15, after creating the expense, app opens the selected report in Step 14, but the expense is created in a new report.
What is the root cause of that problem?
It looks like shouldAllowSubmittedReport condition is incorrect; it's always true for instant submit.
What changes do you think we should make in order to solve the problem?
In Step 14, user should not be able to select the outstanding report from Step 6 because app does not allow user to add expense to it after changing submission frequency from Manually to Instantly.
Based on the expected, we should only allow the submitted report if the submission frequency is not instant. We can also check if the payment is disabled and the policy is submit and close. It can disccus in the PR to match with the backend logic.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
On the expense confirmation page, a user can still select a submitted expense report after switching the workspace to Instant submit + Submit & Close with payments disabled. The app then opens that submitted report, but the expense is placed in a new report instead of the one the user picked.
What is the root cause of that problem?
The outstanding-report selector passes allowSubmitted=false, but isReportOutstanding still treats submitted reports as valid whenever the policy has Instant submit enabled, so those reports stay selectable even though they cannot accept more expenses. See the logic in shouldAllowSubmittedReport, which ignores the caller’s allowSubmitted flag when auto-submit is instant.
MoneyRequestConfirmationListFooter relies on getOutstandingReportsForUser(..., allowSubmitted=false) to hide submitted reports, but because the helper above still includes them, the UI exposes destinations the backend will reject.
We also do not filter the list by whether a report can currently accept new transactions (canAddTransaction), so once a submitted report slips through, nothing else blocks it from being selected.
What changes do you think we should make in order to solve the problem?
Make allowSubmitted authoritative: drop the Instant-submit override so submitted reports are excluded whenever callers pass allowSubmitted=false, while still letting in-processing reports stay selectable.
Only surface reports that can actually accept new expenses when allowSubmitted is false, reusing canAddTransaction to mirror backend rules (instant + submit & close + payments disabled, non-reimbursable-only, etc.).
changed the title [-]Expense - Report can be selected on confirm page when expense cannot be added[/-][+][$250] Expense - Report can be selected on confirm page when expense cannot be added[/+]on Dec 18, 2025
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Create a workspace.
Go to workspace chat.
Create an expense and submit it.
Go back to workspace chat and create an empty report.
Activity
melvin-bot commentedon Dec 15, 2025
Triggered auto assignment to @strepanier03 (
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.etCoderDysto commentedon Dec 15, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Report can be selected on confirm page when expense cannot be added
What is the root cause of that problem?
Inside getOutstandingReportsForUser, we are not checking if the policy is has isInstantSubmitEnabled, isSubmitAndClose and payments are disabled configuration before we return all outstanding reports
App/src/libs/ReportUtils.ts
Lines 11417 to 11427 in 4456dcd
Then
availableOutstandingReports.length > 1will be true and we make report field editableApp/src/components/MoneyRequestConfirmationListFooter.tsx
Line 364 in 584bcca
What changes do you think we should make in order to solve the problem?
We should return empty array if isInstantSubmitEnabled, isSubmitAndClose and payments are disabled
What alternative solutions did you explore? (Optional)
Inside
MoneyRequestConfirmationListFooter, we can filter availableOutstandingReports to return availableOutstandingReports when the workflow configuration mentioned above is not true and use the filteredOutStandingReports instead of availableOutstandingReports hereNote: we can do similar changes in IOURequestEditReportCommon if needed
nkdengineer commentedon Dec 15, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Step 14, user can select the outstanding report from Step 6.
In Step 15, after creating the expense, app opens the selected report in Step 14, but the expense is created in a new report.
What is the root cause of that problem?
It looks like
shouldAllowSubmittedReportcondition is incorrect; it's alwaystruefor instant submit.App/src/libs/ReportUtils.ts
Line 11410 in 584bcca
What changes do you think we should make in order to solve the problem?
Based on the expected, we should only allow the submitted report if the submission frequency is not instant. We can also check if the payment is disabled and the policy is submit and close. It can disccus in the PR to match with the backend logic.
App/src/libs/ReportUtils.ts
Line 11410 in 584bcca
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
ShridharGoel commentedon Dec 15, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the expense confirmation page, a user can still select a submitted expense report after switching the workspace to Instant submit + Submit & Close with payments disabled. The app then opens that submitted report, but the expense is placed in a new report instead of the one the user picked.
What is the root cause of that problem?
The outstanding-report selector passes
allowSubmitted=false, butisReportOutstandingstill treats submitted reports as valid whenever the policy has Instant submit enabled, so those reports stay selectable even though they cannot accept more expenses. See the logic inshouldAllowSubmittedReport, which ignores the caller’sallowSubmittedflag when auto-submit is instant.App/src/libs/ReportUtils.ts
Lines 11393 to 11407 in 8cd91dc
MoneyRequestConfirmationListFooterrelies ongetOutstandingReportsForUser(..., allowSubmitted=false)to hide submitted reports, but because the helper above still includes them, the UI exposes destinations the backend will reject.App/src/components/MoneyRequestConfirmationListFooter.tsx
Lines 323 to 347 in 8cd91dc
We also do not filter the list by whether a report can currently accept new transactions (
canAddTransaction), so once a submitted report slips through, nothing else blocks it from being selected.What changes do you think we should make in order to solve the problem?
allowSubmittedauthoritative: drop the Instant-submit override so submitted reports are excluded whenever callers passallowSubmitted=false, while still letting in-processing reports stay selectable.allowSubmittedis false, reusingcanAddTransactionto mirror backend rules (instant + submit & close + payments disabled, non-reimbursable-only, etc.).Code changes:
[-]Expense - Report can be selected on confirm page when expense cannot be added[/-][+][$250] Expense - Report can be selected on confirm page when expense cannot be added[/+]melvin-bot commentedon Dec 18, 2025
Job added to Upwork: https://www.upwork.com/jobs/~022001509799870274929
melvin-bot commentedon Dec 18, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dominictb (
External)49 remaining items
mkzie2 commentedon Jan 14, 2026
@dukenv0307 The PR is ready for review.
dukenv0307 commentedon Feb 13, 2026
@strepanier03, please remove the Reviewing label and bump to Daily as payment is due
melvin-bot commentedon Feb 13, 2026
This issue has not been updated in over 15 days. @strepanier03, @MariaHCD, @dukenv0307, @mkzie2 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
dukenv0307 commentedon Mar 2, 2026
@strepanier03 kindly bump
dukenv0307 commentedon Mar 6, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/62592/changes#r2893791301
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
10 .Enter amount > Next.
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-2a8b-a3b8-51a0-70374af1c384strepanier03 commentedon Mar 6, 2026
Payment summary
For: #79583
quinthar commentedon Mar 11, 2026
Approved $250 to @dukenv0307