Skip to content

fix: hide tracked entity recipient for event program notifications [DHIS2-21815] - #1002

Draft
karolinelien wants to merge 3 commits into
masterfrom
fix/DHIS2-21815-hide-tracked-entity-recipient
Draft

fix: hide tracked entity recipient for event program notifications [DHIS2-21815]#1002
karolinelien wants to merge 3 commits into
masterfrom
fix/DHIS2-21815-hide-tracked-entity-recipient

Conversation

@karolinelien

Copy link
Copy Markdown

Description

In Programs → Notifications → Recipient type, the recipient TRACKED_ENTITY_INSTANCE was offered for event programs (WITHOUT_REGISTRATION), which have no tracked entities, so the option is meaningless there.

This PR:

  • Hides the tracked entity recipient option for event programs (it remains available for tracker programs).
  • Relabels the option from "Tracked entity instance" to "Tracked entity" for tracker program notifications (modern terminology).
  • Clears a stale stored value on load, mirroring the existing DATA_ELEMENT guard, so an event-program template that previously stored a TEI recipient no longer shows a blank/invalid select.

All changes are confined to src/pages/programs/form/programNotification/RecipientSection.tsx. No schema, query, or type changes. "Tracked entity" already exists in i18n/en.pot, so no new translation string is introduced.

Jira

https://dhis2.atlassian.net/browse/DHIS2-21815

How to test

  1. Event program → Notifications → new/edit → Recipient type: "Tracked entity" is absent; other options present.
  2. Tracker program → Notifications → Recipient type: option present, labelled "Tracked entity"; selecting it still shows the delivery-channel field.

AI Assisted

…HIS2-21815]

Tracked entity instance is not a valid notification recipient for event
programs (WITHOUT_REGISTRATION), so it is now hidden there. For tracker
programs the option is relabelled from "Tracked entity instance" to
"Tracked entity", and a stale stored value is cleared on load.

AI Assisted

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for dhis2-maintenance-app-beta ready!

Name Link
🔨 Latest commit b7ad740
🔍 Latest deploy log https://app.netlify.com/projects/dhis2-maintenance-app-beta/deploys/6a675953a31bf20008c22c9f
😎 Deploy Preview https://deploy-preview-1002.maintenance-app-beta.netlify.dhis2.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

karolinelien and others added 2 commits July 27, 2026 15:12
…cations [DHIS2-21815]

Program attribute and tracked entity recipients are hidden for event
programs, but only a stored tracked-entity value was cleared on load. A
stored program-attribute value now gets cleared too, and the currently
selected value is kept as an option for the render before the effect
runs so @dhis2/ui does not throw on an orphan select value.

AI Assisted

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Covers option visibility per program type and clearing of stale
tracked-entity / program-attribute recipients on load.

AI Assisted

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant