From 4eaf187aab5ed02f1973f3660b119358c6610630 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 15 Sep 2022 08:58:12 +0800 Subject: [PATCH 1/2] * Finish task #69010. --- module/execution/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 32b6aaa4e0..a86ab95200 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1604,7 +1604,7 @@ class executionModel extends model ->beginIF($limit)->limit($limit)->fi() ->fetchAll('id'); - if(isset($project->model) and $project->model == 'waterfall') + if(isset($project->model) and $project->model == 'waterfall' and $project->hasProduct) { $executionList = array(); $executionProducts = $this->dao->select('t1.project,t1.product')->from(TABLE_PROJECTPRODUCT)->alias('t1') From 9b6274739668f7f951accdbb3407678b0cbc9de7 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 15 Sep 2022 14:24:08 +0800 Subject: [PATCH 2/2] * Finish task #69009. --- module/datatable/config.php | 2 ++ module/datatable/model.php | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/module/datatable/config.php b/module/datatable/config.php index 0c2c0fdbb0..3909fefff3 100644 --- a/module/datatable/config.php +++ b/module/datatable/config.php @@ -6,3 +6,5 @@ $config->datatable->moduleAlias['testtask-cases'] = 'testcase'; $config->datatable->moduleAlias['program-project'] = 'project'; $config->datatable->moduleAlias['project-bug'] = 'bug'; $config->datatable->moduleAlias['execution-bug'] = 'bug'; + +$config->datatable->noProductModule = ',review,'; diff --git a/module/datatable/model.php b/module/datatable/model.php index e69834e266..49267b9bf6 100644 --- a/module/datatable/model.php +++ b/module/datatable/model.php @@ -23,6 +23,12 @@ class datatableModel extends model public function getFieldList($module) { if(!isset($this->config->$module)) $this->loadModel($module); + if($this->session->hasProduct == 0 and (strpos($this->config->datatable->noProductModule, ",$module,") !== false)) + { + $productIndex = array_search('product', $this->config->$module->datatable->defaultField); + if($productIndex) unset($this->config->$module->datatable->defaultField[$productIndex]); + if(isset($this->config->$module->datatable->fieldList['product'])) unset($this->config->$module->datatable->fieldList['product']); + } if($this->session->currentProductType === 'normal') unset($this->config->$module->datatable->fieldList['branch']); foreach($this->config->$module->datatable->fieldList as $field => $items) {