From d6530bd55fdd863f0cf153bc2854fb4e34076316 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 28 Dec 2014 17:38:17 -0500 Subject: Include swimlane in task export --- app/Model/Swimlane.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'app/Model/Swimlane.php') diff --git a/app/Model/Swimlane.php b/app/Model/Swimlane.php index c9c080af..069f14b6 100644 --- a/app/Model/Swimlane.php +++ b/app/Model/Swimlane.php @@ -156,6 +156,27 @@ class Swimlane extends Base return $swimlanes; } + /** + * Get list of all swimlanes + * + * @access public + * @param integer $project_id Project id + * @return array + */ + public function getSwimlanesList($project_id) + { + $swimlanes = $this->db->table(self::TABLE) + ->eq('project_id', $project_id) + ->orderBy('position', 'asc') + ->listing('id', 'name'); + + $swimlanes[0] = $this->db->table(Project::TABLE) + ->eq('id', $project_id) + ->findOneColumn('default_swimlane'); + + return $swimlanes; + } + /** * Add a new swimlane * -- cgit v1.2.3