summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-11-21 12:42:08 +0200
committerLauri Ojansivu <x@xet7.org>2017-11-21 12:42:08 +0200
commitdc9ac5b58a0b41f3a424b267308eb925f01d6f48 (patch)
tree4bb8ab549e39cbd8218ed714b07fc265600ae600 /models/boards.js
parentee69eb03d4a72e8c67c377d8da3b169660cac67b (diff)
parentf31d007177d5ab52e2a5ffaae70fdb73159dd695 (diff)
downloadwekan-dc9ac5b58a0b41f3a424b267308eb925f01d6f48.tar.gz
wekan-dc9ac5b58a0b41f3a424b267308eb925f01d6f48.tar.bz2
wekan-dc9ac5b58a0b41f3a424b267308eb925f01d6f48.zip
Merge branch 'devel'
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 6ae818c6..594bb7b9 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -187,6 +187,16 @@ Boards.helpers({
return Lists.find({ boardId: this._id, archived: false }, { sort: { sort: 1 } });
},
+ hasOvertimeCards(){
+ const card = Cards.findOne({isOvertime: true, boardId: this._id, archived: false} );
+ return card !== undefined;
+ },
+
+ hasSpentTimeCards(){
+ const card = Cards.findOne({spentTime: { $gt: 0 }, boardId: this._id, archived: false} );
+ return card !== undefined;
+ },
+
activities() {
return Activities.find({ boardId: this._id }, { sort: { createdAt: -1 } });
},