You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by li...@apache.org on 2022/08/14 01:43:41 UTC

[dolphinscheduler] branch 2.0.7-prepare updated: 2.0.6 fix copy bug (#10940)

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

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


The following commit(s) were added to refs/heads/2.0.7-prepare by this push:
     new 2746f6851d 2.0.6 fix copy bug (#10940)
2746f6851d is described below

commit 2746f6851d90cbdda04b6dc099847454ede09550
Author: Hissi <56...@users.noreply.github.com>
AuthorDate: Sun Aug 14 09:43:30 2022 +0800

    2.0.6 fix copy bug (#10940)
    
    * fix copy task bug: when modifying the array type parameter of the task, the parameter of the copied task is also changed (shallow copy is changed to deep copy).
    
    * fix copy task bug: when modifying the array type parameter of the task, the parameter of the copied task is also changed (shallow copy is changed to deep copy).
    
    Co-authored-by: guanh <111>
---
 .../src/js/conf/home/pages/dag/_source/canvas/contextMenu.vue        | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/contextMenu.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/contextMenu.vue
index cb5c6a7abb..fc85c63840 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/contextMenu.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/contextMenu.vue
@@ -45,6 +45,7 @@
   import { mapState, mapActions, mapMutations } from 'vuex'
   import { findComponentDownward, uuid } from '@/module/util/'
   import MenuItem from './menuItem.vue'
+  import { cloneDeep } from 'lodash'
 
   export default {
     name: 'dag-context-menu',
@@ -114,9 +115,9 @@
         const targetNode = nodes.find(
           (node) => node.id === this.currentTask.code
         )
-        const targetTask = this.tasks.find(
+        const targetTask = cloneDeep(this.tasks.find(
           (task) => task.code === this.currentTask.code
-        )
+        ))
 
         if (!targetNode || !targetTask) return