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
Create report button shows different workspace name when bulk moving & moving individually #87441
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.
Go to staging.new.expensify.com
Go to workspace chat B.
Create two expenses.
Open the report.
Select an expense via checkbox.
Click dropdown button > Move to report.
→ Create report button shows Workspace A.
Close the RHP.
Open any expense.
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.
👋 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.
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.
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.
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.
🤖 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.
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
Activity
melvin-bot commentedon Apr 9, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #85927
melvin-bot commentedon Apr 9, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 9, 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:
OSBotify commentedon Apr 9, 2026
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.
MelvinBot commentedon Apr 9, 2026
Proposal
What is the root cause of that problem?
IOURequestStepReport.tsx(the individual expense "Report field" path) passes the current report's policyID to theusePolicyForMovingExpenseshook (line 81-84):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) passesundefined(line 60), so the hook correctly falls through to theactivePolicycheck 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, passundefinedinstead ofselectedReport?.policyID ?? transactionPolicyIDas the third argument tousePolicyForMovingExpenses(line 83), and similarly remove thetransactionPolicyIDprop passed toIOURequestEditReportCommon(line 291). This matches the behavior ofIOURequestEditReport.tsxand 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,
SearchTransactionsChangeReportintentionally 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 thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.jayeshmangwani commentedon Apr 9, 2026
@MelvinBot implement this
MelvinBot commentedon Apr 9, 2026
🤖 Cannot proceed:
jayeshmangwanidoes 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.34 remaining items
[-][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[/+]mallenexpensify commentedon May 8, 2026
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
melvin-bot commentedon May 11, 2026
@deetergp, @MelvinBot, @mallenexpensify, @jayeshmangwani Whoops! This issue is 2 days overdue. Let's get this updated quick!
jayeshmangwani commentedon May 12, 2026
Update: PR #89333 is on staging
melvin-bot commentedon May 15, 2026
@deetergp, @MelvinBot, @mallenexpensify, @jayeshmangwani Whoops! This issue is 2 days overdue. Let's get this updated quick!
deetergp commentedon May 15, 2026
PR is now on Production.
jayeshmangwani commentedon May 18, 2026
@deetergp I think we can close this issue, as it was a regression. Payment will be handled in this issue: #84618