Skip to content

[Bug] [ApiServer] When coping tasks such as ConditionTask and SwitchTask, the TaskCode references within the task parameters are not being replaced correctly. #17773

@njnu-seafish

Description

@njnu-seafish

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

When coping tasks such as ConditionTask and SwitchTask, the TaskCode references within the task parameters are not being replaced correctly.
such as:

{
"localParams" : [ ],
"varPool" : [ ],
"dependence" : {
"dependTaskList" : [ {
"dependItemList" : [ {
"dependentType" : null,
"projectCode" : 0,
"definitionCode" : 0,
"depTaskCode" : 157103251016960,
"cycle" : null,
"dateValue" : null,
"dependResult" : null,
"parameterPassing" : false,
"status" : "SUCCESS"
} ],
"relation" : "OR"
} ],
"relation" : "AND"
},
"conditionResult" : {
"conditionSuccess" : false,
"successNode" : [ 157101634027776 ],
"failedNode" : [ 157101657370880 ]
}
}

Fields such as depTaskCode, successNode, and failedNode still reference the task codes of the old tasks.

What you expected to happen

Fields such as depTaskCode, successNode, and failedNode still reference the task codes of the new tasks.

How to reproduce

1, Create a workflow containing tasks such as ConditionTask, SwitchTask, etc.
2, Then, when coping the above workflow, you will find that the task codes referenced in the parameters of the new workflow's tasks are incorrect.

Anything else

No response

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

backendbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions