From aec0ea27f2b51eca90f7ab2bf313c214faacbfe6 Mon Sep 17 00:00:00 2001 From: zhuxt2015 <594754793@qq.com> Date: Tue, 28 Jun 2022 21:33:58 +0800 Subject: [PATCH] [Bug] [Api] The copied workflow create time and update time is still copied from the original workflow --- .../api/service/impl/ProcessDefinitionServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java index ad05c456f5..721dffa24b 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java @@ -1752,6 +1752,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro processDefinition.setId(0); processDefinition.setUserId(loginUser.getId()); processDefinition.setName(processDefinition.getName() + "_copy_" + DateUtils.getCurrentTimeStamp()); + final Date date = new Date(); + processDefinition.setCreateTime(date); + processDefinition.setUpdateTime(date); if (StringUtils.isNotBlank(processDefinition.getLocations())) { ArrayNode jsonNodes = JSONUtils.parseArray(processDefinition.getLocations()); for (int i = 0; i < jsonNodes.size(); i++) {