Skip to content

feat: add drill-down filters for data table date and org unit columns [PR6] - #3736

Open
BRaimbault wants to merge 17 commits into
feat/datatable-pr5-more-layer-typesfrom
feat/datatable-pr6-new-filters
Open

feat: add drill-down filters for data table date and org unit columns [PR6]#3736
BRaimbault wants to merge 17 commits into
feat/datatable-pr5-more-layer-typesfrom
feat/datatable-pr6-new-filters

Conversation

@BRaimbault

@BRaimbault BRaimbault commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Part of DHIS2-21456

Diff size note: this PR adds ~4,100 lines: ~1,800 are runtime code / ~2,300 (56%) are tests.

Description

Replaces the flat value-list filter with a hierarchical drill-down popover for date/time and org unit data table columns:

  • Date/time columns: filter by year → quarter/month → day → hour in an expandable tree, or type free text to match rows directly, same as before. "Any value"/"No value" pinned options carry over.
  • Org unit columns: same drill-down experience, but through the org unit hierarchy (country → region → district → facility). Ancestor names for the tree are resolved via a new useOrgUnitAncestorNames hook.
  • Both filters share a common useGroupFilterInput hook and GroupFilterPopover presentational component (extracted mid-PR from two near-duplicate implementations), plus a generic prefixTree.js utility for building/flattening/search-matching the tree.
  • Org-unit-rendered columns that stay on the plain (non-tree) filter dropdown now resolve to their breadcrumb/own-name label instead of the raw id/path, and free-text search against them is name-aware.
  • Sorting an org-unit-rendered column now sorts by the displayed name/breadcrumb rather than the raw path/id.

Also included, found while reworking org unit columns:

  • Org unit id/name/level/path columns unified into a consistent shape across layer types (previously per-layer-type field names like parentName/ouname).
  • Boolean-valued fields now render as Yes/No instead of raw true/false.
  • Tracked entity layers: option-set-coded attribute values now resolve to their display name (previously showed the raw code); createdAt/updatedAt exposed as columns.

Quality checklist

Add N/A to items that are not applicable.


Screenshots

supporting images

@BRaimbault BRaimbault changed the title Feat/datatable pr6 new filters feat: new filters [PR6] Jul 24, 2026
@dhis2-bot

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://pr-3736.maps.netlify.dhis2.org

@dhis2-bot
dhis2-bot temporarily deployed to netlify July 24, 2026 18:37 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 25, 2026 12:58 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 25, 2026 13:16 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 25, 2026 13:32 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 25, 2026 14:51 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 25, 2026 19:32 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 27, 2026 08:52 Inactive
@BRaimbault
BRaimbault force-pushed the feat/datatable-pr6-new-filters branch from 5ad158e to ea5c6d8 Compare July 27, 2026 15:00
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 27, 2026 15:01 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 27, 2026 16:08 Inactive
@BRaimbault BRaimbault changed the title feat: new filters [PR6] feat: hierarchical drill-down filters for date/time and org unit columns [PR6] Jul 27, 2026
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 27, 2026 18:22 Inactive
@dhis2-bot
dhis2-bot temporarily deployed to netlify July 27, 2026 19:03 Inactive
@sonarqubecloud

Copy link
Copy Markdown

@dhis2-bot
dhis2-bot temporarily deployed to netlify July 27, 2026 19:37 Inactive
@BRaimbault BRaimbault changed the title feat: hierarchical drill-down filters for date/time and org unit columns [PR6] feat: add drill-down filters for data table date and org unit columns [PR6] Jul 28, 2026
@BRaimbault
BRaimbault marked this pull request as ready for review August 4, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants