Skip to content

Report page is empty when submitting to employer when there are reports in approve-only WS #104914

Open

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


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.
  1. Go to staging.new.expensify.com
  2. [User B] Create two empty reports in the invited workspace chat.
  3. [User A] Change User B's role to Approve-only in workspace settings > Members.
  4. [User B] Delete the default workspace.
  5. [User B] Go to self DM and create an expense.
  6. [User B] Click Submit to my employer.
  7. [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.

Actual Result:

Report field is enabled and it is empty.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7294666_1792779578906.15.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7294666

Issue OwnerCurrent Issue Owner: @ShridharGoel

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 23, 2026
  2. applause-bot commented on Oct 23, 2026

    @applause-bot
    Author

    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

  3. melvin-bot commented on Oct 23, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #102933

  4. melvin-bot commented on Oct 23, 2026

    @melvin-bot

    @flodnv @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #102933

  5. melvin-bot commented on Oct 23, 2026

    @melvin-bot

    @ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102933

  6. melvin-bot commented on Oct 23, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  7. github-actions commented on Oct 23, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  8. MelvinBot commented on Oct 23, 2026

    @MelvinBot
    Contributor

    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.

    1. 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.
    2. 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.

    1. 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.
    2. 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.
    3. The Report field is enabled. src/components/MoneyRequestConfirmationList/sections/ReportField.tsx#L113-L116 enables the field when outstandingReports.length > 1. The hook (src/hooks/useOutstandingReports.ts#L48-L55) doesn't check the role, so it counts both empty reports.
    4. The list is empty. src/pages/iou/request/step/IOURequestEditReportCommon.tsx#L168-L179 drops reports where canCreateExpensesOnPolicy is false. The PR added this filter, so both reports are hidden.

    Other notes

    • 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.
    • I checked the other PRs on the Deploy Checklist: New Expensify 2026-10-23. None of them changes this logic.
    • Both fixes should get unit tests for an approve-only member.

    view run

  9. added and removed
    ReviewingHas a PR in review
    DeployBlockerCashThis issue or pull request should block deployment
    on Oct 26, 2026
  10. m-natarajan commented on Oct 26, 2026

    @m-natarajan

    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
  11. melvin-bot commented on Oct 29, 2026

    @melvin-bot

    @ShridharGoel Whoops! This issue is 2 days overdue. Let's get this updated quick!

  12. melvin-bot commented on Nov 2, 2026

    @melvin-bot

    @ShridharGoel Still overdue 6 days?! Let's take care of this!

  13. melvin-bot commented on Nov 3, 2026

    @melvin-bot

    @ShridharGoel Still overdue 6 days?! Let's take care of this!

  14. melvin-bot commented on Nov 3, 2026

    @melvin-bot

    @ShridharGoel 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  15. melvin-bot commented on Nov 3, 2026

    @melvin-bot

    @ShridharGoel Still overdue 6 days?! Let's take care of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions