From 27f453707948daf08e4a38c4c22e637a7ad0c57d Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 31 Dec 2014 13:47:47 -0500 Subject: Fix bug tasks don't show up on board/swimlanes --- app/Model/TaskFinder.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'app/Model/TaskFinder.php') diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php index 117edae8..7f66fa4d 100644 --- a/app/Model/TaskFinder.php +++ b/app/Model/TaskFinder.php @@ -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 * -- cgit v1.2.3