Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to delete copied nodes in unsaved workflow #16567

Closed
3 tasks done
Xuxiaotuan opened this issue Sep 3, 2024 · 4 comments · Fixed by #16576
Closed
3 tasks done

[Bug] Unable to delete copied nodes in unsaved workflow #16567

Xuxiaotuan opened this issue Sep 3, 2024 · 4 comments · Fixed by #16576
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Xuxiaotuan
Copy link
Contributor

Xuxiaotuan commented Sep 3, 2024

Search before asking

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

What happened

If a node is copied in an existing workflow, it cannot be deleted without being saved

image

What you expected to happen

Copy a workflow node

How to reproduce

  1. Create a workflow with nodes
  2. Copy the node without saving it
  3. Delete a node (cannot be deleted)

Anything else

No response

Version

3.2.x

use docker image: apache/dolphinscheduler-standalone-server:3.2.2

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Xuxiaotuan Xuxiaotuan added bug Something isn't working Waiting for reply Waiting for reply labels Sep 3, 2024
@SbloodyS
Copy link
Member

SbloodyS commented Sep 3, 2024

This is a known issue. Both imported and copied workflow have the same problems.

@SbloodyS SbloodyS added help wanted Extra attention is needed and removed Waiting for reply Waiting for reply labels Sep 3, 2024
@Xuxiaotuan
Copy link
Contributor Author

i want to try fix

@SbloodyS
Copy link
Member

SbloodyS commented Sep 3, 2024

I've assigned to you. Looking forward to your contribution.

@Xuxiaotuan
Copy link
Contributor Author

  1. the back-end interface may report errors
  2. When the back end returns normal, but returns an empty array, the front end cannot proceed to the next step
use-dependencies.ts:152 Uncaught (in promise) TypeError: res.filter is not a function
    at use-dependencies.ts:152:14
    at async getDependentTaskLinksByTask (use-dependencies.ts:149:7)
    at async handleDelete (dag-context-menu.tsx:150:19)

For example:

await queryDependentTasks(projectCode, dependentTaskReq).then(
        (res: any) => {
          res
            .filter((item: any) => item.processDefinitionCode !== workflowCode)
            .forEach((item: any) => {
              dependentTaskLinks.push({
                text:
                  item.processDefinitionName + '->' + item.taskDefinitionName,
                show: true,
                action: () => {
                  const url = `/projects/${item.projectCode}/workflow/definitions/${item.processDefinitionCode}`
                  window.open(url, '_blank')
                }
              })
            })
        }
      )

Let me verify that again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants