From 5df0b941b1646da906278a1e5ddc916276ca0766 Mon Sep 17 00:00:00 2001 From: wangyuting <851424971@qq.com> Date: Fri, 18 Nov 2022 02:51:50 +0000 Subject: [PATCH] * Fix bug #29959. --- module/product/control.php | 5 +++-- module/project/control.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index 0a93b24502..f20461fef2 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -945,10 +945,11 @@ class product extends control * @param string $number * @param int $executionID * @param string $from showImport + * @param string mode * @access public * @return void */ - public function ajaxGetExecutions($productID, $projectID = 0, $branch = 0, $number = '', $executionID = 0, $from = '') + public function ajaxGetExecutions($productID, $projectID = 0, $branch = 0, $number = '', $executionID = 0, $from = '', $mode = '') { if($this->app->tab == 'execution' and $this->session->execution) { @@ -956,7 +957,7 @@ class product extends control if($execution->type == 'kanban') $projectID = $execution->project; } - $mode = ($from == 'bugToTask' or empty($this->config->CRExecution)) ? 'noclosed' : ''; + $mode .= ($from == 'bugToTask' or empty($this->config->CRExecution)) ? 'noclosed' : ''; $mode .= !$projectID ? ',multiple' : ''; $executions = $from == 'showImport' ? $this->product->getAllExecutionPairsByProduct($productID, $branch, $projectID) : $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, $mode); if($this->app->getViewType() == 'json') return print(json_encode($executions)); diff --git a/module/project/control.php b/module/project/control.php index ca5bebc660..cd153dbc41 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -2295,12 +2295,13 @@ class project extends control * * @param int $projectID * @param int $executionID + * @param string $mode * @access public * @return void */ - public function ajaxGetExecutions($projectID, $executionID = 0) + public function ajaxGetExecutions($projectID, $executionID = 0, $mode = '') { - $executions = array('' => '') + $this->loadModel('execution')->getPairs($projectID, 'all'); + $executions = array('' => '') + $this->loadModel('execution')->getPairs($projectID, 'all', $mode); if($this->app->getViewType() == 'json') return print(json_encode($executionList)); return print(html::select('execution', $executions, $executionID, "class='form-control'"));