Merge branch 'sprint/daitingting_task_70200' into 'sprint/zentaopms240'

* Finish task #70200.

See merge request easycorp/zentaopms!5552
This commit is contained in:
王怡栋
2022-09-27 00:16:26 +00:00
33 changed files with 148 additions and 209 deletions
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -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`),
+7 -9
View File
@@ -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 */
+7 -10
View File
@@ -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();
+7 -10
View File
@@ -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();
+7 -10
View File
@@ -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();
+7 -10
View File
@@ -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();
-1
View File
@@ -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');
}
-7
View File
@@ -78,7 +78,6 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
</td>
</tr>
<?php $showExecution = (strpos(",$showFields,", ',execution,') !== false);?>
<?php $noSprint = (isset($config->projectMode) and $config->projectMode == 'noSprint');?>
<tr>
<th>
<?php echo ($showExecution) ? $lang->bug->project : $lang->bug->type;?>
@@ -111,7 +110,6 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
<?php endif;?>
<?php if($showExecution):?>
<td>
<?php if(!$noSprint):?>
<div class='table-row'>
<div class='table-col' id='projectBox'>
<?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProductExecutions({$productID}, this.value)'");?>
@@ -123,11 +121,6 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
</div>
</div>
</div>
<?php else:?>
<div class='input-group' id='executionIdBox'>
<?php echo html::select('execution', $executions, $executionID, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");?>
</div>
<?php endif;?>
</td>
<?php endif;?>
<td>
+35 -39
View File
@@ -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');
-2
View File
@@ -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)
{
-1
View File
@@ -640,7 +640,6 @@ class custom extends control
/* 只有没有关联项目集的产品和项目关联到默认项目集下. */
$this->loadModel('upgrade')->relationDefaultProgram($program);
if($mode == 'new') $this->loadModel('setting')->deleteItems('owner=system&module=common&section=global&key=projectMode');
if($mode == 'lean') $this->custom->processProjectAcl();
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'top'));
+3 -3
View File
@@ -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))
+4 -4
View File
@@ -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')
+3 -3
View File
@@ -157,13 +157,13 @@ js::set('priv',
echo html::a('javascript:toggleRDSearchBox()', "<i class='icon-search muted'></i> " . $lang->searchAB, '', "class='btn btn-link querybox-toggle'");
echo html::a('javascript:fullScreen()', "<i class='icon-fullscreen muted'></i> " . $lang->kanban->fullScreen, '', "class='btn btn-link'");
if(common::hasPriv('execution', 'setKanban')) echo html::a(helper::createLink('execution', 'setKanban', "executionID=$execution->id", '', true), '<i class="icon icon-cog-outline"></i> ' . $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, '<i class="icon icon-edit"></i> ' . $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 .= "<div class='btn-group menu-actions'>";
$actions .= html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
@@ -43,7 +43,6 @@
</tr>
<?php $hiddenProgram = $config->systemMode == 'new' ? '' : 'hidden';?>
<?php $rowspan = $config->systemMode == 'new' ? 4 : 3;?>
<?php $noSprint = (isset($config->projectMode) and $config->projectMode == 'noSprint');?>
<?php if($projectAdmins):?>
<?php foreach($projectAdmins as $account => $group):?>
<tr class="line<?php echo $group->group;?>">
@@ -104,7 +103,6 @@
<?php echo html::checkbox("productAll[$group->group]", array(1 => ''), $group->products == 'all' ? 1 : '', "onchange=toggleDisabled(this);");?>
</td>
</tr>
<?php if(!$noSprint):?>
<tr class="line<?php echo $group->group;?>">
<td>
<div class='input-group'>
@@ -117,7 +115,6 @@
<?php echo html::checkbox("executionAll[$group->group]", array(1 => ''), $group->executions == 'all' ? 1 : '', "onchange=toggleDisabled(this);");?>
</td>
</tr>
<?php endif;?>
<?php endforeach;?>
<?php else:?>
<tr class='line1'>
@@ -173,7 +170,6 @@
<?php echo html::checkbox('productAll[1]', array(1 => ''), '', "onchange=toggleDisabled(this);");?>
</td>
</tr>
<?php if(!$noSprint):?>
<tr class='line1'>
<td>
<div class='input-group'>
@@ -185,7 +181,6 @@
<?php echo html::checkbox('executionAll[1]', array(1 => ''), '', "onchange=toggleDisabled(this);");?>
</td>
</tr>
<?php endif?>
<?php endif;?>
<tr>
<td class='text-center form-actions' colspan='4'>
+2 -2
View File
@@ -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();
+6 -6
View File
@@ -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];
}
+3 -3
View File
@@ -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 <strong>$actor</strong>. $extra' . "\n";
$lang->project->noSprint = 'No sprint';
$lang->project->multiple = 'Multi-scrum';
+16 -16
View File
@@ -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 <strong>$actor</strong>. $extra' . "\n";
$lang->project->noSprint = 'No sprint';
$lang->project->multiple = 'Multi-scrum';
+3 -3
View File
@@ -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 <strong>$actor</strong>. $extra' . "\n";
$lang->project->noSprint = 'No sprint';
$lang->project->multiple = 'Multi-scrum';
+6 -6
View File
@@ -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, 由 <strong>$actor</strong> 维护。$extra' . "\n";
$lang->project->noSprint = '是否启用迭代';
$lang->project->multiple = '多迭代项目';
+13 -13
View File
@@ -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';
+3 -7
View File
@@ -73,15 +73,11 @@
<td><?php echo html::input('code', $code, "class='form-control' required");?></td>
</tr>
<?php endif;?>
<?php if(!isset($this->config->projectMode) and $model != 'waterfall'):?>
<?php if($model != 'waterfall'):?>
<tr>
<th><?php echo $lang->project->noSprint;?></th>
<td colspan='3'><?php echo nl2br(html::radio('noSprint', $lang->project->noSprintList, 0));?></td>
<th><?php echo $lang->project->multiple;?></th>
<td colspan='3'><?php echo nl2br(html::radio('multiple', $lang->project->multipleList, '1'));?></td>
</tr>
<?php elseif($model == 'waterfall'):?>
<?php echo html::hidden('noSprint', 0);?>
<?php else:?>
<?php echo html::hidden('noSprint', 1);?>
<?php endif;?>
<tr>
<th><?php echo $lang->project->PM;?></th>
+3 -7
View File
@@ -77,15 +77,11 @@
<td><?php echo html::input('code', $project->code, "class='form-control' required");?></td>
</tr>
<?php endif;?>
<?php if(!isset($this->config->projectMode) and $model != 'waterfall'):?>
<?php if($model != 'waterfall'):?>
<tr>
<th><?php echo $lang->project->noSprint;?></th>
<td colspan='3'><?php echo nl2br(html::radio('noSprint', $lang->project->noSprintList, $project->noSprint, 'disabled'));?></td>
<th><?php echo $lang->project->multiple;?></th>
<td colspan='3'><?php echo nl2br(html::radio('multiple', $lang->project->multipleList, $project->multiple, 'disabled'));?></td>
</tr>
<?php elseif($model == 'waterfall'):?>
<?php echo html::hidden('noSprint', 0);?>
<?php else:?>
<?php echo html::hidden('noSprint', 1);?>
<?php endif;?>
<tr>
<th><?php echo $lang->project->PM;?></th>
-1
View File
@@ -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');
+1 -1
View File
@@ -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];
}
-1
View File
@@ -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)
{
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -4580,7 +4580,7 @@ class storyModel extends model
$storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0&param=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';
}
+2 -1
View File
@@ -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}");
}
+1 -1
View File
@@ -171,7 +171,7 @@ class upgrade extends control
/* 只有没有关联项目集的产品和项目关联到默认项目集下. */
$this->upgrade->relationDefaultProgram($programID);
$this->upgrade->classic2Lean($programID);
$this->upgrade->upgradeInProjectMode($programID, $systemMode);
$selectMode = false;
}
+4 -22
View File
@@ -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&section=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;