* Optimize code.

This commit is contained in:
wangyuting2
2022-09-15 03:22:36 +00:00
parent 392aa32c00
commit 74a5adef7d
7 changed files with 132 additions and 82 deletions
+1 -1
View File
@@ -645,7 +645,7 @@ class upgrade extends control
$mode = $this->post->mode;
if($mode == 'project') echo 'execute mergeData method';
if($mode == 'execution') echo 'execute mergeData method';
if($mode == 'manual') $this->locate(inlink('mergeProgram'));
if($mode == 'manually') $this->locate(inlink('mergeProgram'));
$this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
}
+32 -20
View File
@@ -99,26 +99,29 @@ $lang->upgrade->to15Mode['new'] = 'Use the program mode';
$lang->upgrade->selectedModeTips['classic'] = 'You can also switch to the Program mode in the Admin-Custom-Custom later.';
$lang->upgrade->selectedModeTips['new'] = 'Switching to the program management mode requires merging the previous data, and the system will guide you to complete this operation.';
$lang->upgrade->line = 'Product Line';
$lang->upgrade->allLines = "All Product Lines";
$lang->upgrade->program = 'Merge Project';
$lang->upgrade->existProgram = 'Existing programs';
$lang->upgrade->existProject = 'Existing projects';
$lang->upgrade->existLine = 'Existing' . $lang->productCommon . ' lines';
$lang->upgrade->product = $lang->productCommon;
$lang->upgrade->project = 'Iteration';
$lang->upgrade->repo = 'Repo';
$lang->upgrade->mergeRepo = 'Merge Repo';
$lang->upgrade->setProgram = 'Set the project to which the program belongs';
$lang->upgrade->dataMethod = 'Data migration method';
$lang->upgrade->begin = 'Begin Date';
$lang->upgrade->end = 'End Date';
$lang->upgrade->selectProject = 'The target project';
$lang->upgrade->programName = 'Program Name';
$lang->upgrade->projectName = 'Project Name';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->next = 'Next';
$lang->upgrade->line = 'Product Line';
$lang->upgrade->allLines = "All Product Lines";
$lang->upgrade->program = 'Merge Project';
$lang->upgrade->existProgram = 'Existing programs';
$lang->upgrade->existProject = 'Existing projects';
$lang->upgrade->existLine = 'Existing' . $lang->productCommon . ' lines';
$lang->upgrade->product = $lang->productCommon;
$lang->upgrade->project = 'Iteration';
$lang->upgrade->repo = 'Repo';
$lang->upgrade->mergeRepo = 'Merge Repo';
$lang->upgrade->setProgram = 'Set the project to which the program belongs';
$lang->upgrade->dataMethod = 'Data migration method';
$lang->upgrade->selectMergeMode = 'Please select the data merging method';
$lang->upgrade->mergeMode = 'Data consolidation method : ';
$lang->upgrade->begin = 'Begin Date';
$lang->upgrade->end = 'End Date';
$lang->upgrade->selectProject = 'The target project';
$lang->upgrade->programName = 'Program Name';
$lang->upgrade->projectName = 'Project Name';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->next = 'Next';
$lang->upgrade->back = 'Back';
$lang->upgrade->newProgram = 'Create';
$lang->upgrade->editedName = 'New Name';
@@ -156,6 +159,15 @@ $lang->upgrade->createExecutionTip = <<<EOT
<p>After the upgrade, the data of existing {$lang->projectCommon} will be in a Project - Execute of the new version .</p>
EOT;
$lang->upgrade->mergeModes = array();
$lang->upgrade->mergeModes['project'] = 'Automatically merge data and upgrade historical projects as projects';
$lang->upgrade->mergeModes['execution'] = 'Automatically merge data and upgrade historical projects as executions';
$lang->upgrade->mergeModes['manually'] = 'Manually merge data';
$lang->upgrade->mergeProjectTip = 'The historical project will be synchronized directly to the new version of the project. At the same time, the system will create an iteration with the same name as the project according to the historical project, and migrate the tasks, requirements, bugs and other data under the previous project to the iteration.';
$lang->upgrade->mergeExecutionTip = 'The system will automatically create projects by year, and merge the historical iteration data into the corresponding projects by year.';
$lang->upgrade->mergeManuallyTip = 'You can manually select the data merging method.';
include dirname(__FILE__) . '/version.php';
$lang->upgrade->recoveryActions = new stdclass();
+32 -20
View File
@@ -99,26 +99,29 @@ $lang->upgrade->to15Mode['new'] = 'Use the program mode';
$lang->upgrade->selectedModeTips['classic'] = 'You can also switch to the Program mode in the Admin-Custom-Custom later.';
$lang->upgrade->selectedModeTips['new'] = 'Switching to the program management mode requires merging the previous data, and the system will guide you to complete this operation.';
$lang->upgrade->line = 'Product Line';
$lang->upgrade->allLines = "All Product Lines";
$lang->upgrade->program = 'Merge Project';
$lang->upgrade->existProgram = 'Existing programs';
$lang->upgrade->existProject = 'Existing projects';
$lang->upgrade->existLine = 'Existing' . $lang->productCommon . ' lines';
$lang->upgrade->product = $lang->productCommon;
$lang->upgrade->project = 'Iteration';
$lang->upgrade->repo = 'Repo';
$lang->upgrade->mergeRepo = 'Merge Repo';
$lang->upgrade->setProgram = 'Set the project to which the program belongs';
$lang->upgrade->dataMethod = 'Data migration method';
$lang->upgrade->begin = 'Begin Date';
$lang->upgrade->end = 'End Date';
$lang->upgrade->selectProject = 'The target project';
$lang->upgrade->programName = 'Program Name';
$lang->upgrade->projectName = 'Project Name';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->next = 'Next';
$lang->upgrade->line = 'Product Line';
$lang->upgrade->allLines = "All Product Lines";
$lang->upgrade->program = 'Merge Project';
$lang->upgrade->existProgram = 'Existing programs';
$lang->upgrade->existProject = 'Existing projects';
$lang->upgrade->existLine = 'Existing' . $lang->productCommon . ' lines';
$lang->upgrade->product = $lang->productCommon;
$lang->upgrade->project = 'Iteration';
$lang->upgrade->repo = 'Repo';
$lang->upgrade->mergeRepo = 'Merge Repo';
$lang->upgrade->setProgram = 'Set the project to which the program belongs';
$lang->upgrade->dataMethod = 'Data migration method';
$lang->upgrade->selectMergeMode = 'Please select the data merging method';
$lang->upgrade->mergeMode = 'Data consolidation method : ';
$lang->upgrade->begin = 'Begin Date';
$lang->upgrade->end = 'End Date';
$lang->upgrade->selectProject = 'The target project';
$lang->upgrade->programName = 'Program Name';
$lang->upgrade->projectName = 'Project Name';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->next = 'Next';
$lang->upgrade->back = 'Back';
$lang->upgrade->newProgram = 'Create';
$lang->upgrade->editedName = 'New Name';
@@ -156,6 +159,15 @@ $lang->upgrade->createExecutionTip = <<<EOT
<p>After the upgrade, the data of existing {$lang->projectCommon} will be in a Project - Execute of the new version .</p>
EOT;
$lang->upgrade->mergeModes = array();
$lang->upgrade->mergeModes['project'] = 'Automatically merge data and upgrade historical projects as projects';
$lang->upgrade->mergeModes['execution'] = 'Automatically merge data and upgrade historical projects as executions';
$lang->upgrade->mergeModes['manually'] = 'Manually merge data';
$lang->upgrade->mergeProjectTip = 'The historical project will be synchronized directly to the new version of the project. At the same time, the system will create an iteration with the same name as the project according to the historical project, and migrate the tasks, requirements, bugs and other data under the previous project to the iteration.';
$lang->upgrade->mergeExecutionTip = 'The system will automatically create projects by year, and merge the historical iteration data into the corresponding projects by year.';
$lang->upgrade->mergeManuallyTip = 'You can manually select the data merging method.';
include dirname(__FILE__) . '/version.php';
$lang->upgrade->recoveryActions = new stdclass();
+32 -20
View File
@@ -99,26 +99,29 @@ $lang->upgrade->to15Mode['new'] = 'Use the program mode';
$lang->upgrade->selectedModeTips['classic'] = 'You can also switch to the Program mode in the Admin-Custom-Custom later.';
$lang->upgrade->selectedModeTips['new'] = 'Switching to the program management mode requires merging the previous data, and the system will guide you to complete this operation.';
$lang->upgrade->line = 'Product Line';
$lang->upgrade->allLines = "All Product Lines";
$lang->upgrade->program = 'Merge Project';
$lang->upgrade->existProgram = 'Existing programs';
$lang->upgrade->existProject = 'Existing projects';
$lang->upgrade->existLine = 'Existing' . $lang->productCommon . ' lines';
$lang->upgrade->product = $lang->productCommon;
$lang->upgrade->project = 'Iteration';
$lang->upgrade->repo = 'Repo';
$lang->upgrade->mergeRepo = 'Merge Repo';
$lang->upgrade->setProgram = 'Set the project to which the program belongs';
$lang->upgrade->dataMethod = 'Data migration method';
$lang->upgrade->begin = 'Begin Date';
$lang->upgrade->end = 'End Date';
$lang->upgrade->selectProject = 'The target project';
$lang->upgrade->programName = 'Program Name';
$lang->upgrade->projectName = 'Project Name';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->next = 'Next';
$lang->upgrade->line = 'Product Line';
$lang->upgrade->allLines = "All Product Lines";
$lang->upgrade->program = 'Merge Project';
$lang->upgrade->existProgram = 'Existing programs';
$lang->upgrade->existProject = 'Existing projects';
$lang->upgrade->existLine = 'Existing' . $lang->productCommon . ' lines';
$lang->upgrade->product = $lang->productCommon;
$lang->upgrade->project = 'Iteration';
$lang->upgrade->repo = 'Repo';
$lang->upgrade->mergeRepo = 'Merge Repo';
$lang->upgrade->setProgram = 'Set the project to which the program belongs';
$lang->upgrade->dataMethod = 'Data migration method';
$lang->upgrade->selectMergeMode = 'Please select the data merging method';
$lang->upgrade->mergeMode = 'Data consolidation method : ';
$lang->upgrade->begin = 'Begin Date';
$lang->upgrade->end = 'End Date';
$lang->upgrade->selectProject = 'The target project';
$lang->upgrade->programName = 'Program Name';
$lang->upgrade->projectName = 'Project Name';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->next = 'Next';
$lang->upgrade->back = 'Back';
$lang->upgrade->newProgram = 'Create';
$lang->upgrade->editedName = 'New Name';
@@ -156,6 +159,15 @@ $lang->upgrade->createExecutionTip = <<<EOT
<p>After the upgrade, the data of existing {$lang->projectCommon} will be in a Project - Execute of the new version .</p>
EOT;
$lang->upgrade->mergeModes = array();
$lang->upgrade->mergeModes['project'] = 'Automatically merge data and upgrade historical projects as projects';
$lang->upgrade->mergeModes['execution'] = 'Automatically merge data and upgrade historical projects as executions';
$lang->upgrade->mergeModes['manually'] = 'Manually merge data';
$lang->upgrade->mergeProjectTip = 'The historical project will be synchronized directly to the new version of the project. At the same time, the system will create an iteration with the same name as the project according to the historical project, and migrate the tasks, requirements, bugs and other data under the previous project to the iteration.';
$lang->upgrade->mergeExecutionTip = 'The system will automatically create projects by year, and merge the historical iteration data into the corresponding projects by year.';
$lang->upgrade->mergeManuallyTip = 'You can manually select the data merging method.';
include dirname(__FILE__) . '/version.php';
$lang->upgrade->recoveryActions = new stdclass();
+32 -17
View File
@@ -96,23 +96,29 @@ $lang->upgrade->to15Mode['new'] = 'Use the program mode';
$lang->upgrade->selectedModeTips['classic'] = 'You can also switch to the Program mode in the Admin-Custom-Custom later.';
$lang->upgrade->selectedModeTips['new'] = 'Switching to the program management mode requires merging the previous data, and the system will guide you to complete this operation.';
$lang->upgrade->line = 'Product Line';
$lang->upgrade->allLines = "All Product Lines";
$lang->upgrade->program = 'Merge Project';
$lang->upgrade->existProgram = 'Existing programs';
$lang->upgrade->existProject = 'Existing projects';
$lang->upgrade->existLine = 'Existing' . $lang->productCommon . ' lines';
$lang->upgrade->product = $lang->productCommon;
$lang->upgrade->project = 'Iteration';
$lang->upgrade->repo = 'Repo';
$lang->upgrade->mergeRepo = 'Merge Repo';
$lang->upgrade->setProgram = 'Set the project to which the program belongs';
$lang->upgrade->dataMethod = 'Data migration method';
$lang->upgrade->begin = 'Begin Date';
$lang->upgrade->end = 'End Date';
$lang->upgrade->selectProject = 'The target project';
$lang->upgrade->programName = 'Program Name';
$lang->upgrade->projectName = 'Project Name';
$lang->upgrade->line = 'Product Line';
$lang->upgrade->allLines = "All Product Lines";
$lang->upgrade->program = 'Merge Project';
$lang->upgrade->existProgram = 'Existing programs';
$lang->upgrade->existProject = 'Existing projects';
$lang->upgrade->existLine = 'Existing' . $lang->productCommon . ' lines';
$lang->upgrade->product = $lang->productCommon;
$lang->upgrade->project = 'Iteration';
$lang->upgrade->repo = 'Repo';
$lang->upgrade->mergeRepo = 'Merge Repo';
$lang->upgrade->setProgram = 'Set the project to which the program belongs';
$lang->upgrade->dataMethod = 'Data migration method';
$lang->upgrade->selectMergeMode = 'Please select the data merging method';
$lang->upgrade->mergeMode = 'Data consolidation method : ';
$lang->upgrade->begin = 'Begin Date';
$lang->upgrade->end = 'End Date';
$lang->upgrade->selectProject = 'The target project';
$lang->upgrade->programName = 'Program Name';
$lang->upgrade->projectName = 'Project Name';
$lang->upgrade->compatibleEXT = 'Extension mechanism compatible';
$lang->upgrade->fileName = 'File Name';
$lang->upgrade->next = 'Next';
$lang->upgrade->back = 'Back';
$lang->upgrade->newProgram = 'Create';
$lang->upgrade->editedName = 'New Name';
@@ -140,4 +146,13 @@ $lang->upgrade->createExecutionTip = <<<EOT
<p>After the upgrade, the data of existing {$lang->projectCommon} will be in a Project - Execute of the new version .</p>
EOT;
$lang->upgrade->mergeModes = array();
$lang->upgrade->mergeModes['project'] = 'Automatically merge data and upgrade historical projects as projects';
$lang->upgrade->mergeModes['execution'] = 'Automatically merge data and upgrade historical projects as executions';
$lang->upgrade->mergeModes['manually'] = 'Manually merge data';
$lang->upgrade->mergeProjectTip = 'The historical project will be synchronized directly to the new version of the project. At the same time, the system will create an iteration with the same name as the project according to the historical project, and migrate the tasks, requirements, bugs and other data under the previous project to the iteration.';
$lang->upgrade->mergeExecutionTip = 'The system will automatically create projects by year, and merge the historical iteration data into the corresponding projects by year.';
$lang->upgrade->mergeManuallyTip = 'You can manually select the data merging method.';
include dirname(__FILE__) . '/version.php';
+2 -3
View File
@@ -149,7 +149,6 @@ EOT;
$lang->upgrade->projectType['project'] = "把历史的{$lang->projectCommon}作为项目升级";
$lang->upgrade->projectType['execution'] = "把历史的{$lang->projectCommon}作为执行升级";
$lang->upgrade->createProjectTip = <<<EOT
<p>升级后历史的{$lang->projectCommon}一一对应新版本中的项目。</p>
<p>系统会根据历史{$lang->projectCommon}分别创建一个与该{$lang->projectCommon}同名的执行,并将之前{$lang->projectCommon}的任务、需求、Bug等数据迁移至执行中。</p>
@@ -163,11 +162,11 @@ EOT;
$lang->upgrade->mergeModes = array();
$lang->upgrade->mergeModes['project'] = '自动归并数据,将历史的项目作为项目升级';
$lang->upgrade->mergeModes['execution'] = '自动归并数据,将历史的项目作为迭代升级';
$lang->upgrade->mergeModes['manual'] = '手工归并数据';
$lang->upgrade->mergeModes['manually'] = '手工归并数据';
$lang->upgrade->mergeProjectTip = '历史的项目将直接同步到新版本的项目中,同时系统将会根据历史项目分别创建一个与该项目同名的迭代,并将之前项目下的任务、需求、Bug等数据迁移至迭代中。';
$lang->upgrade->mergeExecutionTip = '系统将自动按年创建项目,将历史的迭代数据按照年份归并到对应的项目下。';
$lang->upgrade->mergeManualTip = '可以手工选择数据归并的方式';
$lang->upgrade->mergeManuallyTip = '可以手工选择数据归并的方式。';
include dirname(__FILE__) . '/version.php';
+1 -1
View File
@@ -40,7 +40,7 @@
</table>
</div>
<div class='panel-footer text-center'>
<?php echo html::commonButton($lang->upgrade->back, '','btn btn-wide btn-secondary');?>
<?php echo html::commonButton($lang->upgrade->back, '', 'btn btn-wide btn-secondary');?>
<?php echo html::submitButton($lang->upgrade->next);?>
</div>
</form>