Browse Source

[Bug] [Api] The copied workflow create time and update time is still copied from the original workflow

3.0.0/version-upgrade
zhuxt2015 2 years ago committed by caishunfeng
parent
commit
aec0ea27f2
  1. 3
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java

3
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.setId(0);
processDefinition.setUserId(loginUser.getId()); processDefinition.setUserId(loginUser.getId());
processDefinition.setName(processDefinition.getName() + "_copy_" + DateUtils.getCurrentTimeStamp()); processDefinition.setName(processDefinition.getName() + "_copy_" + DateUtils.getCurrentTimeStamp());
final Date date = new Date();
processDefinition.setCreateTime(date);
processDefinition.setUpdateTime(date);
if (StringUtils.isNotBlank(processDefinition.getLocations())) { if (StringUtils.isNotBlank(processDefinition.getLocations())) {
ArrayNode jsonNodes = JSONUtils.parseArray(processDefinition.getLocations()); ArrayNode jsonNodes = JSONUtils.parseArray(processDefinition.getLocations());
for (int i = 0; i < jsonNodes.size(); i++) { for (int i = 0; i < jsonNodes.size(); i++) {

Loading…
Cancel
Save