Skip to content

Importing a workflow into the current workspace creates a spurious duplicate workflow in the list #6846

Description

@eugenegujing

What happened?

Using the Import Workflow button in the workspace toolbar (frontend/src/app/workspace/component/menu/menu.component.tsonClickImportWorkflow) to import a workflow JSON into the currently open workflow A leaves a brand-new workflow B in the user's workflow list, with content identical to the imported file.

Replacing the content of the current workflow A with the imported content is the intended behavior of this button. The bug is only the extra workflow B: a single import silently creates an additional, unwanted workflow that the user never asked for.

Here is an example: Open a workflow A that already has content, then use the workspace toolbar's "Import Workflow" button to import a workflow file B. Two things go wrong: the editor silently navigates to a brand-new workflow created from B (a duplicate entry appears in the workflow list), and workflow A's original content is also totally replaced by B's content. The user ends up with two workflows both holding B's content, and A's original content is gone from A.

626880657-2fc519ce-194b-424f-bb2a-965f9a720c29.mov

How to reproduce?

  1. Log in and open an existing workflow A, so A has a real wid.
  2. In the workspace toolbar, click Import Workflow and select a workflow JSON
  3. Observe the canvas now shows the imported content.
  4. Wait for auto-persist (~debounce), then open the workflows list.

Observed: a new workflow B identical to the import appears in the list (in addition to A), and the URL has switched to B's wid.

Version/Branch

1.3.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

No response

What browsers are you seeing the problem on?

No response

Relevant log output

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions