summaryrefslogtreecommitdiff
path: root/app/Model/TaskFinder.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-12-31 13:47:47 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-12-31 13:47:47 -0500
commit27f453707948daf08e4a38c4c22e637a7ad0c57d (patch)
treeec0d2509b007f4f438a79c8af6e1c6519875d6e9 /app/Model/TaskFinder.php
parent198f8d6a8e39fe7bb21faafe53b12e351feca8b7 (diff)
Fix bug tasks don't show up on board/swimlanes
Diffstat (limited to 'app/Model/TaskFinder.php')
-rw-r--r--app/Model/TaskFinder.php20
1 files changed, 20 insertions, 0 deletions
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
@@ -230,6 +230,26 @@ class TaskFinder extends Base
}
/**
+ * 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
*
* @access public