diff --git a/app/Controller/Task.php b/app/Controller/Task.php index bb8596790..162b0ddde 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -619,4 +619,16 @@ class Task extends Base 'transitions' => $this->transition->getAllByTask($task['id']), ))); } + + /** + * Set automatically the start date + * + * @access public + */ + public function start() + { + $task = $this->getTask(); + $this->taskModification->update(array('id' => $task['id'], 'date_started' => time())); + $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']))); + } } diff --git a/app/Template/task/time.php b/app/Template/task/time.php index 9e024c7f1..90407d7a9 100644 --- a/app/Template/task/time.php +++ b/app/Template/task/time.php @@ -1,4 +1,9 @@