From f5d987b55d837f69491cf081729c5a43d7cd5fb7 Mon Sep 17 00:00:00 2001 From: daitingting Date: Tue, 11 Oct 2022 05:17:07 +0000 Subject: [PATCH] * Fix bugs of mutual_test. --- module/bug/control.php | 7 ++----- module/bug/view/create.html.php | 2 +- module/build/view/create.html.php | 6 +----- module/execution/model.php | 19 +++++++++++++++---- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index d8c58534e6..697abc4ce9 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -165,7 +165,7 @@ class bug extends control $pager = new pager($recTotal, $recPerPage, $pageID); /* Get executios. */ - $executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'empty|withdelete'); + $executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'empty|withdelete|hideMultiple'); /* Get product id list. */ $productIDList = $productID ? $productID : array_keys($this->products); @@ -341,10 +341,7 @@ class bug extends control } else if($this->app->tab == 'project') { - if(isset($output['projectID'])) - { - $this->loadModel('project')->setMenu($output['projectID']); - } + if(isset($output['projectID'])) $this->loadModel('project')->setMenu($output['projectID']); } else { diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index bf2bc755a2..a580ad1429 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -116,7 +116,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
- multiple) ? 'hidden' : '';?> + multiple) ? 'hidden' : '';?>
bug->kanban : $lang->bug->execution;?> diff --git a/module/build/view/create.html.php b/module/build/view/create.html.php index ae4da00315..afec7286f9 100644 --- a/module/build/view/create.html.php +++ b/module/build/view/create.html.php @@ -20,14 +20,10 @@
tab == 'project'):?> - - + - - - diff --git a/module/execution/model.php b/module/execution/model.php index 1a6f315ade..1925eedc9e 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1304,16 +1304,27 @@ class executionModel extends model { if(strpos($mode, 'noclosed') !== false and ($execution->status == 'done' or $execution->status == 'closed')) continue; if(strpos($mode, 'stagefilter') !== false and isset($executionModel) and $executionModel == 'waterfall' and in_array($execution->attribute, array('request', 'design', 'review'))) continue; // Some stages of waterfall not need. + if(empty($execution->multiple)) $noMultiples[$execution->id] = $execution->project; + $pairs[$execution->id] = $execution->name; } + if($noMultiples) { - $this->app->loadLang('project'); - $noMultipleProjects = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($noMultiples)->fetchPairs('id', 'name'); - foreach($noMultiples as $executionID => $projectID) + if(strpos($mode, 'hideMultiple') !== false) { - if(isset($noMultipleProjects[$projectID])) $pairs[$executionID] = $noMultipleProjects[$projectID] . "({$this->lang->project->disableExecution})"; + foreach($noMultiples as $executionID => $projectID) $pairs[$executionID] = ''; + } + else + { + $this->app->loadLang('project'); + $noMultipleProjects = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('id')->in($noMultiples)->fetchPairs('id', 'name'); + + foreach($noMultiples as $executionID => $projectID) + { + if(isset($noMultipleProjects[$projectID])) $pairs[$executionID] = $noMultipleProjects[$projectID] . "({$this->lang->project->disableExecution})"; + } } }
executionCommon;?>
build->product;?>