From fda9efd09c560a04d41c9ac8af606ccdec198faa Mon Sep 17 00:00:00 2001 From: Yagami Date: Thu, 2 Mar 2023 16:05:35 +0800 Subject: [PATCH] * Remove request stages in bug batch-create page. --- module/bug/config.php | 2 +- module/bug/control.php | 2 +- module/product/control.php | 2 +- module/product/model.php | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 module/bug/config.php mode change 100644 => 100755 module/product/model.php diff --git a/module/bug/config.php b/module/bug/config.php old mode 100644 new mode 100755 index 060992e9ab..d9c707e2f2 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -223,7 +223,7 @@ $config->bug->datatable->fieldList['execution']['title'] = 'execution'; $config->bug->datatable->fieldList['execution']['fixed'] = 'no'; $config->bug->datatable->fieldList['execution']['width'] = '120'; $config->bug->datatable->fieldList['execution']['required'] = 'no'; -$config->bug->datatable->fieldList['execution']['dataSource'] = array('module' => 'product', 'method' =>'getAllExecutionPairsByProduct', 'params' => '$productID&$branch'); +$config->bug->datatable->fieldList['execution']['dataSource'] = array('module' => 'product', 'method' =>'getAllExecutionPairsByProduct', 'params' => '$productID&$branch&0&stagefilter'); $config->bug->datatable->fieldList['plan']['title'] = 'plan'; $config->bug->datatable->fieldList['plan']['fixed'] = 'no'; diff --git a/module/bug/control.php b/module/bug/control.php index f9727a0d45..94660d0e2b 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -859,7 +859,7 @@ class bug extends control $this->view->users = $this->user->getPairs('devfirst|noclosed'); $this->view->projects = array('' => '') + $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID); $this->view->projectID = $projectID; - $this->view->executions = array('' => '') + $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID, 'multiple'); + $this->view->executions = array('' => '') + $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID, 'multiple,stagefilter'); $this->view->executionID = $executionID; $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch === 'all' ? 0 : $branch); $this->view->moduleID = $moduleID; diff --git a/module/product/control.php b/module/product/control.php index e4ac5a9fe4..fd081a90cd 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -1031,7 +1031,7 @@ class product extends control public function ajaxGetExecutionsByProject($productID, $projectID = 0, $branch = 0, $number = 0) { $noMultipleExecutionID = $projectID ? $this->loadModel('execution')->getNoMultipleID($projectID) : ''; - $executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, 'multiple'); + $executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, 'multiple,stagefilter'); $disabled = $noMultipleExecutionID ? "disabled='disabled'" : ''; $html = html::select("executions[{$number}]", array('' => '') + $executions, 0, "class='form-control' onchange='loadExecutionBuilds($productID, this.value, $number)' $disabled"); diff --git a/module/product/model.php b/module/product/model.php old mode 100644 new mode 100755 index 4461499a2b..5494bb053d --- a/module/product/model.php +++ b/module/product/model.php @@ -1537,6 +1537,8 @@ class productModel extends model if($projectID) $executions = $this->loadModel('execution')->resetExecutionSorts($executions); foreach($executions as $execution) { + if(strpos($mode, 'stagefilter') !== false and in_array($execution->attribute, array('request', 'design', 'review'))) continue; + if(isset($execution->children)) { $executionPairs = $executionPairs + $execution->children; @@ -1544,7 +1546,6 @@ class productModel extends model } /* Some stage of waterfall not need.*/ - if(strpos($mode, 'stagefilter') !== false and in_array($execution->attribute, array('request', 'design', 'review'))) continue; if(isset($projectPairs[$execution->project])) $executionPairs[$execution->id] = $projectPairs[$execution->project] . '/' . $execution->name; }