Add settings to disable subtask timer and another to not include closed tasks into CFD

This commit is contained in:
Frederic Guillot
2015-07-25 13:02:20 -04:00
parent 392a75fa0e
commit 8142d43057
25 changed files with 173 additions and 6 deletions

View File

@@ -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()
));
}