summaryrefslogtreecommitdiffstats
path: root/client/components/cards/subtasks.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/cards/subtasks.js')
-rw-r--r--client/components/cards/subtasks.js26
1 files changed, 22 insertions, 4 deletions
diff --git a/client/components/cards/subtasks.js b/client/components/cards/subtasks.js
index fab860bb..4cd15c11 100644
--- a/client/components/cards/subtasks.js
+++ b/client/components/cards/subtasks.js
@@ -3,7 +3,8 @@ BlazeComponent.extendComponent({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
}).register('subtaskDetail');
@@ -19,7 +20,22 @@ 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({
@@ -55,7 +71,8 @@ BlazeComponent.extendComponent({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
@@ -154,7 +171,8 @@ Template.subtaskItemDetail.helpers({
return (
Meteor.user() &&
Meteor.user().isBoardMember() &&
- !Meteor.user().isCommentOnly()
+ !Meteor.user().isCommentOnly() &&
+ !Meteor.user().isWorker()
);
},
});