Skip to content

Create report button shows different workspace name when bulk moving & moving individually #87441

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.55-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: #85927
Email or phone of affected tester (no customers): jsdjosidjiojisojio3@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Create two workspaces - A and B.
  • Workspace A is the default workspace.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat B.
  3. Create two expenses.
  4. Open the report.
  5. Select an expense via checkbox.
  6. Click dropdown button > Move to report.
    → Create report button shows Workspace A.
  7. Close the RHP.
  8. Open any expense.
  9. Click Report field.
    → Create report button shows Workspace B.

Expected Result:

In Step 6 and 9, Create report button should both display Workspace A (default workspace) (from #85927).

Actual Result:

In Step 6, Create report button shows Workspace A (default workspace).
In Step 9, Create report button shows Workspace B.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Apr 9, 2026

    @melvin-bot

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

  4. github-actions commented on Apr 9, 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.
  5. OSBotify commented on Apr 9, 2026

    @OSBotify
    Contributor

    Investigation Summary: Frontend bug. Causing PR: #85927 - Fix Create Report row showing wrong workspace name when moving expenses by @MelvinBot (High confidence). Recommendation: REVERT. PR #85927 introduced a regression in IOURequestStepReport.tsx. The single-expense Report field path still passes selectedReport?.policyID which causes Workspace B to show instead of the default Workspace A. Assigned: @MelvinBot, @jayeshmangwani, @deetergp. Labels: DeployBlockerCash kept.

  6. MelvinBot commented on Apr 9, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    IOURequestStepReport.tsx (the individual expense "Report field" path) passes the current report's policyID to the usePolicyForMovingExpenses hook (line 81-84):

    selectedReport?.policyID ?? transactionPolicyID
    

    When the expense lives on workspace B's report, this resolves to workspace B's policyID. The hook then short-circuits at line 63-67 — seeing a valid expensePolicyID, it returns workspace B immediately without ever falling through to the user's default/active workspace (A).

    By contrast, the bulk-move dropdown path (IOURequestEditReport.tsx) passes undefined (line 60), so the hook correctly falls through to the activePolicy check and shows the default workspace.

    This regression was introduced in PR #85927.

    What changes do you think we should make in order to solve the problem?

    In IOURequestStepReport.tsx, pass undefined instead of selectedReport?.policyID ?? transactionPolicyID as the third argument to usePolicyForMovingExpenses (line 83), and similarly remove the transactionPolicyID prop passed to IOURequestEditReportCommon (line 291). This matches the behavior of IOURequestEditReport.tsx and lets the hook fall through to the user's default workspace.

    What alternative solutions did you explore?

    Instead of changing the caller, the hook itself could be modified to always prefer the active/default policy. However, SearchTransactionsChangeReport intentionally uses the report's policyID for its context, so the caller-level fix is more targeted and avoids changing shared behavior.

    Related issues

    #84139 — "Workspace does not become default workspace after selecting it from Create button" — related to default workspace selection in the Create flow but different root cause.


    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.

  7. jayeshmangwani commented on Apr 9, 2026

    @jayeshmangwani
    Contributor

    @MelvinBot implement this

  8. MelvinBot commented on Apr 9, 2026

    @MelvinBot
    Contributor

    🤖 Cannot proceed: jayeshmangwani does not have write access to the target repository (Expensify/App). MelvinBot will not create branches or PRs on repos that the requesting user cannot access themselves.

  9. 34 remaining items

  10. changed the title [-][Due for payment 2026-05-07] Create report button shows different workspace name when bulk moving & moving individually[/-] [+]Create report button shows different workspace name when bulk moving & moving individually[/+] on May 8, 2026
  11. mallenexpensify commented on May 8, 2026

    @mallenexpensify
    Contributor

    Note: PR for this issue caused two regressions, so payment will be reduced accordingly.

    Thanks @jayeshmangwani this saves me a lot of time. Waiting for final PR to hit production. Please comment and tag me if/when payment is due, thx

  12. melvin-bot commented on May 11, 2026

    @melvin-bot

    @deetergp, @MelvinBot, @mallenexpensify, @jayeshmangwani Whoops! This issue is 2 days overdue. Let's get this updated quick!

  13. jayeshmangwani commented on May 12, 2026

    @jayeshmangwani
    Contributor

    Update: PR #89333 is on staging

  14. melvin-bot commented on May 15, 2026

    @melvin-bot

    @deetergp, @MelvinBot, @mallenexpensify, @jayeshmangwani Whoops! This issue is 2 days overdue. Let's get this updated quick!

  15. deetergp commented on May 15, 2026

    @deetergp
    Contributor

    PR is now on Production.

  16. jayeshmangwani commented on May 18, 2026

    @jayeshmangwani
    Contributor

    @deetergp I think we can close this issue, as it was a regression. Payment will be handled in this issue: #84618

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions