diff --git a/module/execution/model.php b/module/execution/model.php index d8ef1cbec0..a650985fc1 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1260,7 +1260,7 @@ class executionModel extends model * @access public * @return array */ - public function getByProject($projectID, $status = 'all', $limit = 0, $pairs = false, $onlyCanBuild = false) + public function getByProject($projectID, $status = 'all', $limit = 0, $pairs = false, $devel = false) { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getExecutionPairs(); @@ -1274,7 +1274,7 @@ 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($onlyCanBuild === true)->andWhere('attribute')->in('dev,qa,release')->fi() + ->beginIF($devel === true)->andWhere('attribute')->in('dev,qa,release')->fi() ->orderBy($orderBy) ->beginIF($limit)->limit($limit)->fi() ->fetchAll('id'); diff --git a/module/project/control.php b/module/project/control.php index 9516399efd..55c535c0b7 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1128,8 +1128,8 @@ class project extends control $queryID = ($type == 'bysearch') ? (int)$param : 0; $actionURL = $this->createLink('project', 'build', "projectID=$projectID&type=bysearch&queryID=myQueryID"); - $onlyCanBuild = $project->model == 'waterfall' ? true : false; - $executions = $this->loadModel('execution')->getByProject($projectID, 'all', '', true, $onlyCanBuild); + $devel = $project->model == 'waterfall' ? true : false; + $executions = $this->loadModel('execution')->getByProject($projectID, 'all', '', true, $devel); $this->config->build->search['fields']['execution'] = $this->project->lang->executionCommon; $this->config->build->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $executions);