Skip to content

The system message does not appear when the expense is moved to another report #99733

Todo

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.63-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: #98046
Email or phone of affected tester (no customers): n/a
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Mac 26.5.1 Safari, iPhone 13 iOS 26.6
App Component: Money Requests

Action Performed:

  1. Go to https://staging.new.expensify.com
  2. Create 2 workspaces
  3. Create a report with an expense in the workspace A
  4. Create an empty report in the workspace B
  5. Open an expense in report A.
  6. From the expense header, open the three-dot menu → Move to report → move it to report B in a different workspace.
  7. Open report B

Expected Result:

The system message displays moved this expense from , and the link opens report A.

Actual Result:

The system message does not appear when the expense is moved to another report

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7244718_1787874338231.Recording__2867.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7244718

Issue OwnerCurrent Issue Owner: @thesahindia

Activity

  1. applause-bot commented on Aug 28, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/ba4cd55ce3531df4893ab541afbe140e1838e7a219c53ddb1ff6e219f82006b8

  2. added
    Bug
    on Aug 28, 2026
  3. MelvinBot commented on Aug 28, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: The "moved this expense from …" system message is intentionally suppressed when the source report is still an Open / draft report. In the repro, report A is a freshly-created report with an unsubmitted expense (stateNum: 0, statusNum: 0), so the guard at Transaction.ts:1657 skips building the MOVED_TRANSACTION action entirely — no action is created, so no message renders. The "different workspace" detail is incidental: the guard checks only the source report's state, not the policy, so moving out of any draft report suppresses the message.

    This is likely working as designed. The guard implements the product decision in #70485 ("Update system messages for expenses moved to different reports", still open, due 2026-08-31) to drop the moved message for draft-report moves, and it's locked in by unit tests. Recommend confirming with BugZero / the #70485 stakeholders whether a cross-workspace move out of a draft should be an exception before treating this as a code bug.

    If the team decides it should show for cross-workspace moves: relax the guard so a MOVED_TRANSACTION action is still built when the source is Open and the target report's policy differs from the source's (oldReport.policyID !== newReport.policyID), rather than skipping on !isOpenReport(oldReport) alone.

    Investigation details

    Move flow: "Move to report" → changeTransactionsReport → getChangeTransactionsReportOnyxData. At step 7 it decides whether to add a moved/unreported action:

    let movedAction;
    if (reportID === CONST.REPORT.UNREPORTED_REPORT_ID) {
        movedAction = buildOptimisticUnreportedTransactionAction(transactionThreadReportID, oldReportID);
    } else if (!isOpenReport(oldReport)) {                        // <-- report A is Open → skipped
        movedAction = buildOptimisticMovedTransactionAction(transactionThreadReportID, oldReportID);
    }

    reportID is the target (report B, a real report → first branch skipped); oldReport is the source (report A). isOpenReport returns true when stateNum === 0 && statusNum === 0. A manually-created, never-submitted expense report defaults to OPEN/OPEN (via getExpenseReportStateAndStatus, unless the policy has instant-submit), so !isOpenReport(oldReport) is false and movedAction stays undefined — the block that writes the action to the transaction thread never runs.

    Not a rendering bug: getMovedTransactionMessage has a non-empty fallback (iou.movedTransactionFromAnotherReport), so even a blank report name would still render text. The message is absent because the action was never created — not because it rendered empty. (This rules out the recently-merged getMovedTransactionMessage refactor in #98046 as the cause.)

    Confidence: high on the mechanism (code evidence + existing unit tests confirm the draft-report skip); the open question is purely the product decision on whether cross-workspace draft moves should be an exception. Runtime verification via the web tester couldn't complete this run — the pre-started browser session didn't render — so this rests on code evidence.


    Next Steps for Contributor+ team:
    To accept the conditional fix: @MelvinBot implement [this](https://github.com/Expensify/App/issues/99733) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's analysis (e.g. confirmed working-as-designed per #70485).


    view run

  4. added
    External
    on Aug 28, 2026
  5. melvin-bot commented on Aug 28, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi (External)

  6. melvin-bot commented on Aug 28, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  7. melvin-bot commented on Aug 31, 2026

    @melvin-bot

    @mkhutornyi Whoops! This issue is 2 days overdue. Let's get this updated quick!

  8. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    @mkhutornyi Eep! 4 days overdue now. Issues have feelings too...

  9. melvin-bot commented on Sep 3, 2026

    @melvin-bot

    @mkhutornyi Huh... This is 4 days overdue. Who can take care of this?

  10. melvin-bot commented on Sep 3, 2026

    @melvin-bot

    @mkhutornyi Huh... This is 4 days overdue. Who can take care of this?

  11. melvin-bot commented on Sep 4, 2026

    @melvin-bot

    @mkhutornyi Still overdue 6 days?! Let's take care of this!

  12. melvin-bot commented on Sep 5, 2026

    @melvin-bot

    @mkhutornyi 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  13. 43 remaining items

  14. expensify-chore-bot commented on Nov 18, 2026

    @expensify-chore-bot

    @mkhutornyi 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  15. expensify-chore-bot commented on Nov 20, 2026

    @expensify-chore-bot

    @mkhutornyi 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  16. mallenexpensify commented on Nov 23, 2026

    @mallenexpensify
    Contributor

    Claude posting on behalf of Matt:

    @thesahindia you're now the C+ on this issue. The previous C+ is no longer in the Contributor program. Next step: review the proposals.

  17. thesahindia commented on Nov 24, 2026

    @thesahindia
    Member

    @MelvinBot check if this is expected

  18. melvin-bot commented on Nov 24, 2026

    @melvin-bot

    @thesahindia I sent you a Slack DM to connect GitHub. I will continue the original request once you are connected.

  19. MelvinBot commented on Nov 24, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ⚠️ partial

    Yes—this is expected when the source report is Draft/Open, including cross-workspace moves: the product decision suppresses draft-move messages, and the regression test explicitly includes moving to a new workspace. Runtime testing on dev web only completed setup, so the move itself was not independently verified.

    Step Status
    Open app and create workspaces A and BCreated both workspaces on dev web, not staging.
    ✅
    Create unsubmitted report A with an expenseCreated a $12.34 expense; report showed “waiting for submission” and a Submit button.
    ✅
    Create empty report B in workspace BCreated an empty report and received workspace-change confirmation; final workspace verification remained incomplete.
    ⚠️
    Move expense and inspect destination messagesNot run: tester reached its step limit.
    ⚠️
    Verify message absence after reloadNot run: reload was restricted by the testing session.
    ⚠️

    view run · view recording

  20. thesahindia commented on Nov 24, 2026

    @thesahindia
    Member

    This isn't an issue. Correct test steps:

    1. Create a new expense on a workspace (this creates a Draft/Open report)
    2. Before submitting the report, go to the expense and select "Move to..."
    3. Move the expense to a different report (either another existing Draft report or a new workspace)
    4. Open the expense thread/chat for the moved expense
    5. Verify that There should be NO "Expense moved from [report]" system message in the expense thread
  21. thesahindia commented on Nov 24, 2026

    @thesahindia
    Member

    This isn't an issue. Correct test steps:

    1. Create a new expense on a workspace (this creates a Draft/Open report)
    2. Before submitting the report, go to the expense and select "Move to..."
    3. Move the expense to a different report (either another existing Draft report or a new workspace)
    4. Open the expense thread/chat for the moved expense
    5. Verify that There should be NO "Expense moved from [report]" system message in the expense thread

    cc: @mallenexpensify

  22. expensify-chore-bot commented on Nov 27, 2026

    @expensify-chore-bot

    @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  23. expensify-chore-bot commented on Dec 1, 2026

    @expensify-chore-bot

    @thesahindia 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

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

Metadata

Metadata

Labels

BugDailyExternalOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions