Skip to content

[Due for payment 2026-06-25] [$250] Spend - Expense-level export fails with “You can't export empty report” #91930

Closed

Description

@applause-bot

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.3.84-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #84382
Email or phone of affected tester (no customers): dreamnitethedragon+vegst@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redmi note 10s android 13
App Component: Money Requests

Action Performed:

  1. Launch app
  2. Go to self DM
  3. Create a manual expense
  4. Open the expense and split the expense by date ( selecting few dates)
  5. Go to spend
  6. Select all the expense - Export - All data Expense level

Expected Result:

When selecting all data expense level download failed must not be shown.

Actual Result:

When selecting all data expense level- download failed - you can't export empty report is shown.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7165096_1779955900649.Screenrecorder-2026-05-28-13-39-38-511.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7165096

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit

Activity

  1. applause-bot commented on May 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/426d15deca739ad5939f7bf0457b7772a4294d119b6bf6a682c32c9662e417c4

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 28, 2026
  3. melvin-bot commented on May 28, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #84382

  4. melvin-bot commented on May 28, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on May 28, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. changed the title [-]Spend-Expense-level export fails with “You can't export empty report”[/-] [+]Spend - Expense-level export fails with “You can't export empty report”[/+] on May 28, 2026
  7. MelvinBot commented on May 28, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    When a self-DM expense is split by date (feature added in #84382), child transactions are assigned reportID: '0' (UNREPORTED_REPORT_ID) at MoneyRequestBuilder.ts:1388 and SplitTransactionUpdate.ts:639-644.

    When the user selects these transactions on the Spend page and exports, selectedTransactionReportIDs collects '0' as a report ID (no filter excludes it). The client-side empty-report guard at line 459-473 only checks selectedReports, which is always empty on the expense-level view. So '0' is sent to the backend as a report ID, the backend can't find a real report, and returns the "empty report" error.

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

    Filter out UNREPORTED_REPORT_ID ('0') from selectedTransactionReportIDs in useSearchBulkActions.ts:349. Change the filter from:

    .filter((reportID) => reportID !== undefined)
    

    to also exclude CONST.REPORT.UNREPORTED_REPORT_ID:

    .filter((reportID) => reportID !== undefined && reportID !== CONST.REPORT.UNREPORTED_REPORT_ID)
    

    This prevents the invalid report ID from reaching both beginExportWithTemplate and handleBasicExport, which both use selectedTransactionReportIDs as the reportIDList. The transaction IDs are still sent separately, so the backend can still export the actual transaction data.

    What alternative solutions did you explore? (Optional)

    An alternative would be to add guards inside beginExportWithTemplate and handleBasicExport individually, but filtering at the source (selectedTransactionReportIDs) is cleaner since it fixes all downstream consumers at once.

    Another option would be to assign child split transactions a real self-DM report ID instead of '0', but UNREPORTED_REPORT_ID is an intentional design choice for self-DM splits that other flows depend on, so changing it would have broader implications.


    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.

  8. emkhalid commented on May 28, 2026

    @emkhalid
  9. ZhenjaHorbach commented on May 28, 2026

    @ZhenjaHorbach
    Contributor

    @emkhalid
    It's not open for proposals

  10. 81 remaining items

  11. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jun 24, 2026
  12. melvin-bot commented on Jun 24, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  13. melvin-bot commented on Jun 24, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2060342029287398175/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  14. mallenexpensify commented on Jun 27, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @KJ21-ENG paid $250 via Upwork
    Contributor+: @gijoe0295 due $250 via NewDot

    @KJ21-ENG can you please accept the job below? Please reply here and tag me once you have.
    https://www.upwork.com/jobs/~022060342029287398175

    ^ Test case created. Thx

  15. KJ21-ENG commented on Jun 27, 2026

    @KJ21-ENG
    Contributor

    @mallenexpensify Accepted. Thanks!

  16. mallenexpensify commented on Jun 27, 2026

    @mallenexpensify
    Contributor

    @KJ21-ENG paid, summary updated above. Thx.

  17. JmillsExpensify commented on Jun 29, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @gijoe0295

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