* finish task #6849.

This commit is contained in:
wangyidong
2020-02-05 10:06:14 +08:00
parent 4d464543b3
commit 4db7034029
6 changed files with 29 additions and 14 deletions
+4 -2
View File
@@ -92,6 +92,7 @@ class task extends control
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
setcookie('lastTaskModule', (int)$this->post->module, $this->config->cookieLife, $this->config->webRoot, '', false, false);
if($this->post->project) $projectID = $this->post->project;
$tasksID = $this->task->create($projectID);
if(dao::isError())
@@ -176,12 +177,13 @@ class task extends control
$members = $this->project->getTeamMemberPairs($projectID, 'nodeleted');
$showAllModule = isset($this->config->project->task->allModule) ? $this->config->project->task->allModule : '';
$moduleOptionMenu = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : '');
$task->module = $task->module ? $task->module : (int)$this->cookie->lastTaskModule;
/* Fix bug #2737. When moduleID is not story module. */
$moduleIdList = array();
if($moduleID)
if($task->module)
{
$moduleID = $this->tree->getStoryModule($moduleID);
$moduleID = $this->tree->getStoryModule($task->module);
$moduleIdList = $this->tree->getAllChildID($moduleID);
}
$stories = $this->story->getProjectStoryPairs($projectID, 0, 0, $moduleIdList);