Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [DHIS2-15983] Enrollment date not assigned on form init #3475

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const openDataEntryForNewEnrollmentBatchAsync = async ({
const formId = getDataEntryKey(dataEntryId, itemId);
const addFormDataActions = addFormData(`${dataEntryId}-${itemId}`, formValues);
const firstStageDataEntryPropsToInclude = firstStage && getDataEntryPropsToInclude(firstStage.stageForm);
const defaultDataEntryValues = { enrolledAt: convertDateObjectToDateFormatString(new Date()) };
const dataEntryPropsToInclude = [
...enrollmentDataEntryPropsToInclude,
...extraDataEntryProps,
Expand All @@ -88,14 +89,15 @@ export const openDataEntryForNewEnrollmentBatchAsync = async ({
dataEntryId,
itemId,
dataEntryPropsToInclude,
{ enrolledAt: convertDateObjectToDateFormatString(new Date()) },
defaultDataEntryValues,
);

const effects = getApplicableRuleEffectsForTrackerProgram({
program,
orgUnit,
stage: firstStage,
attributeValues: clientValues,
enrollmentData: defaultDataEntryValues,
formFoundation,
});

Expand Down
Loading