From 86c7dc50613f7a26789698c6a08216d3ae9432f2 Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 16 Sep 2022 09:01:08 +0000 Subject: [PATCH 1/3] * Process conflict. * Call classic2Lean function when upgrade from classic of 15. --- module/my/lang/de.php | 3 +++ module/my/lang/en.php | 2 ++ module/my/lang/zh-cn.php | 2 ++ module/upgrade/control.php | 6 ++++++ module/upgrade/model.php | 4 ++-- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/module/my/lang/de.php b/module/my/lang/de.php index b2f6ece0d3..6ea5a70262 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -96,6 +96,8 @@ $lang->my->programLink = 'Program Default Page'; $lang->my->productLink = 'Product Default Page'; $lang->my->projectLink = 'Project Default Page'; $lang->my->executionLink = 'Execution Default Page'; +$lang->my->executionLink = $lang->executionCommon . ' Default Page'; +if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLink = $lang->executionCommon . ' Default Page'; $lang->my->programLinkList = array(); $lang->my->programLinkList['program-browse'] = 'By default, you go to the program list, where you can view all of the programs'; @@ -124,6 +126,7 @@ if($config->systemMode == 'new') $lang->my->executionLinkList['execution-executionkanban'] = 'By default, you can enter the execution Kanban to view the execution status of projects in progress'; } if($config->systemMode == 'lean') $lang->my->executionLinkList['execution-task'] = 'By default, enter the list of the most recently executed task, and you can view the task information under the current iteration'; +if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLinkList['execution-task'] = 'By default, enter the list of the most recently executed task, and you can view the task information under the current iteration'; $lang->my->guideChangeTheme = <<"Young Blue" theme is available now!

diff --git a/module/my/lang/en.php b/module/my/lang/en.php index 7e97146c16..f9a1cb8eb0 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -96,6 +96,7 @@ $lang->my->programLink = 'Program Default Page'; $lang->my->productLink = 'Product Default Page'; $lang->my->projectLink = 'Project Default Page'; $lang->my->executionLink = 'Execution Default Page'; +if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLink = $lang->executionCommon . ' Default Page'; $lang->my->programLinkList = array(); $lang->my->programLinkList['program-browse'] = 'By default, you go to the program list, where you can view all of the programs'; @@ -124,6 +125,7 @@ if($config->systemMode == 'new') $lang->my->executionLinkList['execution-executionkanban'] = 'By default, you can enter the execution Kanban to view the execution status of projects in progress'; } if($config->systemMode == 'lean') $lang->my->executionLinkList['execution-task'] = "By default, enter the list of the most recently {$lang->executionCommon} task, and you can view the task information under the current {$lang->executionCommon}"; +if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLinkList['execution-task'] = "By default, enter the list of the most recently {$lang->executionCommon} task, and you can view the task information under the current {$lang->executionCommon}"; $lang->my->guideChangeTheme = <<"Young Blue" theme is available now!

diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index d8e0bec065..a4ce6ef31d 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -96,6 +96,7 @@ $lang->my->programLink = '项目集默认着陆页'; $lang->my->productLink = '产品默认着陆页'; $lang->my->projectLink = '项目默认着陆页'; $lang->my->executionLink = '执行默认着陆页'; +if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLink = $lang->executionCommon . '默认着陆页'; $lang->my->programLinkList = array(); $lang->my->programLinkList['program-browse'] = '默认进入项目集列表,可以查看所有的项目集'; @@ -124,6 +125,7 @@ if($config->systemMode == 'new') $lang->my->executionLinkList['execution-executionkanban'] = '默认进入执行看板,可以查看进行中项目的执行情况'; } if($config->systemMode == 'lean') $lang->my->executionLinkList['execution-task'] = "默认进入最近一个{$lang->executionCommon}的任务列表,可以查看当前{$lang->executionCommon}下的任务信息"; +if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLinkList['execution-task'] = "默认进入最近一个{$lang->executionCommon}的任务列表,可以查看当前{$lang->executionCommon}下的任务信息"; $lang->my->guideChangeTheme = <<全新“青春蓝”主题上线了!

diff --git a/module/upgrade/control.php b/module/upgrade/control.php index fd07bb354c..678675c2ed 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -161,12 +161,18 @@ class upgrade extends control if(version_compare($openVersion, '15_0', '>=') and version_compare($openVersion, '18_0', '<=') and $systemMode != 'new') { $this->loadModel('setting')->setItem('system.common.global.mode', 'lean'); + /* Lean mode create default program. */ $programID = $this->loadModel('program')->createDefaultProgram(); + /* Set default program config. */ $this->loadModel('setting')->setItem('system.common.global.defaultProgram', $programID); + /* 只有没有关联项目集的产品和项目关联到默认项目集下. */ $this->upgrade->relationDefaultProgram($programID); + + $this->upgrade->classic2Lean($programID); + $selectMode = false; } if(version_compare($openVersion, '18_0', '>')) $selectMode = false; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 080463f326..335dec5a77 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -7532,15 +7532,15 @@ class upgradeModel extends model /* * Upgrade from classic mode of 15 version to the lite mode of 18 version. * + * @param int $programID * @access public * @return bool */ - public function classic2Lean() + public function classic2Lean($programID) { /* Set project mode as noExecution. */ $this->loadModel('setting')->setItem('system.common.global.projectMode', 'noExecution'); - $programID = $this->createDefaultProgram(); $this->upgradeInProjectMode($programID); return !dao::isError(); From c2de68159e540afc4c0efe24df029b7152ea9682 Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 16 Sep 2022 09:05:54 +0000 Subject: [PATCH 2/3] * Remove repeat codes. --- module/my/lang/de.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/my/lang/de.php b/module/my/lang/de.php index 6ea5a70262..1bea72eb8e 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -96,7 +96,6 @@ $lang->my->programLink = 'Program Default Page'; $lang->my->productLink = 'Product Default Page'; $lang->my->projectLink = 'Project Default Page'; $lang->my->executionLink = 'Execution Default Page'; -$lang->my->executionLink = $lang->executionCommon . ' Default Page'; if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLink = $lang->executionCommon . ' Default Page'; $lang->my->programLinkList = array(); From ecef99b54a68d778887e43517f71a105766c9e8f Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 16 Sep 2022 09:12:20 +0000 Subject: [PATCH 3/3] * Rmove useless code. --- module/my/lang/de.php | 2 -- module/my/lang/en.php | 2 -- module/my/lang/zh-cn.php | 2 -- 3 files changed, 6 deletions(-) diff --git a/module/my/lang/de.php b/module/my/lang/de.php index 1bea72eb8e..b2f6ece0d3 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -96,7 +96,6 @@ $lang->my->programLink = 'Program Default Page'; $lang->my->productLink = 'Product Default Page'; $lang->my->projectLink = 'Project Default Page'; $lang->my->executionLink = 'Execution Default Page'; -if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLink = $lang->executionCommon . ' Default Page'; $lang->my->programLinkList = array(); $lang->my->programLinkList['program-browse'] = 'By default, you go to the program list, where you can view all of the programs'; @@ -125,7 +124,6 @@ if($config->systemMode == 'new') $lang->my->executionLinkList['execution-executionkanban'] = 'By default, you can enter the execution Kanban to view the execution status of projects in progress'; } if($config->systemMode == 'lean') $lang->my->executionLinkList['execution-task'] = 'By default, enter the list of the most recently executed task, and you can view the task information under the current iteration'; -if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLinkList['execution-task'] = 'By default, enter the list of the most recently executed task, and you can view the task information under the current iteration'; $lang->my->guideChangeTheme = <<"Young Blue" theme is available now!

diff --git a/module/my/lang/en.php b/module/my/lang/en.php index f9a1cb8eb0..7e97146c16 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -96,7 +96,6 @@ $lang->my->programLink = 'Program Default Page'; $lang->my->productLink = 'Product Default Page'; $lang->my->projectLink = 'Project Default Page'; $lang->my->executionLink = 'Execution Default Page'; -if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLink = $lang->executionCommon . ' Default Page'; $lang->my->programLinkList = array(); $lang->my->programLinkList['program-browse'] = 'By default, you go to the program list, where you can view all of the programs'; @@ -125,7 +124,6 @@ if($config->systemMode == 'new') $lang->my->executionLinkList['execution-executionkanban'] = 'By default, you can enter the execution Kanban to view the execution status of projects in progress'; } if($config->systemMode == 'lean') $lang->my->executionLinkList['execution-task'] = "By default, enter the list of the most recently {$lang->executionCommon} task, and you can view the task information under the current {$lang->executionCommon}"; -if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLinkList['execution-task'] = "By default, enter the list of the most recently {$lang->executionCommon} task, and you can view the task information under the current {$lang->executionCommon}"; $lang->my->guideChangeTheme = <<"Young Blue" theme is available now!

diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index a4ce6ef31d..d8e0bec065 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -96,7 +96,6 @@ $lang->my->programLink = '项目集默认着陆页'; $lang->my->productLink = '产品默认着陆页'; $lang->my->projectLink = '项目默认着陆页'; $lang->my->executionLink = '执行默认着陆页'; -if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLink = $lang->executionCommon . '默认着陆页'; $lang->my->programLinkList = array(); $lang->my->programLinkList['program-browse'] = '默认进入项目集列表,可以查看所有的项目集'; @@ -125,7 +124,6 @@ if($config->systemMode == 'new') $lang->my->executionLinkList['execution-executionkanban'] = '默认进入执行看板,可以查看进行中项目的执行情况'; } if($config->systemMode == 'lean') $lang->my->executionLinkList['execution-task'] = "默认进入最近一个{$lang->executionCommon}的任务列表,可以查看当前{$lang->executionCommon}下的任务信息"; -if(isset($config->projectMode) && $config->projectMode == 'noExecution') $lang->my->executionLinkList['execution-task'] = "默认进入最近一个{$lang->executionCommon}的任务列表,可以查看当前{$lang->executionCommon}下的任务信息"; $lang->my->guideChangeTheme = <<全新“青春蓝”主题上线了!