summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-25 13:02:20 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-25 13:02:20 -0400
commit8142d43057939265d15317bc051ff149553ca727 (patch)
treeb4172f7dfd06702e9eac32b59a10a2f8669adbb4 /app/Model
parent392a75fa0e76530c176d78b4e17a2834286616e3 (diff)
Add settings to disable subtask timer and another to not include closed tasks into CFD
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()
));
}