Skip to content

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

Open

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: @mkhutornyi

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
    BugSomething is broken. Auto assigns a BugZero manager.
    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
    ExternalAdded to denote the issue can be worked on by a contributor
    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. 31 remaining items

  13. melvin-bot commented on Oct 29, 2026

    @melvin-bot

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

  14. melvin-bot commented on Nov 2, 2026

    @melvin-bot

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

  15. melvin-bot commented on Nov 3, 2026

    @melvin-bot

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

  16. melvin-bot commented on Nov 3, 2026

    @melvin-bot

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

  17. melvin-bot commented on Nov 5, 2026

    @melvin-bot

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

  18. melvin-bot commented on Nov 5, 2026

    @melvin-bot

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

  19. melvin-bot commented on Nov 5, 2026

    @melvin-bot

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

  20. melvin-bot commented on Nov 6, 2026

    @melvin-bot

    @mkhutornyi 10 days overdue. Is anyone even seeing these? Hello?

  21. jeffrey-graham commented on Nov 7, 2026

    @jeffrey-graham
  22. melvin-bot commented on Nov 7, 2026

    @melvin-bot
  23. mkhutornyi commented on Nov 11, 2026

    @mkhutornyi
    Contributor

    Same

  24. 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!

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

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions