diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Api/Task.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/Api/Task.php b/app/Api/Task.php index c98b24a6..d7a9e91b 100644 --- a/app/Api/Task.php +++ b/app/Api/Task.php @@ -17,6 +17,11 @@ class Task extends Base return $this->taskFinder->getById($task_id); } + public function getTaskByReference($project_id, $reference) + { + return $this->taskFinder->getByReference($project_id, $reference); + } + public function getAllTasks($project_id, $status_id = TaskModel::STATUS_OPEN) { return $this->taskFinder->getAll($project_id, $status_id); @@ -50,7 +55,7 @@ class Task extends Base public function createTask($title, $project_id, $color_id = '', $column_id = 0, $owner_id = 0, $creator_id = 0, $date_due = '', $description = '', $category_id = 0, $score = 0, $swimlane_id = 0, $recurrence_status = 0, $recurrence_trigger = 0, $recurrence_factor = 0, $recurrence_timeframe = 0, - $recurrence_basedate = 0) + $recurrence_basedate = 0, $reference = '') { $values = array( 'title' => $title, @@ -69,6 +74,7 @@ class Task extends Base 'recurrence_factor' => $recurrence_factor, 'recurrence_timeframe' => $recurrence_timeframe, 'recurrence_basedate' => $recurrence_basedate, + 'reference' => $reference, ); list($valid,) = $this->taskValidator->validateCreation($values); @@ -79,7 +85,7 @@ class Task extends Base public function updateTask($id, $title = null, $project_id = null, $color_id = null, $column_id = null, $owner_id = null, $creator_id = null, $date_due = null, $description = null, $category_id = null, $score = null, $swimlane_id = null, $recurrence_status = null, $recurrence_trigger = null, $recurrence_factor = null, - $recurrence_timeframe = null, $recurrence_basedate = null) + $recurrence_timeframe = null, $recurrence_basedate = null, $reference = null) { $values = array( 'id' => $id, @@ -99,6 +105,7 @@ class Task extends Base 'recurrence_factor' => $recurrence_factor, 'recurrence_timeframe' => $recurrence_timeframe, 'recurrence_basedate' => $recurrence_basedate, + 'reference' => $reference, ); foreach ($values as $key => $value) { |