diff --git a/module/task/control.php b/module/task/control.php index 0fe10c509b..80779e7d5a 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -75,9 +75,9 @@ class task extends control $stories = $this->story->getProjectStoryPairs($projectID); $members = $this->project->getTeamMemberPairs($projectID, 'nodeleted'); $moduleOptionMenu = $this->tree->getOptionMenu($projectID, $viewType = 'task'); - $header['title'] = $project->name . $this->lang->colon . $this->lang->task->create; - $position[] = html::a($taskLink, $project->name); - $position[] = $this->lang->task->create; + $header['title'] = $project->name . $this->lang->colon . $this->lang->task->create; + $position[] = html::a($taskLink, $project->name); + $position[] = $this->lang->task->create; $this->view->header = $header; $this->view->position = $position; $this->view->project = $project; @@ -260,6 +260,7 @@ class task extends control if($showSuhosinInfo) $this->view->suhosinInfo = $this->lang->suhosinInfo; $this->view->projectID = $project->id; + $this->view->modules = $this->tree->getOptionMenu($projectID, $viewType = 'task'); $this->view->editedTasks = $editedTasks; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->members = $this->project->getTeamMemberPairs($projectID, 'nodeleted'); diff --git a/module/task/model.php b/module/task/model.php index ca7465e497..fef11e98cf 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -230,6 +230,7 @@ class taskModel extends model $oldTask = $this->getById($taskID); $task->name = htmlspecialchars($this->post->names[$taskID]); + $task->module = $this->post->modules[$taskID]; $task->assignedTo = $this->post->assignedTos[$taskID]; $task->type = $this->post->types[$taskID]; $task->status = $this->post->statuses[$taskID]; @@ -248,36 +249,39 @@ class taskModel extends model $task->lastEditedDate = $now; if(isset($this->post->assignedTos[$taskID])) { - $task->assignedDate = $this->post->assignedTos[$taskID] == $oldTask->assignedTo ? $oldTask->assignedDate : $now; + $task->assignedDate = $this->post->assignedTos[$taskID] == $oldTask->assignedTo ? $oldTask->assignedDate : $now; } switch($task->status) { - case 'done': - { - $task->left = 0; - if(!$task->finishedBy) $task->finishedBy = $this->app->user->account; - if(!$task->finishedDate) $task->finishedDate = $now; - }break; - case 'cancel': - { - $task->assignedTo = $oldTask->openedBy; - $task->assignedDate = $now; + case 'done': + { + $task->left = 0; + if(!$task->finishedBy) $task->finishedBy = $this->app->user->account; + if(!$task->finishedDate) $task->finishedDate = $now; + } + break; + case 'cancel': + { + $task->assignedTo = $oldTask->openedBy; + $task->assignedDate = $now; - if(!$task->canceledBy) $task->canceledBy = $this->app->user->account; - if(!$task->canceledDate) $task->canceledDate = $now; - }break; - case 'closed': - { - if(!$task->closedBy) $task->closedBy = $this->app->user->account; - if(!$task->closedDate) $task->closedDate = $now; - }break; - case 'wait': - { - if($task->consumed > 0 and $task->left > 0) $task->status = 'doing'; - if($task->left == $oldTask->left and $task->consumed == 0) $task->left = $task->estimate; - } - default:break; + if(!$task->canceledBy) $task->canceledBy = $this->app->user->account; + if(!$task->canceledDate) $task->canceledDate = $now; + } + break; + case 'closed': + { + if(!$task->closedBy) $task->closedBy = $this->app->user->account; + if(!$task->closedDate) $task->closedDate = $now; + } + break; + case 'wait': + { + if($task->consumed > 0 and $task->left > 0) $task->status = 'doing'; + if($task->left == $oldTask->left and $task->consumed == 0) $task->left = $task->estimate; + } + default:break; } if($task->assignedTo) $task->assignedDate = $now; diff --git a/module/task/view/batchedit.html.php b/module/task/view/batchedit.html.php index 93ca360a20..8bbce7e7da 100755 --- a/module/task/view/batchedit.html.php +++ b/module/task/view/batchedit.html.php @@ -16,40 +16,40 @@