Skip to content

fix: [DHIS2-18620][DHIS2-21937] Hidden TEA is displayed in the TEI profile - #4704

Open
henrikmv wants to merge 29 commits into
masterfrom
hv/fix/DHIS2-18620_hidden-TEA-displayed-in-TEI-profile
Open

fix: [DHIS2-18620][DHIS2-21937] Hidden TEA is displayed in the TEI profile#4704
henrikmv wants to merge 29 commits into
masterfrom
hv/fix/DHIS2-18620_hidden-TEA-displayed-in-TEI-profile

Conversation

@henrikmv

@henrikmv henrikmv commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

DHIS2-18620 and DHIS2-21937

This PR fixes three bugs:

  • DHIS2-18620: HIDE_FIELD program rules had no effect on the TEI profile widget because ruleEffects were never wired through to WidgetProfile.
  • DHIS2-21937: The profile edit modal hung when no org unit was selected in the URL.

Architectural change: Instead of passing ruleEffects as props through the component tree, enrollment-scoped rule effects are now evaluated once via a new useEnrollmentScopeRuleEffects hook and dispatched to Redux. All consumers (WidgetProfile, EnrollmentQuickActions, Stage, ProgramStageSelector, useFilteredWidgetData) read from the store.

Key additions:

  • programOwners[program,orgUnit] is fetched with the TEI query → programOwnerId replaces URL orgUnitId for rule evaluation and profile saves (preventing accidental TEI relocation when saving Profile).
  • WidgetProfile filters displayInList attributes against rulesEffectsHiddenFields.
  • WidgetProfile's public prop renamed orgUnitIdprogramOwnerId.

@github-actions

Copy link
Copy Markdown

devin-ai-integration[bot]

This comment was marked as resolved.

@henrikmv
henrikmv marked this pull request as ready for review August 18, 2026 13:26
@henrikmv
henrikmv requested a review from a team as a code owner August 18, 2026 13:26
@henrikmv henrikmv added testing and removed testing labels Aug 18, 2026
@henrikmv henrikmv added testing and removed testing labels Aug 18, 2026
…t-infinite-loading-without-org-unit' into hv/fix/DHIS2-18620_hidden-TEA-displayed-in-TEI-profile
…le-widget-infinite-loading-without-org-unit' into hv/fix/DHIS2-18620_hidden-TEA-displayed-in-TEI-profile"

This reverts commit 2054d1b, reversing
changes made to 45c023f.
@henrikmv henrikmv added testing and removed testing labels Aug 18, 2026
@henrikmv
henrikmv marked this pull request as draft August 18, 2026 14:29
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@henrikmv henrikmv added testing and removed testing labels Aug 19, 2026
@henrikmv henrikmv removed the testing label Aug 19, 2026
@henrikmv henrikmv added testing and removed testing labels Aug 20, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@henrikmv henrikmv changed the title fix: [DHIS2-18620] Hidden TEA is displayed in the TEI profile fix: [DHIS2-18620][DHIS2-21937] Hidden TEA is displayed in the TEI profile Aug 21, 2026
@henrikmv
henrikmv marked this pull request as ready for review August 21, 2026 09:35
@henrikmv henrikmv added testing and removed testing labels Aug 21, 2026
@henrikmv
henrikmv marked this pull request as draft August 26, 2026 08:05

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Open in Devin Review

@henrikmv henrikmv added testing and removed testing labels Aug 26, 2026
@henrikmv
henrikmv marked this pull request as ready for review August 26, 2026 19:43
@henrikmv henrikmv added testing and removed testing labels Aug 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

@henrikmv henrikmv added testing and removed testing labels Aug 27, 2026
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