From 1162b8fd055ecdf780c8ae0d6dce016a5a3f5cc3 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Tue, 16 Mar 2021 15:30:18 +0800 Subject: [PATCH] * Finish task #36754. --- module/execution/model.php | 13 +++---------- module/my/view/task.html.php | 9 ++++++++- module/task/control.php | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 3fb4ce87bf..bfcd233efd 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2213,14 +2213,10 @@ class executionModel extends model { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembers(); - $execution = $this->getByID($executionID); - $type = $this->config->systemMode == 'new' ? $execution->type : 'execution'; - if(empty($execution)) return array(); - return $this->dao->select("t1.*, t1.hours * t1.days AS totalHours, t2.id as userID, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1') ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account') ->where('t1.root')->eq((int)$executionID) - ->andWhere('t1.type')->eq($type) + ->andWhere('t1.type')->eq('execution') ->andWhere('t2.deleted')->eq('0') ->fetchAll('account'); } @@ -2239,14 +2235,11 @@ class executionModel extends model if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs(); $this->app->loadConfig('user'); - $execution = $this->getByID($executionID); - if(empty($execution)) return array(); - $keyField = strpos($params, 'useid') !== false ? 'id' : 'account'; $users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1') ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account') ->where('t1.root')->eq((int)$executionID) - ->andWhere('t1.type')->eq($execution->type) + ->andWhere('t1.type')->eq('execution') ->beginIF($params == 'nodeleted' or empty($this->config->user->showDeleted)) ->andWhere('t2.deleted')->eq(0) ->fi() @@ -2344,7 +2337,7 @@ class executionModel extends model $data = (array)fixer::input('post')->get(); extract($data); - $executionType = $execution->type; + $executionType = strpos('sprint|stage', $execution->type) !== false ? 'execution' : $execution->type; $accounts = array_unique($accounts); $limited = array_values($limited); $oldJoin = $this->dao->select('`account`, `join`')->from(TABLE_TEAM)->where('root')->eq((int)$executionID)->andWhere('type')->eq($executionType)->fetchPairs(); diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index 74fbc708dd..f35238ad15 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -199,11 +199,18 @@