> For the complete documentation index, see [llms.txt](https://help.tahua.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tahua.io/product-news/2026/july/milestone-batches-due-date-filter.md).

# Add a due date filter and sortable Due Date column to Milestone Batches

## Problem

The Milestone Batches admin listing only supported filtering by keyword and sent/not-sent status. Admins had no way to narrow the list down by when a batch's milestones were due, making it hard to find batches that needed attention in a particular time window. There was also no way to sort the list by title, amount, or due date. Separately, the keyword search did not match a batch's own title, only the titles of milestones inside it.

## How It Works

The filter bar now includes an "Advanced Filters" toggle, matching the pattern used elsewhere in the app (e.g. Funding Applications). Clicking it reveals a "From" and "To" date range, labelled to explain what it filters. Entering either or both narrows the list to batches containing at least one milestone due within that range. If a date filter is already applied (e.g. from a saved/shared link), the row shows expanded by default.

The Title, Amount, and Due Date columns are now sortable by clicking their header. Since a batch's milestones can each have a different due date or amount, sorting by Due Date or Amount orders batches by their earliest milestone due date or total milestone amount, rather than implying the batch itself has a single value — the batch row itself doesn't display a due date, since that wouldn't represent the batch accurately. Expanding a batch (via its accordion row) shows the actual due date for each of its milestones individually, and that milestone list respects the same sort and direction currently applied to the batch table, so the order stays consistent whether the batch is collapsed or expanded.

The keyword search now also matches a batch's own title directly, in addition to the existing milestone/application/registration entity matching.

## UI Changes

* **Advanced Filters toggle**: reveals a "From" and "To" due date range filter, with a label explaining what it filters. Expanded by default when a date filter is already active.
* **Sortable Title, Amount, and Due Date columns**: clicking a column header sorts the batch list; Due Date and Amount sort by the batch's earliest milestone due date / total milestone amount.
* **Due Date shown per milestone**: expanding a batch's accordion shows each milestone's own due date, ordered to match the batch table's current sort/direction.
