summaryrefslogtreecommitdiff
path: root/app/Model/TaskFinder.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-31 17:46:19 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-31 17:46:19 -0500
commitfc21d3873e3ac63222ad4065a593c715bef4c251 (patch)
treeb1795031eda0774aeb1af9fb20606fe38611e0eb /app/Model/TaskFinder.php
parent1500ff92b2dc3d3932c8e06755bec23f9017e8a4 (diff)
When creating a new project, have the possibility to select another project to duplicate
Diffstat (limited to 'app/Model/TaskFinder.php')
-rw-r--r--app/Model/TaskFinder.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index ab290bce..4d673097 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -180,6 +180,23 @@ class TaskFinder extends Base
}
/**
+ * Get all tasks for a given project and status
+ *
+ * @access public
+ * @param integer $project_id
+ * @param array $status
+ * @return array
+ */
+ public function getAllIds($project_id, array $status = array(Task::STATUS_OPEN))
+ {
+ return $this->db
+ ->table(Task::TABLE)
+ ->eq(Task::TABLE.'.project_id', $project_id)
+ ->in(Task::TABLE.'.is_active', $status)
+ ->findAllByColumn('id');
+ }
+
+ /**
* Get overdue tasks query
*
* @access public