Skip to content

Report — Sorting by date is broken in expense reports with more than one expense #101424

Description

@melvin-bot

If you haven’t already, check out our contributing guidelines for onboarding!

Updated 2026-09-17: Expected Result rewritten to record the behaviour agreed in the internal Slack discussion, based on feedback from ikevin127.

Action Performed:

  1. Open an expense report that contains more than one expense, where at least one expense has a violation or hold (so it shows RBR).
  2. Click the Date column header to sort descending, then click it again to return to ascending.

Expected Result:

Three surfaces order expenses independently, and each has its own intended behaviour:

  1. Report preview carousel previews RBR expenses first. That is the intent of [$250] Expense carousel doesn't show RBR-actionable expenses first, shipped in Fix 85553 rbr carousel sorting. Unchanged.
  2. Table of expenses in a report is sorted by the column selected, which is Date by default. RBR-flagged expenses surfacing first on first open (Date ↑) is intended and stays. After that, the Date arrow toggle must give a true descending/ascending chronological sort.
  3. RHP prev/next arrows take their order from the table of expenses in the report, as they do today. Unchanged.

Grouping is on by default (Group by: Category). Once the user presses a column header, the group headers should follow that sort too, instead of staying alphabetical.

So the RBR-first ordering is not being removed — it is scoped to the initial view and no longer allowed to override an explicit column press.

Actual Result:

Expenses are not ordered by date after clicking the Date column. Two separate mechanisms cause it:

  1. The RBR hoist is keyed on Date + ASC, which cannot distinguish "the report just opened" from "the user asked for oldest first". Every second Date click lands back on Date + ASC and re-applies the hoist, so an explicit Date press never produces a chronological list. Date + DESC sorts correctly.
  2. Group headers are ordered alphabetically by category name regardless of the active sort, so date order only survives inside each category block.

Platform: Reported on web. The sortable column header only renders on wide layout, so narrow/mobile layouts keep the initial order and are not affected by the column-press half of this.

Notes: Reported by @JmillsExpensify, who sees this on every multi-expense report he opens. The RBR-first ordering was introduced deliberately (see the two links above), not by accident — it was confirmed on Slack that it stays for the carousel and for the report's first open.

Reported in Slack.

Activity

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions