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: fix creation new process issue - EXO-68731 (#348) #349

Merged
merged 1 commit into from
Jan 9, 2024
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 @@ -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