Improve automatic action duplication with unit tests and improve database schema

This commit is contained in:
Frederic Guillot
2015-06-20 14:34:47 -04:00
parent d3f789764d
commit aa6fdd3544
13 changed files with 444 additions and 81 deletions

View File

@@ -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
*