summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicu Tofan <nicu.tofan@gmail.com>2018-06-23 23:31:44 +0300
committerNicu Tofan <nicu.tofan@gmail.com>2018-06-26 14:32:49 +0300
commit6ab1cbb341da44cbaffc296ea177a8cd146e5244 (patch)
tree4142150bb8db2582d37d16976b4ee17a748d3057
parent5a023e431504f7573723db6e0d2262ecb1fc61c5 (diff)
downloadwekan-6ab1cbb341da44cbaffc296ea177a8cd146e5244.tar.gz
wekan-6ab1cbb341da44cbaffc296ea177a8cd146e5244.tar.bz2
wekan-6ab1cbb341da44cbaffc296ea177a8cd146e5244.zip
Take archived status into consideration for subtasks
-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() {