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
Wrong system message after remove expense from report #77339
Version Number: v9.2.75-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#76209 Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: MacOS Monterey 12.7.4 / Chrome App Component: Other
Action Performed:
Go to workspace chat.
Create an expense.
Open the transaction thread.
Click Report.
Click Remove from report.
Go to self DM.
Open the unreported expense.
Expected Result:
System message "Moved this expense to your personal space" shown
Please re-state the problem that we are trying to solve in this issue.
When removing an expense from a report, the system message shows "Moved this expense from " (incomplete) instead of "Moved this expense to your personal space".
What is the root cause of that problem?
The issue is in the getUnreportedTransactionMessage function in App/src/libs/ReportUtils.ts (around line 7091).
When an expense is removed from a report, an UNREPORTED_TRANSACTION action is created via buildOptimisticUnreportedTransactionAction with fromReportID set to the report the expense was removed from
When displaying the action, getUnreportedTransactionMessage is called
The function checks if fromReportID === CONST.REPORT.UNREPORTED_REPORT_ID (line 7102)
Since the expense is being removed FROM a report (not FROM personal space), this condition is false
The function then tries to retrieve the report name from allReports using fromReportID
If the report doesn't exist in allReports or getReportName returns an empty value, reportName becomes an empty string
The function calls translateLocal('iou.movedTransactionFrom', {reportUrl, reportName}) with an empty reportName
The translation movedTransactionFrom returns "moved this expense from " (incomplete) because it expects a non-empty reportName
The fundamental flaw:
The UNREPORTED_TRANSACTION action type indicates that an expense was moved TO personal space (unreported), not FROM somewhere. The function incorrectly tries to show "moved from {reportName}" when fromReportID is not UNREPORTED_REPORT_ID. The function should always show "moved this expense to your personal space" for UNREPORTED_TRANSACTION actions, because the action type itself inherently represents moving TO personal space.
What changes do you think we should make in order to solve the problem?
Simplify the getUnreportedTransactionMessage function to always return the "moved to personal space" message, since UNREPORTED_TRANSACTION actions inherently mean the expense was moved to personal space.
Simplified logic: Since UNREPORTED_TRANSACTION always means the expense was moved TO personal space, we don't need to check the fromReportID
Consistent message: Always shows "moved this expense to your personal space" which accurately describes what happened
No dependency on report existence: Removes the dependency on fromReport existing in allReports, which was causing the incomplete message
Matches action semantics: The action type UNREPORTED_TRANSACTION is specifically for moving expenses to personal space, so the message should reflect that destination
Translation used:iou.unreportedTransaction renders as: "moved this expense to your personal space" (with a link to the self DM)
What alternative solutions did you explore? (Optional)
@muttmuure this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
This issue has not been updated in over 15 days. @muttmuure eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
melvin-bot commentedon Dec 11, 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.abbasifaizan70 commentedon Dec 11, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When removing an expense from a report, the system message shows "Moved this expense from " (incomplete) instead of "Moved this expense to your personal space".
What is the root cause of that problem?
The issue is in the
getUnreportedTransactionMessagefunction inApp/src/libs/ReportUtils.ts(around line 7091).Current problematic logic:
Why this happens:
UNREPORTED_TRANSACTIONaction is created viabuildOptimisticUnreportedTransactionActionwithfromReportIDset to the report the expense was removed fromgetUnreportedTransactionMessageis calledfromReportID === CONST.REPORT.UNREPORTED_REPORT_ID(line 7102)falseallReportsusingfromReportIDallReportsorgetReportNamereturns an empty value,reportNamebecomes an empty stringtranslateLocal('iou.movedTransactionFrom', {reportUrl, reportName})with an emptyreportNamemovedTransactionFromreturns "moved this expense from " (incomplete) because it expects a non-emptyreportNameThe fundamental flaw:
The
UNREPORTED_TRANSACTIONaction type indicates that an expense was moved TO personal space (unreported), not FROM somewhere. The function incorrectly tries to show "moved from {reportName}" whenfromReportIDis notUNREPORTED_REPORT_ID. The function should always show "moved this expense to your personal space" forUNREPORTED_TRANSACTIONactions, because the action type itself inherently represents moving TO personal space.What changes do you think we should make in order to solve the problem?
Simplify the
getUnreportedTransactionMessagefunction to always return the "moved to personal space" message, sinceUNREPORTED_TRANSACTIONactions inherently mean the expense was moved to personal space.File:
App/src/libs/ReportUtils.tsLocation:
getUnreportedTransactionMessagefunction (around line 7091)Change the function from:
To:
Why this works:
UNREPORTED_TRANSACTIONalways means the expense was moved TO personal space, we don't need to check thefromReportIDfromReportexisting inallReports, which was causing the incomplete messageUNREPORTED_TRANSACTIONis specifically for moving expenses to personal space, so the message should reflect that destinationTranslation used:
iou.unreportedTransactionrenders as: "moved this expense to your personal space" (with a link to the self DM)What alternative solutions did you explore? (Optional)
None
Demo
melvin-bot commentedon Dec 17, 2025
@muttmuure Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Dec 18, 2025
@muttmuure Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Dec 23, 2025
@muttmuure 10 days overdue. Is anyone even seeing these? Hello?
melvin-bot commentedon Dec 24, 2025
@muttmuure 12 days overdue now... This issue's end is nigh!
melvin-bot commentedon Dec 25, 2025
@muttmuure this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
melvin-bot commentedon Jan 1, 2026
This issue has not been updated in over 14 days. @muttmuure eroding to Weekly issue.
melvin-bot commentedon Jan 24, 2026
This issue has not been updated in over 15 days. @muttmuure eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!