diff --git a/module/execution/model.php b/module/execution/model.php index fdfc3479c8..f41cb77cef 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1433,7 +1433,8 @@ class executionModel extends model ->beginIF($projectID)->andWhere('project')->eq((int)$projectID)->fi() ->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 != 'all' and $status != 'undone' and $status != 'noclosed')->andWhere('status')->in($status)->fi() + ->beginIF(empty($this->config->CRExecution))->andWhere('status')->ne('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 eb7277686d..48a4c80676 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -291,7 +291,7 @@ class task extends control /* Set Custom*/ foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field; - $executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, !common::canModify('execution', $execution) ? 'noclosed' : 'all', 0, true); + $executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, empty($this->config->CRExecution) ? 'noclosed' : 'all', 0, true); $this->view->customFields = $customFields; $this->view->showFields = $this->config->task->custom->createFields;