summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Task.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/Model/Task.php b/app/Model/Task.php
index 10d125d4..7245417a 100644
--- a/app/Model/Task.php
+++ b/app/Model/Task.php
@@ -195,6 +195,8 @@ class Task extends Base
->columns(
'(SELECT count(*) FROM comments WHERE task_id=tasks.id) AS nb_comments',
'(SELECT count(*) FROM task_has_files WHERE task_id=tasks.id) AS nb_files',
+ '(SELECT count(*) FROM task_has_subtasks WHERE task_id=tasks.id) AS nb_subtasks',
+ '(SELECT count(*) FROM task_has_subtasks WHERE task_id=tasks.id AND status=2) AS nb_completed_subtasks',
'tasks.id',
'tasks.title',
'tasks.description',