summaryrefslogtreecommitdiff
path: root/app/Model/Board.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/Board.php')
-rw-r--r--app/Model/Board.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Model/Board.php b/app/Model/Board.php
index 3650418f..eecbc91c 100644
--- a/app/Model/Board.php
+++ b/app/Model/Board.php
@@ -315,6 +315,18 @@ class Board extends Base
}
/**
+ * Get the last column id for a given project
+ *
+ * @access public
+ * @param integer $project_id Project id
+ * @return integer
+ */
+ public function getLastColumn($project_id)
+ {
+ return $this->db->table(self::TABLE)->eq('project_id', $project_id)->desc('position')->findOneColumn('id');
+ }
+
+ /**
* Get the list of columns sorted by position [ column_id => title ]
*
* @access public