Skip to content

Conversation

@henrikmv
Copy link
Contributor

@henrikmv henrikmv commented Sep 26, 2025

DHIS2-20001

This pull request ensures that users are informed when some attributes are hidden from search due to unsupported types.

User notifications and UI improvements:

  • Added a new UnsupportedAttributesNotification component that displays a warning message and lists unsupported attributes hidden from search forms.

Search attribute handling and data flow:

  • Refactored the SearchGroupFactory to separate supported and unsupported search attributes based on a new constant (UNSUPPORTED_SEARCH_ATTRIBUTE_TYPES). Unsupported attributes are now stored in the SearchGroup object and excluded from the rendered search form.

Support for new unsupported types:

  • Added several new data element types to the unsupported types list, such as TRACKER_ASSOCIATE, UNIT_INTERVAL, REFERENCE, LETTER, and GEOJSON.

These changes improve user awareness of search limitations and remove unsupported attribute types from the search forms. The reason for displaying the message in UnsupportedAttributesNotification as a warning is that having searchable set on these attributes can be considered a configuration error. Therefore, it is shown as a warning rather than as informational.

Cypress test will be added in DHIS2-20316.

@henrikmv henrikmv marked this pull request as ready for review October 1, 2025 14:27
@henrikmv henrikmv requested a review from a team as a code owner October 1, 2025 14:27
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

@henrikmv henrikmv added testing and removed testing labels Oct 1, 2025
Copy link
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.

The implementation good to me 🎉 ! Could it be possible to add one Cypress test for it? Thanks!

Copy link
Member

@JoakimSM JoakimSM left a comment

Choose a reason for hiding this comment

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

Looks good @henrikmv

@henrikmv henrikmv added testing and removed testing labels Oct 24, 2025
@sonarqubecloud
Copy link

@henrikmv henrikmv merged commit 4bfe20d into master Oct 24, 2025
45 checks passed
@henrikmv henrikmv deleted the hv/feat/DHIS2-20001_HideUnsupportedAttributes branch October 24, 2025 10:27
dhis2-bot added a commit that referenced this pull request Oct 24, 2025
# [104.6.0](v104.5.0...v104.6.0) (2025-10-24)

### Features

* [DHIS2-20001] Hide unsupported attribute types from search form in Capture ([#4383](#4383)) ([4bfe20d](4bfe20d))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 104.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

5 participants