Skip to content

[Due for payment 2026-01-23] Expense - No message that expense is on hold when split expense offline #74682

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.2.47-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: Exploratory
Email or phone of affected tester (no customers): gocemate+b2155031@gmail.com
Issue reported by: Applause Internal Team
Device used: Lenovo 80ES / Windows 10 Pro
App Component: Chat Report View

Action Performed:

  1. Create expense in workspace chat
  2. Open expense thread
  3. Go offline
  4. Hold the expense
  5. Split the expense
  6. Take a look at expenses

Expected Result:

There should be a system message that expenses are put on hold

Actual Result:

There is no system message that expenses are put on hold on report page

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021990613260098691397
  • Upwork Job ID: 1990613260098691397
  • Last Price Increase: 2025-11-18
Issue OwnerCurrent Issue Owner: @strepanier03

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 10, 2025
  2. melvin-bot commented on Nov 10, 2025

    @melvin-bot

    Triggered auto assignment to @strepanier03 (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.

  3. paulnjs commented on Nov 10, 2025

    @paulnjs
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    There is no system message that expenses are put on hold on report page

    What is the root cause of that problem?

    When holding the expense, we'll add the system message to the transaction thread report, and transaction thread actions are merged with iou report when it's a one transaction thread, so we can see it before splitting.

    After splitting, it's not one transaction thread anymore, so we don't see it

    What changes do you think we should make in order to solve the problem?

    After splitting, we should move the actions from transaction report to iou report in here

    Here's the sample code, it can be refactored during PR phase

    if (firstIOU?.childReportID && iouReport?.reportID) {
                    const transactionThreadReport = allReportsList?.[`${ONYXKEYS.COLLECTION.REPORT}${firstIOU.childReportID}`];
                    const isOneThreadTransaction = isOneTransactionThread(transactionThreadReport ?? undefined, iouReport ?? undefined, firstIOU ?? undefined);
    
                    if (isOneThreadTransaction) {
                        const threadReportActions = getAllReportActions(firstIOU.childReportID);
                        const iouReportActionsToMove: Record<string, ReportAction> = {};
    
                        // Get all reportActions from thread report except the created action
                        Object.values(threadReportActions).forEach((action) => {
                            if (action && !isCreatedAction(action)) {
                                iouReportActionsToMove[action.reportActionID] = action;
                            }
                        });
    
                        // Move reportActions from thread report to iou report
                        if (Object.keys(iouReportActionsToMove).length > 0) {
                            optimisticData.push({
                                onyxMethod: Onyx.METHOD.MERGE,
                                key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport.reportID}`,
                                value: iouReportActionsToMove,
                            });
    
                            // Remove reportActions from thread report (except created action)
                            const threadReportActionsToRemove: Record<string, null> = {};
                            Object.keys(iouReportActionsToMove).forEach((reportActionID) => {
                                threadReportActionsToRemove[reportActionID] = null;
                            });
    
                            optimisticData.push({
                                onyxMethod: Onyx.METHOD.MERGE,
                                key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${firstIOU.childReportID}`,
                                value: threadReportActionsToRemove,
                            });
    
                            // Add failure data to revert the changes
                            failureData.push({
                                onyxMethod: Onyx.METHOD.MERGE,
                                key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport.reportID}`,
                                value: Object.keys(iouReportActionsToMove).reduce((acc, reportActionID) => {
                                    acc[reportActionID] = null;
                                    return acc;
                                }, {} as Record<string, null>),
                            });
    
                            failureData.push({
                                onyxMethod: Onyx.METHOD.MERGE,
                                key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${firstIOU.childReportID}`,
                                value: iouReportActionsToMove,
                            });
                        }
                    }
    

    What alternative solutions did you explore? (Optional)

    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.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 18, 2025
  5. changed the title [-]Expense - No message that expense is on hold when split expense offline[/-] [+][$250] Expense - No message that expense is on hold when split expense offline[/+] on Nov 18, 2025
  6. melvin-bot commented on Nov 18, 2025

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 18, 2025
  8. melvin-bot commented on Nov 18, 2025

    @melvin-bot

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

  9. eh2077 commented on Nov 18, 2025

    @eh2077
    Contributor

    I'll review this tmr

  10. 58 remaining items

  11. eh2077 commented on Feb 2, 2026

    @eh2077
    Contributor

    BugZero Checklist:

    • [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: NA. I can't link this issue a PR, it's a missing edge case.

    • [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: NA

    • [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.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    NA

    Test:

    1. Open the app
    2. Create expense in workspace chat
    3. Open expense thread
    4. Go offline
    5. Hold the expense
    6. Split the expense
    7. Verify there is a system message that expenses are put on hold in each expense thread

    Do we agree 👍 or 👎

  12. eh2077 commented on Feb 2, 2026

    @eh2077
    Contributor

    @bfitzexpensify this is ready for payment, thanks 🙇

    note: this first PR was reverted because of BE was not ready, the v2 PR just reapply reverted PR again, so there's no regression happened.

  13. bfitzexpensify commented on Feb 2, 2026

    @bfitzexpensify
    Contributor

    Payment summary

  14. bfitzexpensify commented on Feb 2, 2026

    @bfitzexpensify
    Contributor

    I'm heading OOO until Feb 17th - @strepanier03, as the other assignee here, mind creating the Upwork job and completing payment for @paulnjs

  15. changed the title [-][Due for payment 2026-01-23] [Due for payment 2026-01-20] [Due for payment 2026-01-16] [Due for payment 2026-01-15] [$250] Expense - No message that expense is on hold when split expense offline[/-] [+][Due for payment 2026-01-23] Expense - No message that expense is on hold when split expense offline[/+] on Feb 3, 2026
  16. strepanier03 commented on Feb 6, 2026

    @strepanier03
    Contributor

    paid and closed the contract for @paulnjs and the payment summary is above for the newdot request for @eh2077.

  17. moved this from MEDIUM or LOW to Done in [#whatsnext] #migrateon Feb 6, 2026
  18. JmillsExpensify commented on Feb 21, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @eh2077

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions