From aa6fdd3544b64eeab3d577c58425e128c809a135 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 20 Jun 2015 14:34:47 -0400 Subject: Improve automatic action duplication with unit tests and improve database schema --- app/Model/Board.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/Model/Board.php') diff --git a/app/Model/Board.php b/app/Model/Board.php index eecbc91c..f6f968f4 100644 --- a/app/Model/Board.php +++ b/app/Model/Board.php @@ -376,6 +376,19 @@ class Board extends Base return $this->db->table(self::TABLE)->eq('id', $column_id)->findOne(); } + /** + * Get a column id by the name + * + * @access public + * @param integer $project_id + * @param string $title + * @return integer + */ + public function getColumnIdByTitle($project_id, $title) + { + return (int) $this->db->table(self::TABLE)->eq('project_id', $project_id)->eq('title', $title)->findOneColumn('id'); + } + /** * Get the position of the last column for a given project * -- cgit v1.2.3