-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(editor): Fix copy/paste issue when switch node is in workflow (#8103
) ## Summary Fix bug where copy/pasting a node breaks the view. Issue seems to be that copied workflow does not have Switch node when workflow is rerendering.. <img width="1942" alt="Screenshot 2023-12-19 at 18 16 23" src="https://github.com/n8n-io/n8n/assets/4711238/ad53b8ae-3693-4733-8f6b-7bc9e7b9d216"> ## Related tickets and issues [Linear ticket ADO-1504](https://linear.app/n8n/issue/ADO-1504/unwanted-nodes-connections-after-copypaste-of-n8n-form-trigger) ## Review / Merge checklist - [X] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [x] Tests included. > A bug is not considered fixed, unless a test is added to prevent it from happening again. > A feature is not complete without tests.
- Loading branch information
Showing
5 changed files
with
114 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"name": "My workflow 8", | ||
"nodes": [ | ||
{ | ||
"parameters": { | ||
"path": "d1cba915-ca18-4425-bcfb-133205fc815a", | ||
"formTitle": "test", | ||
"formFields": { | ||
"values": [ | ||
{ | ||
"fieldLabel": "test" | ||
} | ||
] | ||
}, | ||
"options": {} | ||
}, | ||
"id": "9e685367-fb94-4376-a9a4-7f311d9f7e2d", | ||
"name": "n8n Form Trigger", | ||
"type": "n8n-nodes-base.formTrigger", | ||
"typeVersion": 2, | ||
"position": [ | ||
620, | ||
580 | ||
], | ||
"webhookId": "d1cba915-ca18-4425-bcfb-133205fc815a" | ||
}, | ||
{ | ||
"parameters": {}, | ||
"id": "0f4dfe66-51c0-4378-9eab-680f8140a572", | ||
"name": "Switch", | ||
"type": "n8n-nodes-base.switch", | ||
"typeVersion": 2, | ||
"position": [ | ||
800, | ||
580 | ||
] | ||
} | ||
], | ||
"pinData": { | ||
"n8n Form Trigger": [ | ||
{ | ||
"json": { | ||
"name": "First item", | ||
"code": 1 | ||
} | ||
}, | ||
{ | ||
"json": { | ||
"name": "Second item", | ||
"code": 2 | ||
} | ||
} | ||
] | ||
}, | ||
"connections": { | ||
"n8n Form Trigger": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "Switch", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"active": false, | ||
"settings": { | ||
"executionOrder": "v1" | ||
}, | ||
"versionId": "d6c14bc8-a69f-47bb-b5ba-fe6e9db0a3a4", | ||
"id": "UQSimcMQJGbTeTLG", | ||
"meta": { | ||
"instanceId": "a786b722078489c1fa382391a9f3476c2784761624deb2dfb4634827256d51a0" | ||
}, | ||
"tags": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters