summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/TaskFinder.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index 6a19eeec..42f2f273 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -173,6 +173,18 @@ class TaskFinder extends Base
}
/**
+ * Get project id for a given task
+ *
+ * @access public
+ * @param integer $task_id Task id
+ * @return integer
+ */
+ public function getProjectId($task_id)
+ {
+ return (int) $this->db->table(Task::TABLE)->eq('id', $task_id)->findOneColumn('project_id') ?: 0;
+ }
+
+ /**
* Fetch a task by the id
*
* @access public