You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ke...@apache.org on 2022/10/17 09:27:04 UTC

[dolphinscheduler] branch 3.1.1-prepare updated: [Improvement][API] When the workflow definition is copied, the operation user of the timed instance is changed to the current user

This is an automated email from the ASF dual-hosted git repository.

kerwin pushed a commit to branch 3.1.1-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/3.1.1-prepare by this push:
     new 056176afc0 [Improvement][API] When the workflow definition is copied, the operation user of the timed instance is changed to the current user
056176afc0 is described below

commit 056176afc0675cb385b038169450602842bbd067
Author: zhuangchong <zh...@163.com>
AuthorDate: Mon Oct 17 17:26:39 2022 +0800

    [Improvement][API] When the workflow definition is copied, the operation user of the timed instance is changed to the current user
---
 .../dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java | 2 ++
 1 file changed, 2 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 b6dff7f51b..62cb2cf359 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
@@ -1996,6 +1996,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
                 // copy timing configuration
                 Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(oldProcessDefinitionCode);
                 if (scheduleObj != null) {
+                    scheduleObj.setId(null);
+                    scheduleObj.setUserId(loginUser.getId());
                     scheduleObj.setProcessDefinitionCode(processDefinition.getCode());
                     scheduleObj.setReleaseState(ReleaseState.OFFLINE);
                     scheduleObj.setCreateTime(date);