Skip to content

Commit

Permalink
fix: fix creation new process issue - EXO-68731 (#348)
Browse files Browse the repository at this point in the history
before this change, when saving a new process a log error is displayed for nullability for modifiedDate field
After this change, when saving a process the modified date is not null and the process is created successfully
  • Loading branch information
GouadriaHanen committed Jan 9, 2024
1 parent 7581877 commit bfadeb2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ public WorkFlow saveWorkFlow(WorkFlow workFlow, long userId) throws IllegalArgum
} else if (illustrativeAttachment != null && illustrativeAttachment.isToDelete()) {
workFlowEntity.setIllustrationImageId(null);
}
workFlowEntity.setModifiedDate(new Date());
workFlowEntity.setModifierId(userId);
if (workFlow.getId() == 0) {
workFlowEntity.setId(null);
workFlowEntity.setCreatedDate(new Date());
Expand Down Expand Up @@ -181,8 +183,6 @@ public WorkFlow saveWorkFlow(WorkFlow workFlow, long userId) throws IllegalArgum
workFlowEntity.setParticipator(workFlowDAO.find(workFlowEntity.getId()).getParticipator());
}
workFlowEntity.setManager(getManagers(workFlow.getRequestsCreators()));
workFlowEntity.setModifiedDate(new Date());
workFlowEntity.setModifierId(userId);
workFlowEntity = workFlowDAO.update(workFlowEntity);
}
processesAttachmentService.linkAttachmentsToEntity(workFlow.getAttachments(),
Expand Down Expand Up @@ -515,6 +515,7 @@ public Work saveWorkDraft(Work work, long userId) {
throw new IllegalArgumentException("identity is not exist");
}
WorkEntity workEntity = EntityMapper.toEntity(work);
workEntity.setModifiedDate(new Date());
if (work.getId() == 0) {
workEntity.setId(null);
workEntity.setCreatedDate(new Date());
Expand All @@ -527,7 +528,6 @@ public Work saveWorkDraft(Work work, long userId) {
WORK_DRAFT_ENTITY_TYPE,
work.getWorkFlow().getProjectId());
} else {
workEntity.setModifiedDate(new Date());
workEntity = workDraftDAO.update(workEntity);
}

Expand Down

0 comments on commit bfadeb2

Please sign in to comment.