Skip to content

[Due for payment 2026-05-20] [$250] Expense - To field shows wrong workspace after creating new report on confirm page #89104

Closed

Description

@applause-bot

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.64-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: #87962
Email or phone of affected tester (no customers): sjiodjnsoijdnijsiojosj1@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:

  1. Go to staging.new.expensify.com
  2. Create two workspaces - A and B.
  3. Create an empty report in each workspace chat.
  4. Open FAB > Create expense > Manual.
  5. Enter amount > Next.
  6. On confirm page, click Report field.
  7. Select report from workspace B.
  8. Click Report field.
    → Create report button subtitle shows workspace A.
  9. Click Create report.
  10. Click Report field.
    → The new report is created in workspace A.
  11. Click RHP back button.
    → To field shows workspace B, when the selected report in Step 10 is from workspace A.

Expected Result:

To field should update to workspace A because the selected report in Report field is workspace A.

Actual Result:

To field shows workspace B when the selected report in Report field is workspace A.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7140146_1777381054308.11.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022051932123994388588
  • Upwork Job ID: 2051932123994388588
  • Last Price Increase: 2026-05-06
Issue OwnerCurrent Issue Owner: @jayeshmangwani

Activity

  1. added
    DeployBlockerCash
    Bug
    on Apr 28, 2026
  2. melvin-bot commented on Apr 28, 2026

    @melvin-bot

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

  3. melvin-bot commented on Apr 28, 2026

    @melvin-bot

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

  4. melvin-bot commented on Apr 28, 2026

    @melvin-bot

    📣 @applause-bot[bot]! 📣
    Please report bugs or suggest features in the #expensify-open-source Slack channel, don't directly open issues in this repo!
    Instructions here to join the channel 📖

  5. github-actions commented on Apr 28, 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.
  6. MelvinBot commented on Apr 28, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #87962 (fixing #87441) changed the "Create report" button to use the default workspace for the user's own expenses. However, when createReportForPolicy creates a new report, it routes through handleRegularReportSelection, which only updates transaction.reportID but does not update transaction.participants.

    The "To" field on the confirmation page is derived from transaction.participants. So after creating a report in workspace A, reportID points to workspace A but participants still references workspace B — causing the stale "To" field.

    By contrast, handleGlobalCreateReport correctly updates both reportID and participants when selecting a report.

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

    Update handleRegularReportSelection in IOURequestStepReport.tsx to also pass updated participants (with the new report's policyID and reportID) to setTransactionReport, matching the pattern used by handleGlobalCreateReport. This ensures the "To" field stays in sync whenever the report changes.

    What alternative solutions did you explore? (Optional)

    An alternative would be to add a useEffect in IOURequestStepConfirmation that syncs participants whenever transaction.reportID changes (similar to the existing PAY-type sync at line 210). However, updating at the source (handleRegularReportSelection) is cleaner and avoids reactive cascading updates.

    Investigation details

    Data flow of the bug:

    1. User is on confirm page with expense targeting workspace B (transaction.participants has policyID=B)
    2. User opens Report field, clicks "Create report"
    3. Because this is the user's own expense, targetExpensePolicyID is set to undefined
    4. usePolicyForMovingExpenses falls back to the active/default workspace (A)
    5. createReportForPolicy creates a report in workspace A, then calls handleRegularReportSelection
    6. handleRegularReportSelection calls setTransactionReport with only {reportID: newReportID} — no participants update
    7. Back on confirmation page: transaction.reportID → workspace A, but transaction.participants → still workspace B
    8. "To" field renders stale workspace B

    Related issue: #87441 (the original issue that PR #87962 was fixing)


    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. changed the title [-]88633R2 Expense - To field shows wrong workspace after creating new report on confirm page[/-] [+]Expense - To field shows wrong workspace after creating new report on confirm page[/+] on Apr 28, 2026
  8. reopened this on Apr 28, 2026
  9. 19 remaining items

  10. changed the title [-]Expense - To field shows wrong workspace after creating new report on confirm page[/-] [+][$250] Expense - To field shows wrong workspace after creating new report on confirm page[/+] on May 6, 2026
  11. KJ21-ENG commented on May 6, 2026

    @KJ21-ENG
    Contributor

    @jayeshmangwani @deetergp the job has been added to Upwork, but the external labels are missing. Is this issue open for external contributors, or did Melvin miss something here?

  12. jayeshmangwani commented on May 6, 2026

    @jayeshmangwani
    Contributor

    @KJ21-ENG It seems the issue is from Melvin. Issue already has a "reviewing" label, and the PR is being reviewed, so it’s not open for proposals.

  13. KJ21-ENG commented on May 6, 2026

    @KJ21-ENG
    Contributor

    @jayeshmangwani thanks for the clarification.

  14. deetergp commented on May 13, 2026

    @deetergp
    Contributor

    The fix is currently on staging.

  15. added
    Daily
    and removed
    Reviewing
    Weekly
    on May 13, 2026
  16. changed the title [-][$250] Expense - To field shows wrong workspace after creating new report on confirm page[/-] [+][Due for payment 2026-05-20] [$250] Expense - To field shows wrong workspace after creating new report on confirm page[/+] on May 13, 2026
  17. melvin-bot commented on May 13, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  18. melvin-bot commented on May 13, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.72-1 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-05-20. 🎊

    For reference, here are some details about the assignees on this issue:

  19. melvin-bot commented on May 13, 2026

    @melvin-bot

    @jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

  20. 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: #87441

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

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions