From 2691f033cbd072864cf79e95d131a93449d3c84d Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Wed, 29 Apr 2020 22:38:50 +0200 Subject: Fix creation of card links Without this fix, orphaned card links are created and therefore this leads to problems as described in https://github.com/wekan/wekan/issues/2785. --- client/components/lists/listBody.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'client/components/lists/listBody.js') diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 88f88db0..1bcd41c4 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -658,10 +658,7 @@ BlazeComponent.extendComponent({ _id = element.copy(this.boardId, this.swimlaneId, this.listId); // 1.B Linked card } else { - delete element._id; - element.type = 'cardType-linkedCard'; - element.linkedId = element.linkedId || element._id; - _id = Cards.insert(element); + _id = element.link(this.boardId, this.swimlaneId, this.listId); } Filter.addException(_id); // List insertion -- cgit v1.2.3-1-g7c22 From 9cba640120940eec45397d2daf8de573dbedf2b1 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Thu, 30 Apr 2020 01:51:54 +0200 Subject: Fix typo --- client/components/lists/listBody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components/lists/listBody.js') diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 1bcd41c4..246e0156 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -672,7 +672,7 @@ BlazeComponent.extendComponent({ element.sort = Boards.findOne(this.boardId) .swimlanes() .count(); - element.type = 'swimlalne'; + element.type = 'swimlane'; _id = element.copy(this.boardId); } else if (this.isBoardTemplateSearch) { board = Boards.findOne(element.linkedId); -- cgit v1.2.3-1-g7c22