Merge branch 'zentaopms_239_tanghucheng' into 'zentaopms_239'

* Finish task #69009.69010.

See merge request easycorp/zentaopms!5350
This commit is contained in:
刘刚
2022-09-15 06:43:45 +00:00
3 changed files with 9 additions and 1 deletions
+2
View File
@@ -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,';
+6
View File
@@ -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)
{
+1 -1
View File
@@ -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')