diff options
author | Lauri Ojansivu <x@xet7.org> | 2017-11-21 11:31:04 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2017-11-21 11:31:04 +0200 |
commit | 9ea35b7188ca39a092755002c1cc5e97fee43a02 (patch) | |
tree | f5359aa002dcba218748de997d1f92a451d6c2a4 /models/boards.js | |
parent | f3e7646cfa065ceea0cf1aaff1f5adbde457a32a (diff) | |
parent | d76387aed2c83a5876b2777598be6d534530cf4e (diff) | |
download | wekan-9ea35b7188ca39a092755002c1cc5e97fee43a02.tar.gz wekan-9ea35b7188ca39a092755002c1cc5e97fee43a02.tar.bz2 wekan-9ea35b7188ca39a092755002c1cc5e97fee43a02.zip |
Merge branch 'thuanpq-card-spent-time' into devel
Spent time/Overtime on card. Thanks to thuanpq ! Closes #1337
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 } }); }, |