summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-21 22:44:25 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-21 22:44:25 -0400
commit919e5d51a4cc4a2928cd34c8c575d4c003bb9a74 (patch)
treeacc8c0312f8efe6d32dd97355754b663c7b383e7 /controllers
parent9bfd824ab724dc2eb356e06b1722f843dbd8d96d (diff)
Add a method to apply filters for tasks
Diffstat (limited to 'controllers')
-rw-r--r--controllers/project.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/controllers/project.php b/controllers/project.php
index a89c7879..6085caec 100644
--- a/controllers/project.php
+++ b/controllers/project.php
@@ -42,12 +42,18 @@ class Project extends Base
$this->checkProjectPermissions($project['id']);
- $tasks = $this->task->getAllByProjectId($project_id, array(0));
+ $filters = array(
+ array('column' => 'project_id', 'operator' => 'eq', 'value' => $project_id),
+ array('column' => 'is_active', 'operator' => 'eq', 'value' => \Model\Task::STATUS_CLOSED),
+ );
+
+ $tasks = $this->task->find($filters);
$nb_tasks = count($tasks);
$this->response->html($this->template->layout('project_tasks', array(
'menu' => 'projects',
'project' => $project,
+ 'columns' => $this->board->getColumnsList($project_id),
'tasks' => $tasks,
'nb_tasks' => $nb_tasks,
'title' => $project['name'].' ('.$nb_tasks.')'