diff --git a/module/execution/model.php b/module/execution/model.php index a3cd81a58c..428699a89a 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1275,7 +1275,6 @@ class executionModel extends model ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() ->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi() ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi() - ->beginIF($status == 'noclosed')->andWhere('status')->notIN('closed')->fi() ->beginIF($devel === true)->andWhere('attribute')->in('dev,qa,release')->fi() ->orderBy($orderBy) ->beginIF($limit)->limit($limit)->fi() diff --git a/module/task/control.php b/module/task/control.php index 7b74025041..cc7f11ce6c 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -44,8 +44,7 @@ class task extends control $extra = str_replace(array(',', ' '), array('&', ''), $extra); parse_str($extra, $output); - $execution = $this->execution->getById($executionID); - $executions = $this->execution->getPairs(0, 'all', !common::canModify('execution', $execution) ? 'noclosed' : ''); + $executions = $this->execution->getPairs(0, 'all', 'noclosed'); $executionID = $this->execution->saveState($executionID, $executions); $this->execution->setMenu($executionID); @@ -84,6 +83,7 @@ class task extends control $task->desc = $todo->desc; } + $execution = $this->execution->getById($executionID); $taskLink = $this->createLink('execution', 'browse', "executionID=$executionID&tab=task"); $this->loadModel('kanban'); @@ -272,7 +272,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, !common::canModify('execution', $execution) ? 'noclosed' : 'all', 0, true); + $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, 'undone', 0, true); $this->view->task = $task; $this->view->users = $users; $this->view->storyID = $storyID;