This commit is contained in:
zhouxin
2022-03-30 05:11:32 +00:00
parent cd5ac50b6f
commit a8d3ff2801
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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');
+2 -2
View File
@@ -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);