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
[Due for payment 2025-07-04] [$250] Report - Change workspace option not display in More of paid IOU Receiver #63819
Version Number: v9.1.63-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/6227168 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: Win 11/Chrome App Component: Money Requests
Action Performed:
Open app
Go to any DM 1:1 conversation
Submit an expense to receiver
At other browser, receiver go to this DM
Click on "Pay amount elsewhere"
Click on View of IOU
Click on More
Expected Result:
Verify the options displayed are: Download , Change workspace, and View details
Actual Result:
The options displayed are: Download as CSV, Download as PDF and View details
changed the title [-]Report - Change workspace option not display in More of paid IOU Receiver[/-][+][$250] Report - Change workspace option not display in More of paid IOU Receiver[/+]on Jun 10, 2025
When it's manually reimbursed report, we don't need to check hasRequestFromCurrentAccount here. We need to update both moveIOUReportToPolicyAndInviteSubmitter and moveIOUReportToPolicy functions
Note: We can only change workspace if Policy and IOU must share the same payer. And it seems to be fixed in this PR
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can add test for canEditReportPolicy function to cover this scenario
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
The issue was caught during regression testing, so no need to add another one
Activity
melvin-bot commentedon Jun 10, 2025
Triggered auto assignment to @maddylewis (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.[-]Report - Change workspace option not display in More of paid IOU Receiver[/-][+][$250] Report - Change workspace option not display in More of paid IOU Receiver[/+]melvin-bot commentedon Jun 10, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021932424648996266754
melvin-bot commentedon Jun 10, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (
External)daledah commentedon Jun 10, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-06-10 21:10:10 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The options displayed are: Download as CSV, Download as PDF and View details
What is the root cause of that problem?
With iou expense, we only allow edit when it's an open report or processing report
App/src/libs/ReportSecondaryActionUtils.ts
Lines 390 to 397 in a3e39d2
App/src/libs/ReportUtils.ts
Lines 3853 to 3858 in a3e39d2
What changes do you think we should make in order to solve the problem?
App/src/libs/ReportUtils.ts
Lines 3853 to 3858 in a3e39d2
hasRequestFromCurrentAccounthere. We need to update bothmoveIOUReportToPolicyAndInviteSubmitterandmoveIOUReportToPolicyfunctionsApp/src/libs/actions/Report.ts
Lines 5125 to 5128 in a3e39d2
App/src/libs/actions/Report.ts
Lines 4950 to 4953 in a3e39d2
Note: We can only change workspace if Policy and IOU must share the same payer. And it seems to be fixed in this PR
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can add test for
canEditReportPolicyfunction to cover this scenarioWhat alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
ijmalik commentedon Jun 10, 2025
Please re-state the problem that we are trying to solve in this issue.
The "Change Workspace" option is not appearing in the More menu for paid IOU reports where the user is the receiver
What is the root cause of that problem?
App/src/libs/ReportSecondaryActionUtils.ts
Lines 560 to 563 in 94e5927
App/src/pages/ReportChangeWorkspacePage.tsx
Line 53 in 26ae296
App/src/libs/ReportUtils.ts
Lines 3856 to 3858 in 26ae296
Current validation in ReportUtils.canChangeWorkspace() only allows:
Open reports (isOpen)
Submitted reports (isSubmitted)
Missing check for reimbursed reports (isSettled)
The moveIOUReportToPolicy function has protection logic that:
Prevents moving unpaid negative expenses
Doesn't properly account for settled reports
What changes do you think we should make in order to solve the problem?
Replace
App/src/libs/ReportUtils.ts
Lines 3854 to 3858 in 26ae296
Replace
App/src/libs/actions/Report.ts
Lines 4951 to 4953 in 94e5927
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Positive Cases: Ensure "Change Workspace" is available for IOU reports in OPEN, SUBMITTED, and REIMBURSED states.
Negative Cases: Verify it’s blocked for unpaid reports where the current user owes money.
What alternative solutions did you explore? (Optional)
63819-1.mp4
ahmedGaber93 commentedon Jun 13, 2025
This part was refactored recently in #62062.
Let's check with @luacmartins if this intentionally and the regression test is outdated, or the expected behavior here is correct.
luacmartins commentedon Jun 13, 2025
The design doc says:
So this seems like a valid issue
37 remaining items
melvin-bot commentedon Jul 7, 2025
@maddylewis Whoops! This issue is 2 days overdue. Let's get this updated quick!
ahmedGaber93 commentedon Jul 8, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: [Due for payment 2025-07-04] [$250] Report - Change workspace option not display in More of paid IOU Receiver #63819 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
The issue was caught during regression testing, so no need to add another one
maddylewis commentedon Jul 8, 2025
@daledah - bump on this - ty! #63819 (comment)
daledah commentedon Jul 8, 2025
@maddylewis Here's the link!
https://www.upwork.com/freelancers/~0138d999529f34d33f
maddylewis commentedon Jul 8, 2025
@daledah - sent you an offer! https://www.upwork.com/nx/wm/offer/107960215
melvin-bot commentedon Jul 11, 2025
@maddylewis Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
maddylewis commentedon Jul 11, 2025
@daledah - will you accept the offer so i can send the payment / close this issue? thanks!
daledah commentedon Jul 11, 2025
@maddylewis I accepted the offer, thank you 💯
maddylewis commentedon Jul 11, 2025
paid!
trjExpensify commentedon Nov 5, 2025
approved $250 for @ahmedGaber93.