From fc21d3873e3ac63222ad4065a593c715bef4c251 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 31 Jan 2016 17:46:19 -0500 Subject: When creating a new project, have the possibility to select another project to duplicate --- app/Model/TaskFinder.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'app/Model/TaskFinder.php') 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 @@ -179,6 +179,23 @@ class TaskFinder extends Base ->findAll(); } + /** + * 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 * -- cgit v1.2.3