* finish task #3588.
This commit is contained in:
+16
-1
@@ -39,10 +39,11 @@ class task extends control
|
||||
* @param int $storyID
|
||||
* @param int $moduleID
|
||||
* @param int $taskID
|
||||
* @param int $todoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($projectID = 0, $storyID = 0, $moduleID = 0, $taskID = 0)
|
||||
public function create($projectID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0)
|
||||
{
|
||||
$task = new stdClass();
|
||||
$task->module = $moduleID;
|
||||
@@ -63,6 +64,14 @@ class task extends control
|
||||
$projectID = $task->project;
|
||||
}
|
||||
|
||||
if($todoID > 0)
|
||||
{
|
||||
$todo = $this->loadModel('todo')->getById($todoID);
|
||||
$task->name = $todo->name;
|
||||
$task->pri = $todo->pri;
|
||||
$task->desc = $todo->desc;
|
||||
}
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
$taskLink = $this->createLink('project', 'browse', "projectID=$projectID&tab=task");
|
||||
$storyLink = $this->session->storyList ? $this->session->storyList : $this->createLink('project', 'story', "projectID=$projectID");
|
||||
@@ -115,6 +124,12 @@ class task extends control
|
||||
$this->send($response);
|
||||
}
|
||||
|
||||
if($todoID > 0)
|
||||
{
|
||||
$this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec();
|
||||
$this->action->create('todo', $todoID, 'finished', '', "TASK:$taskID");
|
||||
}
|
||||
|
||||
/* Locate the browser. */
|
||||
if($this->post->after == 'continueAdding')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user