summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/cards.js21
1 files changed, 18 insertions, 3 deletions
diff --git a/models/cards.js b/models/cards.js
index 8cf0ef65..ca0e16be 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -221,15 +221,30 @@ Cards.helpers({
},
subtasks() {
- return Cards.find({parentId: this._id}, {sort: { sort: 1 } });
+ return Cards.find({
+ parentId: this._id,
+ archived: false,
+ }, {sort: { sort: 1 } });
+ },
+
+ allSubtasks() {
+ return Cards.find({
+ parentId: this._id,
+ archived: false,
+ }, {sort: { sort: 1 } });
},
subtasksCount() {
- return Cards.find({parentId: this._id}).count();
+ return Cards.find({
+ parentId: this._id,
+ archived: false,
+ }).count();
},
subtasksFinishedCount() {
- return Cards.find({parentId: this._id, archived: true}).count();
+ return Cards.find({
+ parentId: this._id,
+ archived: true}).count();
},
subtasksFinished() {