summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/ProjectDailyColumnStats.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Model/ProjectDailyColumnStats.php b/app/Model/ProjectDailyColumnStats.php
index 26e9d8b7..d5c72c12 100644
--- a/app/Model/ProjectDailyColumnStats.php
+++ b/app/Model/ProjectDailyColumnStats.php
@@ -32,6 +32,8 @@ class ProjectDailyColumnStats extends Base
{
return $this->db->transaction(function($db) use ($project_id, $date) {
+ $status = $this->config->get('cfd_include_closed_tasks') == 1 ? array(Task::STATUS_OPEN, Task::STATUS_CLOSED) : array(Task::STATUS_OPEN);
+
$column_ids = $db->table(Board::TABLE)->eq('project_id', $project_id)->findAllByColumn('id');
foreach ($column_ids as $column_id) {
@@ -59,6 +61,7 @@ class ProjectDailyColumnStats extends Base
'total' => $db->table(Task::TABLE)
->eq('project_id', $project_id)
->eq('column_id', $column_id)
+ ->in('is_active', $status)
->count()
));
}