From a8d3ff28012ca8d64199067a4f9b5d71e5e30df8 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Wed, 30 Mar 2022 05:11:32 +0000 Subject: [PATCH] * Fix bug #17322. --- module/execution/model.php | 4 ++-- module/project/control.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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);