diff --git a/module/task/control.php b/module/task/control.php index 1f84b009b8..a5d9b6d753 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -444,7 +444,7 @@ class task extends control $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->members = $this->user->getTeamMemberPairs($task->execution, 'execution', 'nodeleted'); $this->view->assignedTo = !empty($task->team) ? $this->task->getAssignedTo4Multi($task->team, $task) : $assignedTo; - $this->view->canRecordEffort = $this->taskZen->checkRecordEffort($task); + $this->view->canRecordEffort = $this->task->canOperateEffort($task); $this->view->currentTeam = $currentTeam; $this->display(); } @@ -601,7 +601,7 @@ class task extends control $this->view->title = $this->view->execution->name . $this->lang->colon .$this->lang->task->finish; $this->view->members = $members; $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->canRecordEffort = $this->taskZen->checkRecordEffort($task); + $this->view->canRecordEffort = $this->task->canOperateEffort($task); $this->display(); } @@ -698,7 +698,7 @@ class task extends control $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->members = $this->loadModel('user')->getTeamMemberPairs($task->execution, 'execution', 'nodeleted'); $this->view->assignedTo = $task->assignedTo == '' ? $this->app->user->account : $task->assignedTo; - $this->view->canRecordEffort = $this->taskZen->checkRecordEffort($task); + $this->view->canRecordEffort = $this->task->canOperateEffort($task); $this->view->currentTeam = $currentTeam; $this->display(); } diff --git a/module/task/zen.php b/module/task/zen.php index 522cb9936c..67fb7b1589 100644 --- a/module/task/zen.php +++ b/module/task/zen.php @@ -1039,22 +1039,6 @@ class taskZen extends task return !dao::isError(); } - /** - * 检查是否能记录任务的日志。 - * Check if the task effort can be recorded. - * - * @param object $task - * @access protected - * @return bool - */ - protected function checkRecordEffort(object $task): bool - { - if(empty($task->team)) return true; - if($task->assignedTo != $this->app->user->account && $task->mode == 'linear') return false; - if(!isset($task->members[$this->app->user->account])) return false; - return true; - } - /** * 为表单获取自定义字段。 * Get task's custom fields for form.