chore: [DHIS2-21542] Remove usage of storedBy#4576
Conversation
| surname, | ||
| uid: clientId, | ||
| }, | ||
| storedBy: userName, | ||
| storedAt: fromClientDate(moment().toISOString()).getServerZonedISOString(), | ||
| }; |
There was a problem hiding this comment.
🚩 WidgetEnrollmentNote clientNote lacks clientId — no rollback mechanism for failed saves
The ClientNote type in WidgetEnrollmentNote.types.ts does not include a clientId field, unlike the notes in viewEventNotes.epics.ts and addNoteForNewSingleEvent.epics.ts which include clientId: uuid(). The enrollment note reducer at enrollmentDomain.reducerDescription.ts:255-261 appends notes but has no matching remove/rollback handler for ADD_NOTE_FAILED_FOR_ENROLLMENT. This means if saving an enrollment note fails, the optimistically-added note remains in state. This is pre-existing behavior unchanged by this PR.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Great comment! This will be improved in #4577.
|



DHIS2-21542
This PR removes the
storedByfield and associateduserNameusage from all note-related code. Across multiple epics, types, and components:userNamestoredBy: userNameis no longer set on note objectsstoredByis removed from all type definitionsNotescomponent no longer falls back tostoredBywhencreatedByis absentThe display now relies exclusively on
createdBy.firstName/createdBy.surname.