diff --git a/db/update17.6.1.sql b/db/update17.6.1.sql
index f47a93a119..9212dea25a 100644
--- a/db/update17.6.1.sql
+++ b/db/update17.6.1.sql
@@ -1 +1 @@
-ALTER table `zt_project` ADD `noSprint` enum('0', '1') NOT NULL DEFAULT '0';
+ALTER table `zt_project` ADD `multiple` enum('0', '1') NOT NULL DEFAULT '1';
diff --git a/db/zentao.sql b/db/zentao.sql
index ac8c8e6aa5..62923fcfeb 100755
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -1193,7 +1193,7 @@ CREATE TABLE IF NOT EXISTS `zt_project` (
`vision` varchar(10) NOT NULL DEFAULT 'rnd',
`displayCards` smallint(6) NOT NULL default '0',
`fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
- `noSprint` enum('0','1') NOT NULL DEFAULT '0',
+ `multiple` enum('0','1') NOT NULL DEFAULT '1',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `parent` (`parent`),
diff --git a/framework/router.class.php b/framework/router.class.php
index 1efaa3d059..7c62ef8e30 100755
--- a/framework/router.class.php
+++ b/framework/router.class.php
@@ -171,7 +171,7 @@ class router extends baseRouter
try
{
- $commonSettings = $this->dbh->query('SELECT section, `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND (`module`='custom' or `module`='common') and `key` in ('sprintConcept', 'hourPoint', 'URSR', 'mode', 'URAndSR', 'scoreStatus', 'projectMode')")->fetchAll();
+ $commonSettings = $this->dbh->query('SELECT section, `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND (`module`='custom' or `module`='common') and `key` in ('sprintConcept', 'hourPoint', 'URSR', 'mode', 'URAndSR', 'scoreStatus')")->fetchAll();
}
catch (PDOException $exception)
{
@@ -187,14 +187,12 @@ class router extends baseRouter
foreach($commonSettings as $setting)
{
- if($setting->key == 'sprintConcept') $projectKey = $setting->value;
- if($setting->key == 'hourPoint') $hourKey = $setting->value;
- if($setting->key == 'URSR') $URSR = $setting->value;
- if($setting->key == 'URAndSR') $URAndSR = $setting->value;
- if($setting->key == 'mode' and $setting->section == 'global') $mode = $setting->value;
- if($setting->key == 'scoreStatus' and $setting->section == 'global') $score = $setting->value;
-
- if($setting->key == 'projectMode' && $setting->section == 'global') $config->projectMode = $setting->value;
+ if($setting->key == 'sprintConcept') $projectKey = $setting->value;
+ if($setting->key == 'hourPoint') $hourKey = $setting->value;
+ if($setting->key == 'URSR') $URSR = $setting->value;
+ if($setting->key == 'URAndSR') $URAndSR = $setting->value;
+ if($setting->key == 'mode' and $setting->section == 'global') $mode = $setting->value;
+ if($setting->key == 'scoreStatus' and $setting->section == 'global') $score = $setting->value;
}
/* Lite Version is compatible with classic modes */
diff --git a/module/block/lang/de.php b/module/block/lang/de.php
index 6f30292284..98659639c3 100644
--- a/module/block/lang/de.php
+++ b/module/block/lang/de.php
@@ -322,11 +322,8 @@ $lang->block->default['full']['my']['10']['title'] = 'Project List';
$lang->block->default['full']['my']['10']['block'] = 'project';
$lang->block->default['full']['my']['10']['source'] = 'project';
$lang->block->default['full']['my']['10']['grid'] = 8;
-if(!isset($config->projectMode) || $config->projectMode != 'noSprint')
-{
- $lang->block->default['full']['my']['10']['block'] = 'project';
- $lang->block->default['full']['my']['10']['source'] = 'project';
-}
+$lang->block->default['full']['my']['10']['block'] = 'execution';
+$lang->block->default['full']['my']['10']['source'] = 'execution';
$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc';
$lang->block->default['full']['my']['10']['params']['count'] = '15';
@@ -353,11 +350,11 @@ $lang->block->availableBlocks->issue = 'My Issues';
$lang->block->availableBlocks->meeting = 'My Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
-$lang->block->moduleList['product'] = $lang->productCommon;
-$lang->block->moduleList['project'] = 'Project';
-if(!isset($config->projectMode) || $config->projectMode != 'noSprint') $lang->block->moduleList['execution'] = $lang->execution->common;
-$lang->block->moduleList['qa'] = 'QA';
-$lang->block->moduleList['todo'] = 'Todos';
+$lang->block->moduleList['product'] = $lang->productCommon;
+$lang->block->moduleList['project'] = 'Project';
+$lang->block->moduleList['execution'] = $lang->execution->common;
+$lang->block->moduleList['qa'] = 'QA';
+$lang->block->moduleList['todo'] = 'Todos';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
diff --git a/module/block/lang/en.php b/module/block/lang/en.php
index b085a9443e..00061bc057 100644
--- a/module/block/lang/en.php
+++ b/module/block/lang/en.php
@@ -322,11 +322,8 @@ $lang->block->default['full']['my']['10']['title'] = 'Project List';
$lang->block->default['full']['my']['10']['block'] = 'project';
$lang->block->default['full']['my']['10']['source'] = 'project';
$lang->block->default['full']['my']['10']['grid'] = 8;
-if(!isset($config->projectMode) || $config->projectMode != 'noSprint')
-{
- $lang->block->default['full']['my']['10']['block'] = 'execution';
- $lang->block->default['full']['my']['10']['source'] = 'execution';
-}
+$lang->block->default['full']['my']['10']['block'] = 'execution';
+$lang->block->default['full']['my']['10']['source'] = 'execution';
$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc';
$lang->block->default['full']['my']['10']['params']['count'] = '15';
@@ -353,11 +350,11 @@ $lang->block->availableBlocks->issue = 'Issues';
$lang->block->availableBlocks->meeting = 'Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
-$lang->block->moduleList['product'] = $lang->productCommon;
-$lang->block->moduleList['project'] = 'Project';
-if(!isset($config->projectMode) || $config->projectMode != 'noSprint') $lang->block->moduleList['execution'] = $lang->execution->common;
-$lang->block->moduleList['qa'] = 'Test';
-$lang->block->moduleList['todo'] = 'Todo';
+$lang->block->moduleList['product'] = $lang->productCommon;
+$lang->block->moduleList['project'] = 'Project';
+$lang->block->moduleList['execution'] = $lang->execution->common;
+$lang->block->moduleList['qa'] = 'Test';
+$lang->block->moduleList['todo'] = 'Todo';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php
index 9b6c1e8db1..cec285f8f3 100644
--- a/module/block/lang/fr.php
+++ b/module/block/lang/fr.php
@@ -322,11 +322,8 @@ $lang->block->default['full']['my']['10']['title'] = 'Project List';
$lang->block->default['full']['my']['10']['block'] = 'project';
$lang->block->default['full']['my']['10']['source'] = 'project';
$lang->block->default['full']['my']['10']['grid'] = 8;
-if(!isset($config->projectMode) || $config->projectMode != 'noSprint')
-{
- $lang->block->default['full']['my']['10']['block'] = 'project';
- $lang->block->default['full']['my']['10']['source'] = 'project';
-}
+$lang->block->default['full']['my']['10']['block'] = 'Execution';
+$lang->block->default['full']['my']['10']['source'] = 'Execution';
$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc';
$lang->block->default['full']['my']['10']['params']['count'] = '15';
@@ -353,11 +350,11 @@ $lang->block->availableBlocks->issue = 'My Issues';
$lang->block->availableBlocks->meeting = 'My Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
-$lang->block->moduleList['product'] = $lang->productCommon;
-$lang->block->moduleList['project'] = 'Project';
-if(!isset($config->projectMode) || $config->projectMode != 'noSprint') $lang->block->moduleList['execution'] = $lang->execution->common;
-$lang->block->moduleList['qa'] = 'Test';
-$lang->block->moduleList['todo'] = 'Todo';
+$lang->block->moduleList['product'] = $lang->productCommon;
+$lang->block->moduleList['project'] = 'Project';
+$lang->block->moduleList['execution'] = $lang->execution->common;
+$lang->block->moduleList['qa'] = 'Test';
+$lang->block->moduleList['todo'] = 'Todo';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php
index 2a4ac76a7a..e17f727749 100644
--- a/module/block/lang/zh-cn.php
+++ b/module/block/lang/zh-cn.php
@@ -322,11 +322,8 @@ $lang->block->default['full']['my']['10']['title'] = '项目列表';
$lang->block->default['full']['my']['10']['block'] = 'project';
$lang->block->default['full']['my']['10']['source'] = 'project';
$lang->block->default['full']['my']['10']['grid'] = 8;
-if(!isset($config->projectMode) || $config->projectMode != 'noSprint')
-{
- $lang->block->default['full']['my']['10']['block'] = 'execution';
- $lang->block->default['full']['my']['10']['source'] = 'execution';
-}
+$lang->block->default['full']['my']['10']['block'] = 'execution';
+$lang->block->default['full']['my']['10']['source'] = 'execution';
$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc';
$lang->block->default['full']['my']['10']['params']['count'] = '15';
@@ -353,11 +350,11 @@ $lang->block->availableBlocks->issue = '问题';
$lang->block->availableBlocks->meeting = '会议';
$lang->block->availableBlocks->feedback = '反馈';
-$lang->block->moduleList['product'] = $lang->productCommon;
-$lang->block->moduleList['project'] = '项目';
-if(!isset($config->projectMode) || $config->projectMode != 'noSprint') $lang->block->moduleList['execution'] = $lang->execution->common;
-$lang->block->moduleList['qa'] = '测试';
-$lang->block->moduleList['todo'] = '待办';
+$lang->block->moduleList['product'] = $lang->productCommon;
+$lang->block->moduleList['project'] = '项目';
+$lang->block->moduleList['execution'] = $lang->execution->common;
+$lang->block->moduleList['qa'] = '测试';
+$lang->block->moduleList['todo'] = '待办';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
diff --git a/module/block/model.php b/module/block/model.php
index 29a9538e3e..347ed7c0ea 100644
--- a/module/block/model.php
+++ b/module/block/model.php
@@ -137,7 +137,6 @@ class blockModel extends model
->andWhere('vision')->eq($this->config->vision)
->andWhere('hidden')->eq(0)
->beginIF($type)->andWhere('type')->eq($type)->fi()
- ->beginIF(isset($this->config->projectMode) && $this->config->projectMode == 'noSprint')->andWhere('source')->ne('execution')->fi()
->orderBy('`order`')
->fetchAll('id');
}
diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php
index 418c3668fa..b4f5b1a0a2 100644
--- a/module/bug/view/create.html.php
+++ b/module/bug/view/create.html.php
@@ -78,7 +78,6 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
- projectMode) and $config->projectMode == 'noSprint');?>
|
bug->project : $lang->bug->type;?>
@@ -111,7 +110,6 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
|
-
@@ -123,11 +121,6 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
-
-
-
-
-
|
diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php
index 76448e4f92..7e4a430107 100644
--- a/module/common/lang/menu.php
+++ b/module/common/lang/menu.php
@@ -62,7 +62,6 @@ $lang->mainNav->menuOrder[55] = 'system';
$lang->mainNav->menuOrder[60] = 'admin';
if($config->systemMode == 'lean') unset($lang->mainNav->program, $lang->mainNav->menuOrder[10]);
-if(isset($config->projectMode) and $config->projectMode == 'noSprint') unset($lang->mainNav->execution, $lang->mainNav->menuOrder[25]);
/* My menu. */
$lang->my->menu = new stdclass();
@@ -89,7 +88,6 @@ $lang->my->menuOrder[45] = 'score';
$lang->my->menuOrder[50] = 'contacts';
if(!$config->systemScore) unset($lang->my->menu->score, $lang->my->menuOrder[45]);
-if(isset($config->projectMode) and $config->projectMode == 'noSprint') unset($lang->my->menu->execution, $lang->my->menuOrder[30]);
$lang->my->menu->work['subMenu'] = new stdclass();
$lang->my->menu->work['subMenu']->task = array('link' => "{$lang->task->common}|my|work|mode=task", 'subModule' => 'task');
@@ -377,45 +375,45 @@ $lang->execution->menu->settings['subMenu']->whitelist = array('link' => "$lang-
$lang->execution->dividerMenu = ',story,build,';
-$lang->noSprint = new stdclass();
-$lang->noSprint->scrum = new stdclass();
-$lang->noSprint->scrum->menu = new stdclass();
-$lang->noSprint->scrum->menu->task = $lang->execution->menu->task;
-$lang->noSprint->scrum->menu->kanban = $lang->execution->menu->kanban;
-$lang->noSprint->scrum->menu->burn = $lang->execution->menu->burn;
-$lang->noSprint->scrum->menu->view = $lang->execution->menu->view;
-$lang->noSprint->scrum->menu->story = $lang->execution->menu->story;
-$lang->noSprint->scrum->menu->qa = $lang->scrum->menu->qa;
-$lang->noSprint->scrum->menu->devops = $lang->scrum->menu->devops;
-$lang->noSprint->scrum->menu->doc = $lang->scrum->menu->doc;
-$lang->noSprint->scrum->menu->build = $lang->scrum->menu->build;
-$lang->noSprint->scrum->menu->dynamic = $lang->scrum->menu->dynamic;
-$lang->noSprint->scrum->menu->settings = $lang->scrum->menu->settings;
+$lang->project->noMultiple = new stdclass();
+$lang->project->noMultiple->scrum = new stdclass();
+$lang->project->noMultiple->scrum->menu = new stdclass();
+$lang->project->noMultiple->scrum->menu->task = $lang->execution->menu->task;
+$lang->project->noMultiple->scrum->menu->kanban = $lang->execution->menu->kanban;
+$lang->project->noMultiple->scrum->menu->burn = $lang->execution->menu->burn;
+$lang->project->noMultiple->scrum->menu->view = $lang->execution->menu->view;
+$lang->project->noMultiple->scrum->menu->story = $lang->execution->menu->story;
+$lang->project->noMultiple->scrum->menu->qa = $lang->scrum->menu->qa;
+$lang->project->noMultiple->scrum->menu->devops = $lang->scrum->menu->devops;
+$lang->project->noMultiple->scrum->menu->doc = $lang->scrum->menu->doc;
+$lang->project->noMultiple->scrum->menu->build = $lang->scrum->menu->build;
+$lang->project->noMultiple->scrum->menu->dynamic = $lang->scrum->menu->dynamic;
+$lang->project->noMultiple->scrum->menu->settings = $lang->scrum->menu->settings;
-$lang->noSprint->kanban = new stdclass();
-$lang->noSprint->kanban->menu = new stdclass();
-$lang->noSprint->kanban->menu->kanban = array('link' => "{$lang->kanban->common}|execution|kanban|executionID=%s");
-$lang->noSprint->kanban->menu->build = $lang->kanbanProject->menu->build;
-$lang->noSprint->kanban->menu->settings = $lang->kanbanProject->menu->settings;
+$lang->project->noMultiple->kanban = new stdclass();
+$lang->project->noMultiple->kanban->menu = new stdclass();
+$lang->project->noMultiple->kanban->menu->kanban = array('link' => "{$lang->kanban->common}|execution|kanban|executionID=%s");
+$lang->project->noMultiple->kanban->menu->build = $lang->kanbanProject->menu->build;
+$lang->project->noMultiple->kanban->menu->settings = $lang->kanbanProject->menu->settings;
-$lang->noSprint->scrum->dividerMenu = ',story,build,';
-$lang->noSprint->kanban->dividerMenu = '';
+$lang->project->noMultiple->scrum->dividerMenu = ',story,build,';
+$lang->project->noMultiple->kanban->dividerMenu = '';
-$lang->noSprint->scrum->menuOrder[5] = 'task';
-$lang->noSprint->scrum->menuOrder[10] = 'kanban';
-$lang->noSprint->scrum->menuOrder[15] = 'burn';
-$lang->noSprint->scrum->menuOrder[20] = 'view';
-$lang->noSprint->scrum->menuOrder[25] = 'story';
-$lang->noSprint->scrum->menuOrder[30] = 'qa';
-$lang->noSprint->scrum->menuOrder[35] = 'devops';
-$lang->noSprint->scrum->menuOrder[40] = 'doc';
-$lang->noSprint->scrum->menuOrder[45] = 'build';
-$lang->noSprint->scrum->menuOrder[50] = 'dynamic';
-$lang->noSprint->scrum->menuOrder[55] = 'settings';
+$lang->project->noMultiple->scrum->menuOrder[5] = 'task';
+$lang->project->noMultiple->scrum->menuOrder[10] = 'kanban';
+$lang->project->noMultiple->scrum->menuOrder[15] = 'burn';
+$lang->project->noMultiple->scrum->menuOrder[20] = 'view';
+$lang->project->noMultiple->scrum->menuOrder[25] = 'story';
+$lang->project->noMultiple->scrum->menuOrder[30] = 'qa';
+$lang->project->noMultiple->scrum->menuOrder[35] = 'devops';
+$lang->project->noMultiple->scrum->menuOrder[40] = 'doc';
+$lang->project->noMultiple->scrum->menuOrder[45] = 'build';
+$lang->project->noMultiple->scrum->menuOrder[50] = 'dynamic';
+$lang->project->noMultiple->scrum->menuOrder[55] = 'settings';
-$lang->noSprint->kanban->menuOrder[5] = 'kanban';
-$lang->noSprint->kanban->menuOrder[10] = 'build';
-$lang->noSprint->kanban->menuOrder[15] = 'settings';
+$lang->project->noMultiple->kanban->menuOrder[5] = 'kanban';
+$lang->project->noMultiple->kanban->menuOrder[10] = 'build';
+$lang->project->noMultiple->kanban->menuOrder[15] = 'settings';
/* QA menu.*/
$lang->qa->menu = new stdclass();
@@ -500,13 +498,11 @@ $lang->doc->menuOrder[30] = 'project';
$lang->doc->menuOrder[35] = 'execution';
$lang->doc->menuOrder[36] = 'api';
$lang->doc->menuOrder[40] = 'custom';
-if(isset($config->projectMode) and $config->projectMode == 'noSprint') unset($lang->doc->menu->execution, $lang->doc->menuOrder[35]);
$lang->doc->menu->product['subMenu'] = new stdclass();
$lang->doc->menu->project['subMenu'] = new stdclass();
$lang->doc->menu->execution['subMenu'] = new stdclass();
$lang->doc->menu->custom['subMenu'] = new stdclass();
-if(isset($config->projectMode) and $config->projectMode == 'noSprint') unset($lang->doc->menu->execution['subMenu']);
$lang->doc->menu->api['subMenu'] = new stdclass();
$lang->doc->menu->api['subMenu']->index = array('link' => "{$lang->doc->apiDoc}|api|index|libID=%s", 'alias' => 'create,edit');
diff --git a/module/common/model.php b/module/common/model.php
index bfc9312ab0..a937aea4a5 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -613,7 +613,6 @@ class commonModel extends model
if($config->edition == 'open') unset($lang->createIcons['effort']);
if($config->systemMode != 'new') unset($lang->createIcons['program']);
- if(!isset($config->projectMode) || $config->projectMode == 'noSprint') unset($lang->createIcons['execution']);
/* Check whether the creation permission is available, and print create buttons. */
@@ -1240,7 +1239,6 @@ class commonModel extends model
$searchObjects = $lang->searchObjects;
if($config->systemMode != 'new') unset($searchObjects['program']);
- if(!isset($config->projectMode) || $config->projectMode == 'noSprint') unset($searchObjects['execution']);
foreach($searchObjects as $key => $value)
{
diff --git a/module/custom/control.php b/module/custom/control.php
index 10951d3871..e383c0c981 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -640,7 +640,6 @@ class custom extends control
/* 只有没有关联项目集的产品和项目关联到默认项目集下. */
$this->loadModel('upgrade')->relationDefaultProgram($program);
- if($mode == 'new') $this->loadModel('setting')->deleteItems('owner=system&module=common§ion=global&key=projectMode');
if($mode == 'lean') $this->custom->processProjectAcl();
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'top'));
diff --git a/module/execution/control.php b/module/execution/control.php
index dc21336b3a..f82083527a 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -139,7 +139,7 @@ class execution extends control
$recentExecutions = array_unique($recentExecutions);
$recentExecutions = array_slice($recentExecutions, 0, 5);
$recentExecutions = join(',', $recentExecutions);
- if($this->session->noSprint)
+ if(!$this->session->multiple)
{
if(!isset($this->config->execution->recentExecutions) or $this->config->execution->recentExecutions != $recentExecutions) $this->setting->updateItem($this->app->user->account . 'common.execution.recentExecutions', $recentExecutions);
if(!isset($this->config->execution->lastExecution) or $this->config->execution->lastExecution != $executionID) $this->setting->updateItem($this->app->user->account . 'common.execution.lastExecution', $executionID);
@@ -3129,7 +3129,7 @@ class execution extends control
$products = $this->product->getProducts($objectID);
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
$browseLink = $this->session->executionStoryList;
- if($this->app->tab == 'project' and empty($object->noSprint)) $browseLink = $this->createLink('projectstory', 'story', "objectID=$objectID");
+ if($this->app->tab == 'project' and $object->multiple) $browseLink = $this->createLink('projectstory', 'story', "objectID=$objectID");
$this->session->set('storyList', $this->app->getURI(true), $this->app->tab); // Save session.
@@ -3517,7 +3517,7 @@ class execution extends control
$projects = $this->loadModel('program')->getProjectList(0, 'all', 0, 'order_asc', null, 0, 0, true);
$executionGroups = $this->dao->select('*')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
- ->andWhere('noSprint')->eq('0')
+ ->andWhere('multiple')->eq('1')
->andWhere('type')->in('sprint,stage,kanban')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->andWhere('project')->in(array_keys($projects))
diff --git a/module/execution/model.php b/module/execution/model.php
index 06532cc23c..25743654d4 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -123,7 +123,7 @@ class executionModel extends model
$this->lang->switcherMenu = $this->getSwitcher($executionID, $this->app->rawModule, $this->app->rawMethod);
common::setMenuVars('execution', $executionID);
- $this->loadModel('project')->setNoSprintMenu($executionID);
+ $this->loadModel('project')->setNoMultipleMenu($executionID);
}
/**
@@ -1268,7 +1268,7 @@ class executionModel extends model
$executions = $this->dao->select('*, IF(INSTR("done,closed", status) < 2, 0, 1) AS isDone, INSTR("doing,wait,suspended,closed", status) AS sortStatus')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
- ->beginIF($this->session->noSprint and $this->app->tab == 'execution')->andWhere('noSprint')->eq('0')->fi()
+ ->beginIF(!$this->session->multiple and $this->app->tab == 'execution')->andWhere('multiple')->eq('1')->fi()
->beginIF($type == 'all')->andWhere('type')->in('stage,sprint,kanban')->fi()
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->beginIF($type != 'all')->andWhere('type')->eq($type)->fi()
@@ -1488,7 +1488,7 @@ class executionModel extends model
->where('t1.type')->in('sprint,stage,kanban')
->andWhere('t1.deleted')->eq('0')
->andWhere('t1.vision')->eq($this->config->vision)
- ->andWhere('t1.noSprint')->eq('0')
+ ->andWhere('t1.multiple')->eq('1')
->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->sprints)->fi()
->beginIF(!empty($executionQuery))->andWhere($executionQuery)->fi()
->beginIF($productID)->andWhere('t3.product')->eq($productID)->fi()
@@ -4966,7 +4966,7 @@ class executionModel extends model
$_POST['QD'] = '';
$_POST['PM'] = '';
$_POST['RD'] = '';
- $_POST['noSprint'] = 1;
+ $_POST['multiple'] = '0';
$executionID = $this->create();
if($project->model == 'kanban')
diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php
index 61e559e878..65a1d2a4db 100644
--- a/module/execution/view/kanban.html.php
+++ b/module/execution/view/kanban.html.php
@@ -157,13 +157,13 @@ js::set('priv',
echo html::a('javascript:toggleRDSearchBox()', " " . $lang->searchAB, '', "class='btn btn-link querybox-toggle'");
echo html::a('javascript:fullScreen()', " " . $lang->kanban->fullScreen, '', "class='btn btn-link'");
if(common::hasPriv('execution', 'setKanban')) echo html::a(helper::createLink('execution', 'setKanban', "executionID=$execution->id", '', true), ' ' . $lang->settings, '', "class='iframe btn btn-link text-left' data-width='$width'");
- if($execution->noSprint && common::hasPriv('project', 'edit')) $editURL = helper::createLink('project', 'edit', "projectID=$execution->project", '', true);
- if(!$execution->noSprint && common::hasPriv('execution', 'edit')) $editURL = helper::createLink('execution', 'edit', "executionID=$execution->id", '', true);
+ if(!$execution->multiple and common::hasPriv('project', 'edit')) $editURL = helper::createLink('project', 'edit', "projectID=$execution->project", '', true);
+ if($execution->multiple and common::hasPriv('execution', 'edit')) $editURL = helper::createLink('execution', 'edit', "executionID=$execution->id", '', true);
if(!empty($editURL)) echo html::a($editURL, ' ' . $lang->edit, '', "class='iframe btn btn-link text-left' data-width='80%'");
$actions = '';
$printSettingBtn = (common::hasPriv('execution', 'close') or common::hasPriv('execution', 'delete') or !empty($executionActions));
- if($printSettingBtn && !$execution->noSprint)
+ if($printSettingBtn and $execution->multiple)
{
$actions .= " |
systemMode == 'new' ? '' : 'hidden';?>
systemMode == 'new' ? 4 : 3;?>
- projectMode) and $config->projectMode == 'noSprint');?>
$group):?>
@@ -104,7 +103,6 @@
group]", array(1 => ''), $group->products == 'all' ? 1 : '', "onchange=toggleDisabled(this);");?>
-
|
@@ -117,7 +115,6 @@
group]", array(1 => ''), $group->executions == 'all' ? 1 : '', "onchange=toggleDisabled(this);");?>
|
-
@@ -173,7 +170,6 @@
''), '', "onchange=toggleDisabled(this);");?>
-
|
@@ -185,7 +181,6 @@
''), '', "onchange=toggleDisabled(this);");?>
|
-
|
diff --git a/module/project/config.php b/module/project/config.php
index d05d38d490..474e893caf 100644
--- a/module/project/config.php
+++ b/module/project/config.php
@@ -31,8 +31,8 @@ $config->project->sortFields->end = 'end';
$config->project->sortFields->status = 'status';
$config->project->sortFields->budget = 'budget';
-$config->project->noSprint['project'] = ',qa,devops,doc,build,dynamic,settings,';
-$config->project->noSprint['execution'] = ',task,kanban,burn,view,story,';
+$config->project->multiple['project'] = ',qa,devops,doc,build,dynamic,settings,';
+$config->project->multiple['execution'] = ',task,kanban,burn,view,story,';
global $lang;
$config->project->datatable = new stdclass();
diff --git a/module/project/control.php b/module/project/control.php
index 7110f5a30f..b1383bbb90 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -306,12 +306,12 @@ class project extends control
$project = $this->project->getByID($projectID);
/* Locate to task when set no execution. */
- if($project->noSprint)
+ if(!$project->multiple)
{
$executions = $this->loadModel('execution')->getList($project->id);
foreach($executions as $execution)
{
- if($execution->noSprint) $this->locate($this->createLink('execution', 'task', "executionID={$execution->id}"));
+ if(!$execution->multiple) $this->locate($this->createLink('execution', 'task', "executionID={$execution->id}"));
}
}
@@ -580,12 +580,12 @@ class project extends control
{
$this->lang->project->aclList = $this->lang->project->kanbanAclList;
$this->lang->project->subAclList = $this->lang->project->kanbanSubAclList;
- $this->lang->project->noSprint = $this->lang->project->kanban;
+ $this->lang->project->multiple = $this->lang->project->kanban;
}
if($model == 'scrum')
{
- $this->lang->project->noSprint = empty($this->config->custom->sprintConcept) ?
+ $this->lang->project->multiple = empty($this->config->custom->sprintConcept) ?
$this->config->executionCommonList[$this->app->getClientLang()][0] :
$this->config->executionCommonList[$this->app->getClientLang()][1];
}
@@ -736,11 +736,11 @@ class project extends control
if($project->model != 'kanban') $canChangeModel = $this->project->checkCanChangeModel($projectID, $project->model);
- if($project->model == 'kanban') $this->lang->project->noSprint = $this->lang->project->kanban;
+ if($project->model == 'kanban') $this->lang->project->multiple = $this->lang->project->kanban;
if($project->model == 'scrum')
{
- $this->lang->project->noSprint = empty($this->config->custom->sprintConcept) ?
+ $this->lang->project->multiple = empty($this->config->custom->sprintConcept) ?
$this->config->executionCommonList[$this->app->getClientLang()][0] :
$this->config->executionCommonList[$this->app->getClientLang()][1];
}
diff --git a/module/project/lang/de.php b/module/project/lang/de.php
index eabb69a85e..16a04795bf 100644
--- a/module/project/lang/de.php
+++ b/module/project/lang/de.php
@@ -257,8 +257,8 @@ $lang->project->featureBar['build']['all'] = 'Build List';
$lang->project->aclList['private'] = 'Private (For team members and stakeholders only)';
$lang->project->aclList['open'] = "Open (accessible with project view permissions)";
-$lang->project->noSprintList['0'] = "Enable";
-$lang->project->noSprintList['1'] = "Disable";
+$lang->project->multipleList['0'] = 'No';
+$lang->project->multipleList['1'] = 'Yes';
$lang->project->acls['private'] = 'Private';
$lang->project->acls['open'] = "Open";
@@ -339,4 +339,4 @@ $lang->project->confirmUnlinkMember = "Do you want to remove this user from pro
$lang->project->action = new stdclass();
$lang->project->action->managed = '$date, managed by $actor. $extra' . "\n";
-$lang->project->noSprint = 'No sprint';
+$lang->project->multiple = 'Multi-scrum';
diff --git a/module/project/lang/en.php b/module/project/lang/en.php
index 7eec4e8f66..1cc08a4bc5 100644
--- a/module/project/lang/en.php
+++ b/module/project/lang/en.php
@@ -257,8 +257,8 @@ $lang->project->featureBar['build']['all'] = 'Build List';
$lang->project->aclList['private'] = 'Private (For the project leader, team members and stakeholders only)';
$lang->project->aclList['open'] = "Open (accessible with project view permissions)";
-$lang->project->noSprintList['0'] = "Enable";
-$lang->project->noSprintList['1'] = "Disable";
+$lang->project->multipleList['0'] = 'No';
+$lang->project->multipleList['1'] = 'Yes';
$lang->project->acls['private'] = 'Private';
$lang->project->acls['open'] = 'Open';
@@ -324,26 +324,26 @@ $lang->project->programTitle['0'] = 'Hidden';
$lang->project->programTitle['base'] = 'Base-level project only';
$lang->project->programTitle['end'] = 'End-level project only';
-$lang->project->accessDenied = 'Access denied to this project';
-$lang->project->chooseProgramType = 'Select management type';
-$lang->project->cannotCreateChild = 'The project has contents, so you cannot add a child project. You can create a parent project for this one and then add a child project for the parent project.';
-$lang->project->hasChildren = 'This project has a child project, so it cannot be deleted.';
-$lang->project->confirmDelete = 'Do you want to delete \"%s\"?';
-$lang->project->cannotChangeToCat = "The project has contents, so you cannot it to a parent project.";
-$lang->project->cannotCancelCat = "There are child projects of this project. You cannot cancel the parent project mark.";
-$lang->project->parentBeginEnd = "The begin and end date of the parent project: %s ~ %s";
-$lang->project->parentBudget = "The budget of the parent program: ";
+$lang->project->accessDenied = 'Access denied to this project';
+$lang->project->chooseProgramType = 'Select management type';
+$lang->project->cannotCreateChild = 'The project has contents, so you cannot add a child project. You can create a parent project for this one and then add a child project for the parent project.';
+$lang->project->hasChildren = 'This project has a child project, so it cannot be deleted.';
+$lang->project->confirmDelete = 'Do you want to delete \"%s\"?';
+$lang->project->cannotChangeToCat = "The project has contents, so you cannot it to a parent project.";
+$lang->project->cannotCancelCat = "There are child projects of this project. You cannot cancel the parent project mark.";
+$lang->project->parentBeginEnd = "The begin and end date of the parent project: %s ~ %s";
+$lang->project->parentBudget = "The budget of the parent program: ";
$lang->project->beginLetterParent = "The start date of the project is < the start date of the parent program:";
$lang->project->endGreaterParent = "The finish date of the project is > the finish date of the parent program:";
$lang->project->dateExceedParent = "The start and finish date of the project was > the start and finish date of the parent program:";
-$lang->project->beginGreateChild = 'The start date of the project should be ≥ the start date of program: %s.';
-$lang->project->endLetterChild = 'The finish date of the project should be ≤ the finish date of program: %s.';
+$lang->project->beginGreateChild = 'The start date of the project should be ≥ the start date of program: %s.';
+$lang->project->endLetterChild = 'The finish date of the project should be ≤ the finish date of program: %s.';
$lang->project->begigLetterExecution = 'The start date of project should be ≤ the minimum start date of the execution: %s.';
$lang->project->endGreateExecution = 'The finish date of the project should be ≥ the maximum finish date of the execution: %s.';
-$lang->project->childLongTime = "There are long-term projects in the child project, and the parent project should also be a long-term project.";
-$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
+$lang->project->childLongTime = "There are long-term projects in the child project, and the parent project should also be a long-term project.";
+$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
$lang->project->action = new stdclass();
$lang->project->action->managed = '$date, managed by $actor. $extra' . "\n";
-$lang->project->noSprint = 'No sprint';
+$lang->project->multiple = 'Multi-scrum';
diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php
index a34580687b..185f2ac766 100644
--- a/module/project/lang/fr.php
+++ b/module/project/lang/fr.php
@@ -257,8 +257,8 @@ $lang->project->featureBar['build']['all'] = 'Build List';
$lang->project->aclList['private'] = 'Private (For team members and stakeholders only)';
$lang->project->aclList['open'] = "Open (accessible with project view permissions)";
-$lang->project->noSprintList['0'] = "Enable";
-$lang->project->noSprintList['1'] = "Disable";
+$lang->project->multipleList['0'] = 'No';
+$lang->project->multipleList['1'] = 'Yes';
$lang->project->acls['private'] = 'Private';
$lang->project->acls['open'] = "Open";
@@ -346,4 +346,4 @@ $lang->project->confirmUnlinkMember = "Do you want to remove this user from pro
$lang->project->action = new stdclass();
$lang->project->action->managed = '$date, managed by $actor. $extra' . "\n";
-$lang->project->noSprint = 'No sprint';
+$lang->project->multiple = 'Multi-scrum';
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index d780f9824b..1116445a6d 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -257,8 +257,8 @@ $lang->project->featureBar['build']['all'] = '所有版本';
$lang->project->aclList['private'] = "私有 (只有项目负责人、团队成员和干系人可访问)";
$lang->project->aclList['open'] = "公开 (有项目视图权限即可访问)";
-$lang->project->noSprintList['0'] = "启用";
-$lang->project->noSprintList['1'] = "不启用";
+$lang->project->multipleList['0'] = '否';
+$lang->project->multipleList['1'] = '是';
$lang->project->acls['private'] = '私有';
$lang->project->acls['open'] = '公开';
@@ -324,9 +324,9 @@ $lang->project->programTitle['0'] = '不显示';
$lang->project->programTitle['base'] = '只显示一级项目集';
$lang->project->programTitle['end'] = '只显示最后一级项目集';
-$lang->project->accessDenied = '您无权访问该项目!';
-$lang->project->chooseProgramType = '选择项目管理方式';
-$lang->project->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。';
+$lang->project->accessDenied = '您无权访问该项目!';
+$lang->project->chooseProgramType = '选择项目管理方式';
+$lang->project->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。';
$lang->project->hasChildren = '该项目有子项目存在,不能删除。';
$lang->project->confirmDelete = '您确定删除项目“%s”吗?';
$lang->project->cannotChangeToCat = "该项目已经有实际的内容,无法修改为父项目";
@@ -346,4 +346,4 @@ $lang->project->confirmUnlinkMember = "您确定从该项目中移除该用户
$lang->project->action = new stdclass();
$lang->project->action->managed = '$date, 由 $actor 维护。$extra' . "\n";
-$lang->project->noSprint = '是否启用迭代';
+$lang->project->multiple = '多迭代项目';
diff --git a/module/project/model.php b/module/project/model.php
index 146dcb73ee..54351e774e 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -1342,7 +1342,7 @@ class projectModel extends model
if($project->acl != 'open') $this->loadModel('user')->updateUserView($projectID, 'project');
- if($project->noSprint == 1 and $project->model != 'waterfall') $this->loadModel('execution')->createDefaultSprint($projectID);
+ if(!$project->multiple and $project->model != 'waterfall') $this->loadModel('execution')->createDefaultSprint($projectID);
return $projectID;
}
@@ -2478,25 +2478,25 @@ class projectModel extends model
common::setMenuVars('project', $objectID);
- $this->setNoSprintMenu($objectID);
+ $this->setNomultipleMenu($objectID);
return $objectID;
}
/**
- * Set noSprint menu.
+ * Set multi-scrum menu.
*
* @param int $objectID
* @access public
* @return void
*/
- public function setNoSprintMenu($objectID)
+ public function setNoMultipleMenu($objectID)
{
$moduleName = $this->app->rawModule;
$methodName = $this->app->rawMethod;
- $this->session->set('noSprint', false);
+ $this->session->set('multiple', true);
- $project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($objectID)->andWhere('noSprint')->eq('1')->fetch();
+ $project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($objectID)->andWhere('multiple')->eq('0')->fetch();
if(empty($project)) return;
if(!in_array($project->type, array('project', 'sprint', 'kanban'))) return;
@@ -2507,7 +2507,7 @@ class projectModel extends model
$projectID = $project->id;
$executionID = $this->dao->select('id')->from(TABLE_EXECUTION)
->where('project')->eq($projectID)
- ->andWhere('noSprint')->eq(1)
+ ->andWhere('multiple')->eq('0')
->andWhere('type')->eq('sprint')
->andWhere('deleted')->eq('0')
->fetch('id');
@@ -2521,18 +2521,18 @@ class projectModel extends model
if(empty($projectID) or empty($executionID)) return;
$this->session->set('project', $projectID, 'project');
- $this->session->set('noSprint', true);
+ $this->session->set('multiple', false);
$navGroup = zget($this->lang->navGroup, $moduleName);
- $this->lang->$navGroup->menu = $this->lang->noSprint->{$model}->menu;
- $this->lang->$navGroup->menuOrder = $this->lang->noSprint->{$model}->menuOrder;
- $this->lang->$navGroup->dividerMenu = $this->lang->noSprint->{$model}->dividerMenu;
+ $this->lang->$navGroup->menu = $this->lang->project->noMultiple->{$model}->menu;
+ $this->lang->$navGroup->menuOrder = $this->lang->project->noMultiple->{$model}->menuOrder;
+ $this->lang->$navGroup->dividerMenu = $this->lang->project->noMultiple->{$model}->dividerMenu;
foreach($this->lang->$navGroup->menu as $label => $menu)
{
$objectID = 0;
- if(strpos($this->config->project->noSprint['project'], ",{$label},") !== false) $objectID = $projectID;
- if(strpos($this->config->project->noSprint['execution'], ",{$label},") !== false)
+ if(strpos($this->config->project->multiple['project'], ",{$label},") !== false) $objectID = $projectID;
+ if(strpos($this->config->project->multiple['execution'], ",{$label},") !== false)
{
$objectID = $executionID;
$this->lang->$navGroup->menu->$label['subModule'] = 'project';
diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php
index 6b3cc258e2..b97f563859 100755
--- a/module/project/view/create.html.php
+++ b/module/project/view/create.html.php
@@ -73,15 +73,11 @@
| |
- config->projectMode) and $model != 'waterfall'):?>
+
- | project->noSprint;?> |
- project->noSprintList, 0));?> |
+ project->multiple;?> |
+ project->multipleList, '1'));?> |
-
-
-
-
| project->PM;?> |
diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php
index 17d356fa9a..5af273ff51 100755
--- a/module/project/view/edit.html.php
+++ b/module/project/view/edit.html.php
@@ -77,15 +77,11 @@
code, "class='form-control' required");?> |
- config->projectMode) and $model != 'waterfall'):?>
+
- | project->noSprint;?> |
- project->noSprintList, $project->noSprint, 'disabled'));?> |
+ project->multiple;?> |
+ project->multipleList, $project->multiple, 'disabled'));?> |
-
-
-
-
| project->PM;?> |
diff --git a/module/project/view/kanban.html.php b/module/project/view/kanban.html.php
index 3f3a9fb257..641f310ad1 100644
--- a/module/project/view/kanban.html.php
+++ b/module/project/view/kanban.html.php
@@ -39,7 +39,6 @@ $kanbanColumns['waitProject'] = array('name' => $lang->project->waitProjects,
$kanbanColumns['doingProject'] = array('name' => $lang->project->doingProjects, 'type' => 'doingProject');
$kanbanColumns['doingExecution'] = array('name' => $lang->project->doingExecutions, 'type' => 'doingExecution');
$kanbanColumns['closedProject'] = array('name' => $lang->project->closedProjects, 'type' => 'closedProject');
-if(!empty($config->projectMode) and $config->projectMode == 'noSprint') unset($kanbanColumns['doingExecution']);
$userPrivs = array();
$userPrivs['project'] = common::hasPriv('project', 'index');
$userPrivs['execution'] = common::hasPriv('execution', 'task');
diff --git a/module/search/control.php b/module/search/control.php
index e1faf2e968..9c9445861c 100644
--- a/module/search/control.php
+++ b/module/search/control.php
@@ -237,7 +237,7 @@ class search extends control
{
if(!isset($this->lang->search->modules[$objectType])) continue;
if($this->config->systemMode != 'new' and $objectType == 'program') continue;
- if(!empty($this->config->projectMode) and $this->config->projectMode == 'noSprint' and $objectType == 'execution') continue;
+
$typeList[$objectType] = $this->lang->search->modules[$objectType];
}
diff --git a/module/search/model.php b/module/search/model.php
index 2a7df2a79d..9726bd97dd 100644
--- a/module/search/model.php
+++ b/module/search/model.php
@@ -635,7 +635,6 @@ class searchModel extends model
else
{
if($this->config->systemMode != 'new') unset($this->config->search->fields->program);
- if(!empty($this->config->projectMode) and $this->config->projectMode == 'noSprint') unset($this->config->search->fields->execution);
foreach($this->config->search->fields as $objectType => $fields)
{
diff --git a/module/story/control.php b/module/story/control.php
index f18c2df0cd..7711676b50 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -71,7 +71,7 @@ class story extends control
if(empty($objectID)) $objectID = $this->session->project;
$projectID = $objectID;
- if($this->session->noSprint) $projectID = $this->session->project;
+ if(!$this->session->multiple) $projectID = $this->session->project;
$projectID = isset($objects[$projectID]) ? $projectID : $this->session->project;
$projectID = $this->project->saveState($projectID, $objects);
$this->project->setMenu($projectID);
diff --git a/module/story/model.php b/module/story/model.php
index 2f35e64b5e..b4e8c981d4 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -4580,7 +4580,7 @@ class storyModel extends model
$storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0¶m=0&storyType=$story->type");
$canView = common::hasPriv($story->type, 'view', null, "storyType=$story->type");
- if($tab == 'project' and !$this->session->noSprint)
+ if($tab == 'project' and $this->session->multiple)
{
$storyLink = helper::createLink('projectstory', 'view', "storyID=$story->id");
$canView = common::hasPriv('projectstory', 'view');
@@ -4862,7 +4862,7 @@ class storyModel extends model
echo $story->version;
break;
case 'actions':
- if($tab == 'execution' || $this->session->noSprint)
+ if($tab == 'execution' || !$this->session->multiple)
{
$menuType = 'execution';
}
diff --git a/module/task/control.php b/module/task/control.php
index 40b6184344..45c6007491 100755
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -48,6 +48,7 @@ class task extends control
$executions = $this->execution->getPairs(0, 'all', 'noclosed');
$executionID = $this->execution->saveState($executionID, $executions);
$execution = $this->execution->getById($executionID);
+
$this->execution->setMenu($executionID);
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project);
@@ -351,7 +352,7 @@ class task extends control
{
$taskLink = $this->createLink('my', 'work', 'mode=task');
}
- elseif($this->app->tab == 'project' and empty($execution->noSprint))
+ elseif($this->app->tab == 'project' and $execution->multiple)
{
$taskLink = $this->createLink('project', 'execution', "browseType=all&projectID={$execution->project}");
}
diff --git a/module/upgrade/control.php b/module/upgrade/control.php
index 08bd440608..798594c79b 100644
--- a/module/upgrade/control.php
+++ b/module/upgrade/control.php
@@ -171,7 +171,7 @@ class upgrade extends control
/* 只有没有关联项目集的产品和项目关联到默认项目集下. */
$this->upgrade->relationDefaultProgram($programID);
- $this->upgrade->classic2Lean($programID);
+ $this->upgrade->upgradeInProjectMode($programID, $systemMode);
$selectMode = false;
}
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index 814fa1001e..d3bf39e9fb 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -7529,23 +7529,6 @@ class upgradeModel extends model
return true;
}
- /*
- * Upgrade from classic mode of 15 version to the lite mode of 18 version.
- *
- * @param int $programID
- * @access public
- * @return bool
- */
- public function classic2Lean($programID)
- {
- /* Set project mode as noSprint. */
- $this->loadModel('setting')->setItem('system.common.global.projectMode', 'noSprint');
-
- $this->upgradeInProjectMode($programID);
-
- return !dao::isError();
- }
-
/**
* Historical projects are upgraded by project.
*
@@ -7553,12 +7536,11 @@ class upgradeModel extends model
* @access public
* @return bool
*/
- public function upgradeInProjectMode($programID)
+ public function upgradeInProjectMode($programID, $fromMode = '')
{
$this->loadModel('action');
- $now = helper::now();
- $account = isset($this->app->user->account) ? $this->app->user->account : '';
- $projectMode = $this->setting->getItem('owner=system&module=common§ion=global&key=projectMode');
+ $now = helper::now();
+ $account = isset($this->app->user->account) ? $this->app->user->account : '';
$noMergedSprints = $this->getNoMergedSprints();
if(!$noMergedSprints) return true;
@@ -7583,7 +7565,7 @@ class upgradeModel extends model
$project->lastEditedDate = $now;
$project->grade = 2;
$project->acl = $sprint->acl == 'open' ? 'open' : 'private';
- if($projectMode == 'noSprint') $project->noSprint = '1';
+ if($fromMode == 'classic') $project->multiple = '0';
$this->dao->insert(TABLE_PROJECT)->data($project)->check('name', 'unique', "type='project' AND parent=$programID AND deleted='0'")->exec();
if(dao::isError()) return false;