From c50255813b1f2de3709b17492d32c9e4ce280236 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 1 Jun 2016 21:28:24 -0400 Subject: Added mail helper --- app/Model/SwimlaneModel.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'app/Model') diff --git a/app/Model/SwimlaneModel.php b/app/Model/SwimlaneModel.php index 87591b99..35e39879 100644 --- a/app/Model/SwimlaneModel.php +++ b/app/Model/SwimlaneModel.php @@ -89,6 +89,22 @@ class SwimlaneModel extends Base ->findOne(); } + /** + * Get first active swimlane for a project + * + * @access public + * @param integer $project_id + * @return array + */ + public function getFirstActiveSwimlane($project_id) + { + return $this->db->table(self::TABLE) + ->eq('is_active', self::ACTIVE) + ->eq('project_id', $project_id) + ->orderBy('position', 'asc') + ->findOne(); + } + /** * Get default swimlane properties * -- cgit v1.2.3