Skip to content

[Due for payment 2026-10-08] Bulk delete from Search silently skips legacy expenses that have no IOU report action #102269

Closed

Description

@melvin-bot

Problem

Some users select expenses on the Search page and confirm Delete. The selection clears, but every expense stays, and the App sends no request to the server.

This happens with legacy expenses that have no IOU (money request) report action. The missing action is only created when the user opens the expense. The openReport legacy fallback does this (see Track legacy transactions missing IOU report actions). Once the user opens an expense, deleting it works. One affected user had to open about 75 expenses one by one to delete them.

Root cause

useDeleteTransactions looks up each selected expense's IOU action. In the loop over nonSplitTransactions, it skips any expense without one (if (!action) { continue; }) and logs nothing.

The backend doesn't need the IOU action. DeleteMoneyRequest already handles expenses without one.

Proposed solution

  1. Stop skipping expenses with no IOU action. Send their transaction IDs to DeleteMoneyRequest, and build the optimistic data without the parts that depend on the action.
  2. Log when an expense is skipped or treated as having no action.
  3. If nothing is deleted, keep the selection and show an error instead of clearing it.
  4. Add a test for bulk-deleting an expense with no IOU action.

Expected result

Bulk delete from Search removes every selected expense, including legacy ones the user never opened.

Reported in Slack.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. VickyStash commented on Sep 25, 2026

    @VickyStash
    Contributor

    Opened PR for review: #102281

  2. added and removed
    ReviewingHas a PR in review
    on Oct 1, 2026
  3. changed the title [-]Bulk delete from Search silently skips legacy expenses that have no IOU report action[/-] [+][Due for payment 2026-10-08] Bulk delete from Search silently skips legacy expenses that have no IOU report action[/+] on Oct 1, 2026
  4. melvin-bot commented on Oct 1, 2026

    @melvin-bot
    Author

    @thelullabyy

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.0-5 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-10-08. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  5. thelullabyy commented on Oct 5, 2026

    @thelullabyy
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: NA (Improvement)
      Link to the comment on the Issue:

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

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

    Regression Test Proposal

    Precondition:

    • find an expense without an IOU action. If you have problems with that, you can try to remove the report action locally from Onyx.

    Test:

    1. Go to Search > Expenses.
    2. Select the expense without an IOU action.
    3. Open the bulk actions menu and choose Delete, then confirm.
    4. Verify the expense is deleted.
    5. In the network tab, verify that the DeleteMoneyRequest request was successful.

    Do we agree 👍 or 👎

  6. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    on Oct 7, 2026
  7. melvin-bot commented on Oct 7, 2026

    @melvin-bot
    Author

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  8. melvin-bot commented on Oct 7, 2026

    @melvin-bot
    Author

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  9. mallenexpensify commented on Oct 13, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @thelullabyy due $175 via NewDot

  10. laurenreidexpensify commented on Oct 27, 2026

    @laurenreidexpensify
    Contributor

    $175 Approved @thelullabyy New Expensify

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 productionTaskWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions