From 8eef5aa4e8963e72966a5cff48a066b14bf90258 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Fri, 5 Mar 2021 11:29:15 +0800 Subject: [PATCH] * Modify user module bug. --- module/user/control.php | 3 ++- module/user/model.php | 4 ++-- module/user/view/execution.html.php | 10 +++++----- module/user/view/task.html.php | 8 ++++---- module/user/view/testtask.html.php | 4 ++-- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/module/user/control.php b/module/user/control.php index d25811ee23..c77da64bed 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -25,6 +25,7 @@ class user extends control $this->loadModel('company')->setMenu(); $this->loadModel('dept'); $this->loadModel('todo'); + $this->loadModel('execution'); $this->app->loadLang('project'); $this->app->loadModuleConfig($this->moduleName);//Finish task #5118.(Fix bug #2271) } @@ -385,7 +386,7 @@ class user extends control $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->execution; $this->view->position[] = $this->lang->user->execution; $this->view->tabID = 'project'; - $this->view->executions = $this->user->getProjects($account, array('sprint', 'stage'), 'all', $pager); + $this->view->executions = $this->user->getProjects($account, 'execution', 'all', $pager); $this->view->user = $user; $this->view->pager = $pager; diff --git a/module/user/model.php b/module/user/model.php index bff89fe824..ee31789cd9 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -1018,7 +1018,7 @@ class userModel extends model * Get projects a user participated. * * @param string $account - * @param string $type + * @param string $type project|execution * @param string $status * @access public * @return array @@ -1049,7 +1049,7 @@ class userModel extends model $hours = array(); $emptyHour = array('totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0, 'waitTasks' => 0, 'assignedToMeTasks' => 0); $searchField = $type == 'project' ? 'project' : 'execution'; - $tasks = $this->dao->select('id, project, project, consumed, `left`, status, assignedTo') + $tasks = $this->dao->select('id, project, execution, consumed, `left`, status, assignedTo') ->from(TABLE_TASK) ->where('parent')->lt(1) ->andWhere($searchField)->in($projectIdList)->fi() diff --git a/module/user/view/execution.html.php b/module/user/view/execution.html.php index ac9013c816..9ebdaaa049 100644 --- a/module/user/view/execution.html.php +++ b/module/user/view/execution.html.php @@ -22,15 +22,15 @@ user->name;?> statusAB;?> team->role;?> - project->begin;?> - project->end;?> + execution->begin;?> + execution->end;?> team->join;?> team->hours;?> - createLink('project', 'view', "projectID=$execution->id", '', false, $execution->project);?> + createLink('execution', 'view', "executionID=$execution->id", '', false, $execution->project);?> id);?> @@ -38,9 +38,9 @@ name);?> delay)):?> - project->delayed;?> + execution->delayed;?> - processStatus('project', $execution);?> + processStatus('execution', $execution);?> role;?> begin;?> diff --git a/module/user/view/task.html.php b/module/user/view/task.html.php index 7f2c1dc30e..e5b5b4c655 100644 --- a/module/user/view/task.html.php +++ b/module/user/view/task.html.php @@ -56,15 +56,15 @@ createLink('task', 'view', "taskID=$task->id", '', false, $task->project), sprintf('%03d', $task->id));?> task->priList, $task->pri, $task->pri);?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri)?> - createLink('project', 'browse', "projectid=$task->projectID", '', false, $task->project), $task->projectName);?> + createLink('execution', 'browse', "projectid=$task->projectID", '', false, $task->project), $task->projectName);?> team)) echo '' . $this->lang->task->multipleAB . ' ';?> parent > 0) echo '' . $this->lang->task->childrenAB . ' ';?> createLink('task', 'view', "taskID=$task->id", '', false, $task->project), $task->name, null, "style='color: $task->color'");?> - estimate . ' ' . $lang->project->workHourUnit;?> - consumed . ' ' . $lang->project->workHourUnit;?> - left . ' ' . $lang->project->workHourUnit;?> + estimate . ' ' . $lang->execution->workHourUnit;?> + consumed . ' ' . $lang->execution->workHourUnit;?> + left . ' ' . $lang->execution->workHourUnit;?> delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?> processStatus('task', $task);?> diff --git a/module/user/view/testtask.html.php b/module/user/view/testtask.html.php index 774b100ef7..d81b0e4705 100755 --- a/module/user/view/testtask.html.php +++ b/module/user/view/testtask.html.php @@ -29,7 +29,7 @@ idAB);?> testtask->name);?> - testtask->project);?> + testtask->execution);?> testtask->build);?> testtask->begin);?> testtask->end);?> @@ -41,7 +41,7 @@ createLink('testtask', 'view', "taskID=$task->id", '', false, $task->project), sprintf('%03d', $task->id));?> createLink('testtask', 'view', "taskID=$task->id", '', false, $task->project), $task->name);?> - projectName?> + executionName?> build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build", '', false, $task->project), $task->buildName));?> begin?> end?>