Merge branch 'zentaopms_263_bug_#30020' into 'master'

* Fix bug #30020.

See merge request easycorp/zentaopms!6385
This commit is contained in:
王怡栋
2022-11-25 07:40:55 +00:00
2 changed files with 4 additions and 12 deletions
+1 -2
View File
@@ -2241,8 +2241,7 @@ class project extends control
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($allProducts), 'ignoreNormal|noclosed');
if($this->config->systemMode == 'ALM')
{
$paths = explode(',', trim($project->path, ','));
$topProgramID = count($paths) > 1 ? $this->program->getTopByPath($project->path) : 0;
$topProgramID = $project->parent ? $this->program->getTopByPath($project->path) : 0;
$productsGroupByProgram = $this->product->getProductsGroupByProgram();
$currentProducts = array();
+3 -10
View File
@@ -187,12 +187,12 @@ class upgrade extends control
$selectMode = false;
}
if(version_compare($openVersion, '15_0', '>=') and $systemMode == 'new')
if(version_compare($openVersion, '15_0_rc1', '>=') and $systemMode == 'new')
{
$this->loadModel('setting')->setItem('system.common.global.mode', 'ALM');
$selectMode = false;
}
if(version_compare($openVersion, '18_0', '>=')) $selectMode = false;
if(version_compare($openVersion, '18_0_beta1', '>=')) $selectMode = false;
if($selectMode) $this->locate(inlink('to18Guide', "fromVersion=$fromVersion"));
@@ -241,16 +241,9 @@ class upgrade extends control
/* Set default program for product and project with no program. */
$this->upgrade->relateDefaultProgram($programID);
if(version_compare($openVersion, '15_0', '<')) $this->locate(inlink('selectMergeMode', "fromVersion=$fromVersion&mode=light"));
$this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
}
if($mode == 'ALM')
{
if(version_compare($openVersion, '15_0', '<')) $this->locate(inlink('selectMergeMode', "fromVersion=$fromVersion&mode=ALM"));
$this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
}
$this->locate(inlink('selectMergeMode', "fromVersion=$fromVersion&mode=$mode"));
}
list($disabledFeatures, $enabledScrumFeatures, $disabledScrumFeatures) = $this->loadModel('custom')->computeFeatures();