Skip to content

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

Closed
karolinelien wants to merge 1 commit into
dhis2:masterfrom
karolinelien:fix/DHIS2-21815-hide-tracked-entity-recipient
Closed

fix: hide tracked entity recipient for event program notifications [DHIS2-21815]#999
karolinelien wants to merge 1 commit into
dhis2:masterfrom
karolinelien: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 15, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 5bd2392
🔍 Latest deploy log https://app.netlify.com/projects/dhis2-maintenance-app-beta/deploys/6a57619d0800ac0008f220ad
😎 Deploy Preview https://deploy-preview-999.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.

@sonarqubecloud

Copy link
Copy Markdown

@karolinelien
karolinelien marked this pull request as ready for review July 15, 2026 10:33
@karolinelien

Copy link
Copy Markdown
Author

Superseded by #1002 — same change, but the branch now lives in the dhis2 repo so CI (contracts check) has access to secrets. Closing this cross-fork PR.

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