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: Always use system time for createdAt in events [DHIS2-18252](2.39) #18872

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
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 @@ -300,7 +300,7 @@ private ValuesHolder getAuditAndDateParameters(EventDataValue eventDataValue, Da

if (isNewDataValue(eventDataValue, dv)) {
eventDataValue = new EventDataValue();
eventDataValue.setCreated(getFromOrNewDate(dv, DataValue::getCreatedAt));
eventDataValue.setCreated(new Date());
eventDataValue.setLastUpdated(getFromOrNewDate(dv, DataValue::getUpdatedAt));
persistedValue = dv.getValue();
auditType = AuditType.CREATE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ private ProgramStageInstance from(
for (DataValue dataValue : event.getDataValues()) {
EventDataValue eventDataValue = new EventDataValue();
eventDataValue.setValue(dataValue.getValue());
eventDataValue.setCreated(DateUtils.fromInstant(dataValue.getCreatedAt()));
eventDataValue.setLastUpdated(new Date());
eventDataValue.setProvidedElsewhere(dataValue.isProvidedElsewhere());
// ensure dataElement is referred to by UID as multiple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
},
{
"updatedAt": "2019-03-04T15:12:59.209",
"createdAt": "2019-03-04T15:01:29.793",
"dataElement": "z3Z4TD3oBCP",
"value": "true",
"providedElsewhere": false
Expand Down
Loading