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/12/14 01:59:33 UTC

[dolphinscheduler] branch 3.1.3-prepare updated: [Fix-13160][UI] Ironed out the issue with failing to save the correct settings of dependent tasks. (#13179)

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

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


The following commit(s) were added to refs/heads/3.1.3-prepare by this push:
     new dc0d46f1aa [Fix-13160][UI] Ironed out the issue with failing to save the correct settings of dependent tasks. (#13179)
dc0d46f1aa is described below

commit dc0d46f1aafed408e4274f5205c26f975ac5a9f3
Author: calvin <ji...@163.com>
AuthorDate: Tue Dec 13 18:15:00 2022 +0800

    [Fix-13160][UI] Ironed out the issue with failing to save the correct settings of dependent tasks. (#13179)
---
 .../src/views/projects/task/components/node/format-data.ts     | 10 +++++++---
 .../src/views/projects/task/components/node/types.ts           |  3 ++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts
index f98f147236..862ffa4624 100644
--- a/dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts
+++ b/dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts
@@ -22,7 +22,9 @@ import type {
   ITaskParams,
   ISqoopTargetParams,
   ISqoopSourceParams,
-  ILocalParam
+  ILocalParam,
+  IDependTask,
+  RelationType
 } from './types'
 
 export function formatParams(data: INodeData): {
@@ -584,9 +586,11 @@ export function formatModel(data: ITaskData) {
   }
 
   if (data.taskParams?.dependence) {
-    params.dependTaskList = data.taskParams?.dependence.dependTaskList || []
-    params.relation = data.taskParams?.dependence.relation
+    const dependence: { relation?: RelationType, dependTaskList?: IDependTask[] } = JSON.parse(JSON.stringify(data.taskParams.dependence))
+    params.dependTaskList = dependence.dependTaskList || []
+    params.relation = dependence.relation
   }
+
   if (data.taskParams?.ruleInputParameter) {
     params.check_type = data.taskParams.ruleInputParameter.check_type
     params.comparison_execute_sql =
diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/types.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/types.ts
index d16e1b642e..40a90b6f1e 100644
--- a/dolphinscheduler-ui/src/views/projects/task/components/node/types.ts
+++ b/dolphinscheduler-ui/src/views/projects/task/components/node/types.ts
@@ -36,9 +36,10 @@ export type {
 export type { IResource, ProgramType, IMainJar } from '@/store/project/types'
 export type { ITaskState } from '@/common/types'
 
+export type RelationType = 'AND' | 'OR'
+
 type SourceType = 'MYSQL' | 'HDFS' | 'HIVE'
 type ModelType = 'import' | 'export'
-type RelationType = 'AND' | 'OR'
 type ITaskType = TaskType
 type IDateType = 'hour' | 'day' | 'week' | 'month'