diff options
author | Lauri Ojansivu <x@xet7.org> | 2017-11-21 12:42:08 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2017-11-21 12:42:08 +0200 |
commit | dc9ac5b58a0b41f3a424b267308eb925f01d6f48 (patch) | |
tree | 4bb8ab549e39cbd8218ed714b07fc265600ae600 /models/boards.js | |
parent | ee69eb03d4a72e8c67c377d8da3b169660cac67b (diff) | |
parent | f31d007177d5ab52e2a5ffaae70fdb73159dd695 (diff) | |
download | wekan-dc9ac5b58a0b41f3a424b267308eb925f01d6f48.tar.gz wekan-dc9ac5b58a0b41f3a424b267308eb925f01d6f48.tar.bz2 wekan-dc9ac5b58a0b41f3a424b267308eb925f01d6f48.zip |
Merge branch 'devel'
Diffstat (limited to 'models/boards.js')
-rw-r--r-- | models/boards.js | 10 |
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 } }); }, |