Skip to content

feat: [DHIS2-19940] Implement "No value" filtering for all filter types in working list#4468

Open
henrikmv wants to merge 248 commits intoDHIS2-21135from
hv/feat/DHIS2-19940_EmptyValueFiltersForAllValueTypes
Open

feat: [DHIS2-19940] Implement "No value" filtering for all filter types in working list#4468
henrikmv wants to merge 248 commits intoDHIS2-21135from
hv/feat/DHIS2-19940_EmptyValueFiltersForAllValueTypes

Conversation

@henrikmv
Copy link
Copy Markdown
Contributor

@henrikmv henrikmv commented Feb 27, 2026

DHIS2-19940

Pattern for Adding isEmpty Filtering

1. Types

  • Union the filter data type with EmptyValueFilterData
  • Add string to the Value type (used to carry the isEmpty value)

2. Component

  • Wrap the filter UI with WithEmptyValueFilter
  • This renders the checkboxes and passes undefined to children when isEmpty is active

3. Data Getter

  • Check isEmptyValueFilter(value) before normal conversion
  • If true, return getEmptyValueFilterData(value)

4. Manager

  • When restoring from a saved filter, check isEmptyFilterData(filter)
  • If true, return getEmptyValueFilterValue(filter)

5. Disable Flag

  • Set disableEmptyValueFilter to true for:
    • Main properties
    • transformRecordsFilter columns

devin-ai-integration Bot and others added 30 commits February 10, 2026 10:43
…st filter

Co-Authored-By: henrik.vadet@dhis2.org <henrik@devOtta.no>
Call getSearchOperator() in _setBaseProperties() so that program
attributes used by working lists carry the correct searchOperator.
This fixes both issues:
- preferredSearchOperator was always undefined in working lists
- unique TEAs were not using EQ operator (getSearchOperator handles this)

Co-Authored-By: henrik.vadet@dhis2.org <henrik@devOtta.no>
Co-Authored-By: henrik.vadet@dhis2.org <henrik@devOtta.no>
@henrikmv henrikmv added testing and removed testing labels Apr 12, 2026
@henrikmv henrikmv added testing and removed testing labels Apr 12, 2026
@henrikmv henrikmv added testing and removed testing labels Apr 12, 2026
@henrikmv henrikmv added testing and removed testing labels Apr 12, 2026
@henrikmv henrikmv marked this pull request as ready for review April 12, 2026 18:35
Comment thread src/core_modules/capture-core/components/FiltersForTypes/types/index.ts Outdated
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! 👏

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants