JinyLeeChina commented on a change in pull request #5869:
URL: https://github.com/apache/dolphinscheduler/pull/5869#discussion_r674470265
##########
File path:
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java
##########
@@ -231,13 +231,31 @@
putMsg(result, Status.TASK_DEFINE_NOT_EXIST, taskCode);
return result;
}
- TaskNode taskNode = JSONUtils.parseObject(taskDefinitionJson,
TaskNode.class);
- checkTaskNode(result, taskNode, taskDefinitionJson);
+ TaskDefinitionLog taskDefinitionToUpdate =
JSONUtils.parseObject(taskDefinitionJson, TaskDefinitionLog.class);
+ checkTaskDefinition(result, taskDefinitionToUpdate);
if (result.get(Constants.STATUS) == DATA_IS_NOT_VALID
|| result.get(Constants.STATUS) ==
Status.PROCESS_NODE_S_PARAMETER_INVALID) {
return result;
}
- int update = processService.updateTaskDefinition(loginUser,
project.getCode(), taskNode, taskDefinition);
+ Integer version =
taskDefinitionLogMapper.queryMaxVersionForDefinition(taskCode);
+ Date now = new Date();
+ taskDefinitionToUpdate.setCode(taskDefinition.getCode());
+ taskDefinitionToUpdate.setId(taskDefinition.getId());
+ taskDefinitionToUpdate.setProjectCode(projectCode);
+ taskDefinitionToUpdate.setUserId(loginUser.getId());
Review comment:
I think this should be id of creator, pls check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]