Add a filter by user and due date + minor changes

This commit is contained in:
Frédéric Guillot
2014-04-26 20:04:39 -04:00
parent 3332949c8b
commit 6551609d1b
14 changed files with 158 additions and 57 deletions

View File

@@ -176,16 +176,14 @@ class Board extends Base
* @param integer $project_id Project id
* @return array
*/
public function get($project_id)
public function get($project_id, array $filters = array())
{
$this->db->startTransaction();
$columns = $this->getColumns($project_id);
$filters = array(
array('column' => 'project_id', 'operator' => 'eq', 'value' => $project_id),
array('column' => 'is_active', 'operator' => 'eq', 'value' => Task::STATUS_OPEN),
);
$filters[] = array('column' => 'project_id', 'operator' => 'eq', 'value' => $project_id);
$filters[] = array('column' => 'is_active', 'operator' => 'eq', 'value' => Task::STATUS_OPEN);
$taskModel = new Task($this->db, $this->event);
$tasks = $taskModel->find($filters);