summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 99480ca7..d92bec47 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -351,6 +351,17 @@ Boards.helpers({
return Swimlanes.find({ boardId: this._id, archived: false }, { sort: { sort: 1 } });
},
+ nextSwimlane(swimlane) {
+ return Swimlanes.findOne({
+ boardId: this._id,
+ archived: false,
+ sort: { $gte: swimlane.sort },
+ _id: { $ne: swimlane._id },
+ }, {
+ sort: { sort: 1 },
+ });
+ },
+
hasOvertimeCards(){
const card = Cards.findOne({isOvertime: true, boardId: this._id, archived: false} );
return card !== undefined;