Fix bug tasks don't show up on board/swimlanes

This commit is contained in:
Frédéric Guillot
2014-12-31 13:47:47 -05:00
parent 198f8d6a8e
commit 27f4537079
5 changed files with 154 additions and 8 deletions

View File

@@ -229,6 +229,26 @@ class TaskFinder extends Base
->count();
}
/**
* Count the number of tasks for a given column and swimlane
*
* @access public
* @param integer $project_id Project id
* @param integer $column_id Column id
* @param integer $swimlane_id Swimlane id
* @return integer
*/
public function countByColumnAndSwimlaneId($project_id, $column_id, $swimlane_id)
{
return $this->db
->table(Task::TABLE)
->eq('project_id', $project_id)
->eq('column_id', $column_id)
->eq('swimlane_id', $swimlane_id)
->in('is_active', 1)
->count();
}
/**
* Return true if the task exists
*