Skip to content

[$250] Workspace chat - Unable to split a reverted split transaction after deleting the unreported split transaction #91105

Closed

Description

@izarutskaya

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: 9.3.77-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dmkt9
Slack conversation (hyperlinked to channel name): #expensify_open_source

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Navigate to a workspace chat.
  3. Submit an expense.
  4. Split the expense into two split transactions.
  5. Unreport one of them.
  6. Go to your self-DM and delete the unreported split transaction.
  7. Open the remaining transaction in the workspace chat.
  8. Note that you are unable to split it again.

Expected Result:

The reverted split transaction can be split normally.

Actual Result:

The reverted split transaction cannot be split.

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

2026-05-19.10-53-22.mp4
Recording.3768.mp4
Image

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @dmkt9
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022056783076149400578
  • Upwork Job ID: 2056783076149400578
  • Last Price Increase: 2026-05-26

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 19, 2026
  2. MelvinBot commented on May 19, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    When a split transaction child is unreported (its reportID becomes '0') and then deleted from self-DM, the delete goes through deleteTrackExpense, which has zero split awareness. It simply removes the transaction without ever calling the RevertSplitTransaction API.

    This leaves the system in an inconsistent state:

    1. The original parent transaction remains stranded with reportID: '-2' (SPLIT_REPORT_ID) — effectively hidden.
    2. The remaining child still has comment.originalTransactionID and comment.source = 'split' set.
    3. When checking if the remaining child can be split, isExpenseSplit returns true because those comment fields persist.
    4. Both useSelectedTransactionsActions and useSearchBulkActions explicitly block splitting when isExpenseSplit is true.

    The split-aware delete path exists in useDeleteTransactions, which correctly groups split children and calls updateSplitTransactions (triggering revert when only 1 child remains). But the self-DM delete of an unreported child bypasses this entirely.

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

    The self-DM delete path (deleteTrackExpense) should detect when the transaction being deleted is a split child (by checking comment.originalTransactionID and comment.source === 'split') and, when it is, route the deletion through the split-aware logic in updateSplitTransactions / useDeleteTransactions so that RevertSplitTransaction is properly invoked. This would restore the original parent transaction (moving it from reportID: '-2' back to its original report) and clear split metadata on the remaining child.

    What alternative solutions did you explore?

    An alternative would be to modify isExpenseSplit to return false when the parent transaction no longer has any comment.splits (i.e., after the child is deleted). However, this would only mask the UI symptom without fixing the underlying data inconsistency — the parent transaction would remain stranded at reportID: '-2' forever. The proper fix is to ensure the revert path is always triggered.

    Related issues

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 19, 2026
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 19, 2026
  5. melvin-bot commented on May 19, 2026

    @melvin-bot

    Current assignee @dmkt9 is eligible for the External assigner, not assigning anyone new.

  6. changed the title [-]Workspace chat - Unable to split a reverted split transaction after deleting the unreported split transaction[/-] [+][$250] Workspace chat - Unable to split a reverted split transaction after deleting the unreported split transaction[/+] on May 19, 2026
  7. 19 remaining items

  8. changed the title [-][$250] Workspace chat - Unable to split a reverted split transaction after deleting the unreported split transaction[/-] [+][Due for payment 2026-06-01] [$250] Workspace chat - Unable to split a reverted split transaction after deleting the unreported split transaction[/+] on May 25, 2026
  9. melvin-bot commented on May 25, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  10. melvin-bot commented on May 25, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.81-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-06-01. 🎊

    For reference, here are some details about the assignees on this issue:

    • @dmkt9 requires payment (Needs manual offer from BZ)
  11. melvin-bot commented on May 25, 2026

    @melvin-bot

    @dmkt9 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  12. github-actions commented on May 25, 2026

    @github-actions
    Contributor

    ⚠️ @KJ21-ENG Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  13. melvin-bot commented on May 26, 2026

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  14. melvin-bot commented on May 27, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  15. removed
    ExternalAdded to denote the issue can be worked on by a contributor
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 28, 2026
  16. lakchote commented on May 28, 2026

    @lakchote
    Contributor

    Closing this one. Will be handled once the unreported expenses feature (frontend) is live and stable.

  17. changed the title [-][Due for payment 2026-06-01] [$250] Workspace chat - Unable to split a reverted split transaction after deleting the unreported split transaction[/-] [+][$250] Workspace chat - Unable to split a reverted split transaction after deleting the unreported split transaction[/+] on May 28, 2026
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.DailyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions