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-09-22] [$250] Expense - "Moved this expense to personal space" shown on expense moved to report on same WS #68628
Prerequisite: Account has at least one workspace available.
Prerequisite 2: Account has a Self DM.
Open the staging.new.expensify.com website.
Open any workspace chat.
Create a manual expense.
Create a new report on the same workspace chat, but don´t submit any expense to it.
Open the expense created on step 3.
Tap on the report field and select the report created on step 4.
Once expense is moved and you land on the empty report, tap on "More" and delete the report.
Open the report where the expense was moved.
Note that a "Moved this expense to your personal space" system message is displayed.
Expected Result:
When an expense is moved to a different report on the same workspace, the system message generated with this action, should be "Moved this expense to Expense Report XX".
Actual Result:
When an expense is moved to a different report on the same workspace, and the first report is deleted, the correct "Moved this expense to Expense Report XX" appears, but also a "Moved this expense to your personal space" message can be seen on the moved expense.
What changes do you think we should make in order to solve the problem?
We should take care of the case where an expense was unreported and then moved to a report so we can filter out the reportAction that displays the msg "moved this expense to your personal space"
ReportActionsUtils.ts -> shouldReportActionBeVisible function
// add this condition.if(reportAction.actionName===CONST.REPORT.ACTIONS.TYPE.UNREPORTED_TRANSACTION&&!isMovedTransactionAction(reportAction)){returnfalse;}
Please re-state the problem that we are trying to solve in this issue.
When an expense is moved from one workspace report to another, and the original report is deleted, the system currently displays two messages:
The correct message: "Moved this expense to Expense Report XX"
An incorrect message: "Moved this expense to your personal space"
This is confusing for users, as the expense was not moved to personal space, but to another workspace report.
What is the root cause of that problem?
The code previously always added an UNREPORTED_TRANSACTION system message in src/libs/actions/Report.ts when deleting a report, regardless of whether the expense was being moved to another workspace report or to personal space. This was due to the lack of a conditional check on the destination of the moved expense, resulting in both messages being shown.
What changes do you think we should make in order to solve the problem?
Update the logic in src/libs/actions/Report.ts so that the UNREPORTED_TRANSACTION system message is only added if the expense is actually being moved to personal space (unreported). This is done by checking if the target report is a personal space before adding the action. If the expense is moved to another workspace report, only the correct message ("Moved this expense to Expense Report XX") will be shown.
Please re-state the problem that we are trying to solve in this issue.
When an expense is moved to a different report within the same workspace, and the original report is then deleted, the correct system message — “Moved this expense to Expense Report XX” — appears. However, an additional incorrect message — “Moved this expense to your personal space” — is also displayed on the moved expense.
What is the root cause of that problem?
During report deletion, the app adds a UNREPORTED_TRANSACTION for each IOU action in the report:
The root cause is that reportActionsForReport does not filter out actions that are marked as deleted. In this scenario, the IOU action corresponding to the moved transaction is already marked as deleted, but it is still included in the subsequent processing.
Consequently, a UNREPORTED_TRANSACTION is constructed for a deleted IOU action, which erroneously yields the “personal space” message.
What changes do you think we should make in order to solve the problem?
Add a deletion check at this point to exclude deleted actions from reportActionsForReport:
changed the title [-]Expense - "Moved this expense to personal space" shown on expense moved to report on same WS[/-][+][$250] Expense - "Moved this expense to personal space" shown on expense moved to report on same WS[/+]on Aug 24, 2025
Activity
melvin-bot commentedon Aug 17, 2025
Triggered auto assignment to @muttmuure (
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.aadil42 commentedon Aug 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When we create a manual expense in a workspace and then we move that expense to a report in the same workspace there are two msgs that are shown.
"moved this expense to {exepnseReportName}" (expected)
"moved this expense to your to your personal space" (not expected)
What is the root cause of that problem?
Here we are filtering out all the reportActions that should not be visible.
App/src/pages/home/report/ReportActionsView.tsx
Lines 203 to 204 in eb438cf
in the
shouldReportActionBeVisiblefunction we're not taking care of the case where an unreported expense is moved to a report.App/src/libs/ReportActionsUtils.ts
Lines 799 to 857 in eb438cf
What changes do you think we should make in order to solve the problem?
We should take care of the case where an expense was unreported and then moved to a report so we can filter out the reportAction that displays the msg "moved this expense to your personal space"
ReportActionsUtils.ts -> shouldReportActionBeVisible function
Like we're doing here for closed action.
App/src/libs/ReportActionsUtils.ts
Lines 814 to 816 in eb438cf
And also doing for reimbursed actions
App/src/libs/ReportActionsUtils.ts
Lines 820 to 822 in eb438cf
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
aadil42 commentedon Aug 17, 2025
Screen.Recording.2025-08-17.at.2.mp4
D-01576 commentedon Aug 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an expense is moved from one workspace report to another, and the original report is deleted, the system currently displays two messages:
This is confusing for users, as the expense was not moved to personal space, but to another workspace report.
What is the root cause of that problem?
The code previously always added an
UNREPORTED_TRANSACTIONsystem message insrc/libs/actions/Report.tswhen deleting a report, regardless of whether the expense was being moved to another workspace report or to personal space. This was due to the lack of a conditional check on the destination of the moved expense, resulting in both messages being shown.What changes do you think we should make in order to solve the problem?
Update the logic in
src/libs/actions/Report.tsso that theUNREPORTED_TRANSACTIONsystem message is only added if the expense is actually being moved to personal space (unreported). This is done by checking if the target report is a personal space before adding the action. If the expense is moved to another workspace report, only the correct message ("Moved this expense to Expense Report XX") will be shown.before adding condition:
After adding condition:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
none
What alternative solutions did you explore? (Optional)
none
D-01576 commentedon Aug 17, 2025
fixed.mov
thelullabyy commentedon Aug 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
During report deletion, the app adds a
UNREPORTED_TRANSACTIONfor each IOU action in the report:App/src/libs/actions/Report.ts
Line 4930 in 17051f9
(IOU actions are gathered here:
App/src/libs/actions/Report.ts
Line 4800 in 17051f9
The root cause is that
reportActionsForReportdoes not filter out actions that are marked as deleted. In this scenario, the IOU action corresponding to the moved transaction is already marked as deleted, but it is still included in the subsequent processing.Consequently, a
UNREPORTED_TRANSACTIONis constructed for a deleted IOU action, which erroneously yields the “personal space” message.What changes do you think we should make in order to solve the problem?
reportActionsForReport:App/src/libs/actions/Report.ts
Line 4804 in 17051f9
This ensures only valid, non-deleted IOU actions are considered, preventing the spurious “personal space” message.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
melvin-bot commentedon Aug 20, 2025
@muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Aug 22, 2025
@muttmuure Huh... This is 4 days overdue. Who can take care of this?
[-]Expense - "Moved this expense to personal space" shown on expense moved to report on same WS[/-][+][$250] Expense - "Moved this expense to personal space" shown on expense moved to report on same WS[/+]melvin-bot commentedon Aug 24, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021959570938508196807
44 remaining items
muttmuure commentedon Oct 6, 2025
Payment Summary
Contributor: @thelullabyy paid $250 via Upwork
Contributor+: @Pujan92 due $250 via NewDot
muttmuure commentedon Oct 6, 2025
@thelullabyy I think you've already been paid here: https://www.upwork.com/ab/feedbacks/c/1328455843768528896/contract/41051159
Please let me know via Slack if otherwise
thelullabyy commentedon Oct 7, 2025
@muttmuure I’m curious why you mentioned that I’ve already been paid in #65413, as these are actually two separate issues.
JmillsExpensify commentedon Oct 8, 2025
$250 approved for @Pujan92
thelullabyy commentedon Oct 8, 2025
@JmillsExpensify Friendly reminder to take a look at my thought #68628 (comment)
muttmuure commentedon Oct 22, 2025
@thelullabyy please can you apply to https://www.upwork.com/jobs/~021980955936139534673
thelullabyy commentedon Oct 22, 2025
@muttmuure Thanks. I applied to the job.
madmax330 commentedon Oct 27, 2025
Not overdue
melvin-bot commentedon Oct 27, 2025
@muttmuure Eep! 4 days overdue now. Issues have feelings too...
muttmuure commentedon Oct 28, 2025
Paid