summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-04-04 01:26:49 +0300
committerLauri Ojansivu <x@xet7.org>2020-04-04 01:26:49 +0300
commitb7fd79aef0d9c18f535fdd5a14e3d9b71e14f4de (patch)
tree0e05e5f587a33d1392a42f192a9b498b72a26211
parent28a9ab713162451128fe44ad9dd7a6886070449f (diff)
parent89fe030fa35ea24195ac366aaf3a1c917b305249 (diff)
downloadwekan-b7fd79aef0d9c18f535fdd5a14e3d9b71e14f4de.tar.gz
wekan-b7fd79aef0d9c18f535fdd5a14e3d9b71e14f4de.tar.bz2
wekan-b7fd79aef0d9c18f535fdd5a14e3d9b71e14f4de.zip
Merge branch 'feature/subtask-use-parent-swimlane' of https://github.com/daniel-eder/wekan into daniel-eder-feature/subtask-use-parent-swimlane
-rw-r--r--client/components/cards/subtasks.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/components/cards/subtasks.js b/client/components/cards/subtasks.js
index 34348fe1..cdc227fc 100644
--- a/client/components/cards/subtasks.js
+++ b/client/components/cards/subtasks.js
@@ -20,7 +20,13 @@ BlazeComponent.extendComponent({
const crtBoard = Boards.findOne(card.boardId);
const targetBoard = crtBoard.getDefaultSubtasksBoard();
const listId = targetBoard.getDefaultSubtasksListId();
- const swimlaneId = targetBoard.getDefaultSwimline()._id;
+
+ //Get the full swimlane data for the parent task.
+ const parentSwimlane = Swimlanes.findOne({boardId: crtBoard._id, _id: card.swimlaneId});
+ //find the swimlane of the same name in the target board.
+ const targetSwimlane = Swimlanes.findOne({boardId: targetBoard._id, title: parentSwimlane.title});
+ //If no swimlane with a matching title exists in the target board, fall back to the default swimlane.
+ const swimlaneId = targetSwimlane === undefined ? targetBoard.getDefaultSwimline()._id : targetSwimlane._id;
if (title) {
const _id = Cards.insert({