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
Report page is empty when submitting to employer when there are reports in approve-only WS #104914
Version Number: 9.5.19-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:#102933 Email or phone of affected tester (no customers):jsnoidjosinjdiosj2@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
User A creates a Control workspace.
User A invites User B to workspace.
User B creates a workspace and make it default workspace.
Go to staging.new.expensify.com
[User B] Create two empty reports in the invited workspace chat.
[User A] Change User B's role to Approve-only in workspace settings > Members.
[User B] Delete the default workspace.
[User B] Go to self DM and create an expense.
[User B] Click Submit to my employer.
[User B] Click Report field on confirm page.
Expected Result:
Report field should be disabled as there is no available report to which expense can be added.
👋 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.
Root cause: The Report field and the report list count reports differently. The PR added a filter that hides reports in workspaces where the user can't create expenses, but only on the list. The confirm page's Report field still counts the two empty reports, so it shows as enabled and opens an empty list.
Recommendation: Fix forward rather than revert. A revert would remove the whole approve-only feature (49 files) to fix a small gap.
Main fix: In createFilteredPoliciesInfoSelector, skip workspaces where !canCreateExpensesOnPolicy(policy, email). "Submit to my employer" then stops sending approve-only members straight to that workspace's confirm page.
Defensive fix: Move the canCreateExpensesOnPolicy filter from IOURequestEditReportCommon.tsx into useOutstandingReports. The Report field and the list then use the same reports, so the field is disabled when the list would be empty.
Investigation details
All links use commit f0422d2, which includes the PR.
The approve-only workspace is still counted.src/selectors/Policy.ts#L421-L439 checks only shouldShowPolicy and Teachers Unite. After User B deletes their own workspace, the count is 1 and that one workspace is the approve-only one.
The workspace picker is skipped. When the count is 1, src/libs/actions/IOU/StartExpenseFlows.ts#L408-L426 goes straight to that workspace's confirm page. The PR blocked approve-only workspaces in the pickers but not on this shortcut.
Fix 1 alone fixes the reported steps. With it, the count becomes 0, so "Submit to my employer" creates a new workspace, the same as for a user with no workspace.
Fix 1 also affects Categorize, which uses the same selector. That's arguably correct, since categorizing also creates an expense in the workspace.
Step 2 also means an approve-only member can reach a confirm page for a workspace they can't submit to. I didn't confirm whether the backend rejects that submission.
Activity
applause-bot commentedon Oct 23, 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/2f12907547fb1657001a540f9c1191a0a5b57717f68988e65d4cbdbb6d7f30e7
melvin-bot commentedon Oct 23, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #102933
melvin-bot commentedon Oct 23, 2026
@flodnv @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #102933
melvin-bot commentedon Oct 23, 2026
@ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102933
melvin-bot commentedon Oct 23, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 23, 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:
MelvinBot commentedon Oct 23, 2026
Deploy Blocker Analysis
Causing PR: [Payment due @Pujan92] Add approve-only workspace role (high confidence). This is an edge case in that PR's new feature, not a regression of anything in production.
Root cause: The Report field and the report list count reports differently. The PR added a filter that hides reports in workspaces where the user can't create expenses, but only on the list. The confirm page's Report field still counts the two empty reports, so it shows as enabled and opens an empty list.
Recommendation: Fix forward rather than revert. A revert would remove the whole approve-only feature (49 files) to fix a small gap.
createFilteredPoliciesInfoSelector, skip workspaces where!canCreateExpensesOnPolicy(policy, email). "Submit to my employer" then stops sending approve-only members straight to that workspace's confirm page.canCreateExpensesOnPolicyfilter fromIOURequestEditReportCommon.tsxintouseOutstandingReports. The Report field and the list then use the same reports, so the field is disabled when the list would be empty.Investigation details
All links use commit
f0422d2, which includes the PR.shouldShowPolicyand Teachers Unite. After User B deletes their own workspace, the count is 1 and that one workspace is the approve-only one.outstandingReports.length > 1. The hook (src/hooks/useOutstandingReports.ts#L48-L55) doesn't check the role, so it counts both empty reports.canCreateExpensesOnPolicyis false. The PR added this filter, so both reports are hidden.Other notes
view run
m-natarajan commentedon Oct 26, 2026
Windows 11 / Chrome
v9.5.20-5
Unable to reproduce because the "Approve-only" button is no longer available in the list of roles.
Expensify_104914_Web.mp4
melvin-bot commentedon Oct 29, 2026
@ShridharGoel Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Nov 2, 2026
@ShridharGoel Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Nov 3, 2026
@ShridharGoel Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Nov 3, 2026
@ShridharGoel 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Nov 3, 2026
@ShridharGoel Still overdue 6 days?! Let's take care of this!