fix: hide tracked entity recipient for event program notifications [DHIS2-21815] - #1002
Draft
karolinelien wants to merge 3 commits into
Draft
fix: hide tracked entity recipient for event program notifications [DHIS2-21815]#1002karolinelien wants to merge 3 commits into
karolinelien wants to merge 3 commits into
Conversation
…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>
✅ Deploy Preview for dhis2-maintenance-app-beta ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
In Programs → Notifications → Recipient type, the recipient
TRACKED_ENTITY_INSTANCEwas offered for event programs (WITHOUT_REGISTRATION), which have no tracked entities, so the option is meaningless there.This PR:
DATA_ELEMENTguard, 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 ini18n/en.pot, so no new translation string is introduced.Jira
https://dhis2.atlassian.net/browse/DHIS2-21815
How to test
AI Assisted