From 7882690c4988999d5f3ccb6f912e1ea7e01d7045 Mon Sep 17 00:00:00 2001 From: sunjun Date: Thu, 30 Jun 2022 09:16:49 +0000 Subject: [PATCH] fixbug_22007 --- module/task/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 225a1bbf1f..e46a6399c5 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -44,7 +44,8 @@ class task extends control $extra = str_replace(array(',', ' '), array('&', ''), $extra); parse_str($extra, $output); - $executions = $this->execution->getPairs(0, 'all', 'noclosed'); + $execution = $this->execution->getById($executionID); + $executions = $this->execution->getPairs(0, 'all', !common::canModify('execution', $execution) ? 'noclosed' : ''); $executionID = $this->execution->saveState($executionID, $executions); $this->execution->setMenu($executionID); @@ -92,7 +93,6 @@ class task extends control $task->assignedTo = array($bug->assignedTo); } - $execution = $this->execution->getById($executionID); $taskLink = $this->createLink('execution', 'browse', "executionID=$executionID&tab=task"); $this->loadModel('kanban'); @@ -283,7 +283,7 @@ class task extends control $this->view->position = $position; $this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'task', "executionID=$executionID") : ''; $this->view->execution = $execution; - $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, 'undone', 0, true); + $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, !common::canModify('execution', $execution) ? 'noclosed' : 'all', 0, true); $this->view->task = $task; $this->view->users = $users; $this->view->storyID = $storyID;