Add icon to set automatically the start date

This commit is contained in:
Frederic Guillot
2015-07-07 19:29:39 -04:00
parent 58297ca3b1
commit 4807f3e8a0
5 changed files with 44 additions and 0 deletions

View File

@@ -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'])));
}
}