Skip to content

Spend - Current view export ignores selected date groups #104843

Open

Description

@rlinoz

Problem

When expenses are grouped by day, week, month, quarter, or year, exporting a selected group with Current view can export all groups matching the search instead of only the selected group.

This is an existing selection-scoping issue in the shared export path, not a regression introduced by the groups-only export option. The new Current view (groups only) option uses the same path and is affected too.

Steps to reproduce

  1. Have expenses in at least two different months, such as September and October.
  2. Open Spend → Expenses.
  3. Choose Display → Group by → Month, or search for type:expense group-by:month.
  4. Ensure both months appear in the results; do not filter the search to only one month.
  5. Tick the checkbox on the September group row. Leave October unchecked. Select the group itself, not an individual expense, and do not use Select all matching results.
  6. Choose Export → Current view.
  7. Open the CSV.

Expected result

Only the selected September group summary and its matching expense details are exported.

Actual result identified in code

The selected date group does not add a date restriction to the export query, and its transaction IDs are removed. The request therefore uses the original grouped search without the selection restriction, allowing unselected months to be exported.

Verification status: Identified by code inspection; not yet reproduced in a running app. Staging/production reproduction and affected versions remain to be confirmed.

Technical context

Acceptance criteria

  • Current view exports only selected date groups for day, week, month, quarter, and year grouping.
  • Selecting multiple nonadjacent periods preserves the gaps: September and November must not export October.
  • Existing search filters remain in effect, including a date filter narrower than a selected period.
  • Current view (groups only), when available, respects the same selection while omitting expense details.
  • Failure to resolve a selected group must not silently broaden the export to the entire search.
  • Add regression coverage for a single selected period, multiple nonadjacent periods, and an existing narrower date filter.

Implementation considerations

Multiple selected date ranges require OR between ranges and AND within each range, intersected with the original filters. Simply appending date comparisons to the current search string combines them with AND; merging nonadjacent periods into one range would incorrectly include unselected periods. Preserve the intended grouping in the structured export filter tree rather than losing it through a flat search-string round trip.

Issue OwnerCurrent Issue Owner: @eszlamczyk

Activity

  1. self-assigned this
    on Oct 23, 2026
  2. eszlamczyk commented on Oct 27, 2026

    @eszlamczyk

    Hi I am from Software Mansion Expert Agency and would like to work on this issue 👋

  3. added and removed on Oct 27, 2026
  4. rlinoz commented on Oct 27, 2026

    @rlinoz
    ContributorAuthor

    Thank you!

  5. rlinoz commented on Nov 3, 2026

    @rlinoz
    ContributorAuthor

    This might need a backend PR, let me know if you need anything!

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions