* code for task #69248.
This commit is contained in:
+12
-23
@@ -260,14 +260,11 @@ $lang->block->default['full']['my']['4']['grid'] = 4;
|
||||
$lang->block->default['full']['my']['4']['source'] = 'todo';
|
||||
$lang->block->default['full']['my']['4']['params']['count'] = '20';
|
||||
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->block->default['full']['my']['5']['title'] = '項目統計';
|
||||
$lang->block->default['full']['my']['5']['block'] = 'statistic';
|
||||
$lang->block->default['full']['my']['5']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['5']['grid'] = 8;
|
||||
$lang->block->default['full']['my']['5']['params']['count'] = '20';
|
||||
}
|
||||
$lang->block->default['full']['my']['5']['title'] = '項目統計';
|
||||
$lang->block->default['full']['my']['5']['block'] = 'statistic';
|
||||
$lang->block->default['full']['my']['5']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['5']['grid'] = 8;
|
||||
$lang->block->default['full']['my']['5']['params']['count'] = '20';
|
||||
|
||||
$lang->block->default['full']['my']['6']['title'] = '我的貢獻';
|
||||
$lang->block->default['full']['my']['6']['block'] = 'contribute';
|
||||
@@ -292,23 +289,15 @@ $lang->block->default['full']['my']['8']['params']['issueCount'] = '20';
|
||||
$lang->block->default['full']['my']['8']['params']['storyCount'] = '20';
|
||||
$lang->block->default['full']['my']['8']['params']['meetingCount'] = '20';
|
||||
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->block->default['full']['my']['9']['title'] = '項目人力投入';
|
||||
$lang->block->default['full']['my']['9']['block'] = 'projectteam';
|
||||
$lang->block->default['full']['my']['9']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['9']['grid'] = 8;
|
||||
}
|
||||
$lang->block->default['full']['my']['9']['title'] = '項目人力投入';
|
||||
$lang->block->default['full']['my']['9']['block'] = 'projectteam';
|
||||
$lang->block->default['full']['my']['9']['source'] = 'project';
|
||||
$lang->block->default['full']['my']['9']['grid'] = 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($config->systemMode == 'classic')
|
||||
{
|
||||
$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';
|
||||
@@ -334,7 +323,7 @@ $lang->block->availableBlocks->issue = '我的問題';
|
||||
$lang->block->availableBlocks->meeting = '我的會議';
|
||||
$lang->block->availableBlocks->feedback = '我的反饋';
|
||||
|
||||
if($config->systemMode == 'new') $lang->block->moduleList['project'] = '項目';
|
||||
$lang->block->moduleList['project'] = '項目';
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
$lang->block->moduleList['execution'] = $lang->execution->common;
|
||||
$lang->block->moduleList['qa'] = '測試';
|
||||
@@ -345,7 +334,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = '項目列表';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = '近期項目';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = '項目統計';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = '項目人力投入';
|
||||
$lang->block->modules['project']->availableBlocks->projectteam = '項目人力投入';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
@@ -502,7 +491,7 @@ $lang->block->typeList->testtask['done'] = '已測版本';
|
||||
$lang->block->typeList->testtask['all'] = '全部';
|
||||
|
||||
$lang->block->modules['project']->moreLinkList = new stdclass();
|
||||
$lang->block->modules['project']->moreLinkList->recentproject = $config->systemMode == 'new' ? 'project|browse|' : 'execution|all|';
|
||||
$lang->block->modules['project']->moreLinkList->recentproject = 'project|browse|';
|
||||
$lang->block->modules['project']->moreLinkList->statistic = 'project|browse|';
|
||||
$lang->block->modules['project']->moreLinkList->project = 'project|browse|';
|
||||
$lang->block->modules['project']->moreLinkList->cmmireport = 'weekly|index|';
|
||||
|
||||
@@ -245,7 +245,7 @@ class execution extends control
|
||||
$this->view->setModule = true;
|
||||
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
|
||||
$this->view->showBranch = $showBranch;
|
||||
$this->view->projectName = $this->config->systemMode == 'new' ? $this->loadModel('project')->getById($execution->project)->name . ' / ' . $execution->name : $execution->name;
|
||||
$this->view->projectName = $this->loadModel('project')->getById($execution->project)->name . ' / ' . $execution->name;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1713,11 +1713,11 @@ class execution extends control
|
||||
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink;
|
||||
|
||||
$this->loadModel('product');
|
||||
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed') : $this->product->getProductPairsByProject($projectID, 'noclosed');
|
||||
$allProducts = $this->product->getProductPairsByProject($projectID, 'noclosed');
|
||||
$copyProjects = $this->loadModel('project')->getPairsByProgram(isset($project->parent) ? $project->parent : '', 'noclosed', '', 'order_asc', '', isset($project->model) ? $project->model : '');
|
||||
$copyProjectID = ($projectID == 0) ? key($copyProjects) : $projectID;
|
||||
|
||||
$this->view->title = (($this->app->tab == 'execution') and ($this->config->systemMode == 'new')) ? $this->lang->execution->createExec : $this->lang->execution->create;
|
||||
$this->view->title = $this->app->tab == 'execution' ? $this->lang->execution->createExec : $this->lang->execution->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'all') : '';
|
||||
$this->view->executions = array('' => '') + $this->execution->getList($projectID);
|
||||
@@ -1741,7 +1741,7 @@ class execution extends control
|
||||
$this->view->productPlans = array(0 => '') + $productPlans;
|
||||
$this->view->whitelist = $whitelist;
|
||||
$this->view->copyExecutionID = $copyExecutionID;
|
||||
$this->view->branchGroups = isset($branchGroups) ? $branchGroups : $this->execution->getBranchByProduct(array_keys($products), $this->config->systemMode == 'new' ? $projectID : 0);
|
||||
$this->view->branchGroups = isset($branchGroups) ? $branchGroups : $this->execution->getBranchByProduct(array_keys($products), $projectID);
|
||||
$this->view->poUsers = $poUsers;
|
||||
$this->view->pmUsers = $pmUsers;
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
@@ -1867,7 +1867,7 @@ class execution extends control
|
||||
$position[] = html::a($browseExecutionLink, $execution->name);
|
||||
$position[] = $this->lang->execution->edit;
|
||||
|
||||
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed', 0, $linkedProductIdList) : $this->product->getProducts($execution->project, 'noclosed', '', false, $linkedProductIdList);
|
||||
$allProducts = $this->product->getProducts($execution->project, 'noclosed', '', false, $linkedProductIdList);
|
||||
$allProducts = array(0 => '') + $allProducts;
|
||||
|
||||
$this->loadModel('productplan');
|
||||
@@ -1935,9 +1935,9 @@ class execution extends control
|
||||
$this->view->unmodifiableBranches = $unmodifiableBranches;
|
||||
$this->view->multiBranchProducts = $this->product->getMultiBranchPairs();
|
||||
$this->view->productPlans = $productPlans;
|
||||
$this->view->branchGroups = $this->execution->getBranchByProduct(array_keys($linkedProducts), $this->config->systemMode == 'new' ? $execution->project : 0, 'noclosed', $linkedBranchList);
|
||||
$this->view->branchGroups = $this->execution->getBranchByProduct(array_keys($linkedProducts), $execution->project, 'noclosed', $linkedBranchList);
|
||||
$this->view->teamMembers = $this->execution->getTeamMembers($executionID);
|
||||
if($this->config->systemMode == 'new') $this->view->allProjects = $this->project->getPairsByModel($project->model, 0, 'noclosed', $project->id);
|
||||
$this->view->allProjects = $this->project->getPairsByModel($project->model, 0, 'noclosed', $project->id);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -2274,12 +2274,9 @@ class execution extends control
|
||||
|
||||
$execution->projectInfo = $this->loadModel('project')->getByID($execution->project);
|
||||
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$programList = array_filter(explode(',', $execution->projectInfo->path));
|
||||
array_pop($programList);
|
||||
$this->view->programList = $this->loadModel('program')->getPairsByList($programList);
|
||||
}
|
||||
$programList = array_filter(explode(',', $execution->projectInfo->path));
|
||||
array_pop($programList);
|
||||
$this->view->programList = $this->loadModel('program')->getPairsByList($programList);
|
||||
|
||||
$type = $this->config->vision == 'lite' ? 'kanban' : 'stage,sprint,kanban';
|
||||
if(empty($execution) || strpos($type, $execution->type) === false) return print(js::error($this->lang->notFound) . js::locate('back'));
|
||||
@@ -2950,7 +2947,7 @@ class execution extends control
|
||||
|
||||
$branches = $this->project->getBranchesByProject($executionID);
|
||||
$linkedProductIdList = empty($branches) ? '' : array_keys($branches);
|
||||
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed', 0, $linkedProductIdList) : $this->product->getProductPairsByProject($execution->project, 'all', $linkedProductIdList);
|
||||
$allProducts = $this->product->getProductPairsByProject($execution->project, 'all', $linkedProductIdList);
|
||||
$linkedProducts = $this->product->getProducts($execution->id, 'all', '', true, $linkedProductIdList);
|
||||
$linkedBranches = array();
|
||||
$executionStories = $this->project->getStoriesByProject($executionID);
|
||||
@@ -2985,8 +2982,8 @@ class execution extends control
|
||||
$this->view->unmodifiableBranches = $unmodifiableBranches;
|
||||
$this->view->linkedBranches = $linkedBranches;
|
||||
$this->view->linkedStoryIDList = $linkedStoryIDList;
|
||||
$this->view->branchGroups = $this->execution->getBranchByProduct(array_keys($allProducts), $this->config->systemMode == 'new' ? $execution->project : 0, 'ignoreNormal|noclosed');
|
||||
$this->view->allBranches = $this->execution->getBranchByProduct(array_keys($allProducts), $this->config->systemMode == 'new' ? $execution->project : 0, 'ignoreNormal');
|
||||
$this->view->branchGroups = $this->execution->getBranchByProduct(array_keys($allProducts), $execution->project, 'ignoreNormal|noclosed');
|
||||
$this->view->allBranches = $this->execution->getBranchByProduct(array_keys($allProducts), $execution->project, 'ignoreNormal');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -3474,12 +3471,8 @@ class execution extends control
|
||||
*/
|
||||
public function ajaxGetTeamMembers($objectID)
|
||||
{
|
||||
$type = 'execution';
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$type = $this->dao->findById($objectID)->from(TABLE_PROJECT)->fetch('type');
|
||||
if($type != 'project') $type = 'execution';
|
||||
}
|
||||
$type = $this->dao->findById($objectID)->from(TABLE_PROJECT)->fetch('type');
|
||||
if($type != 'project') $type = 'execution';
|
||||
|
||||
$users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
|
||||
$members = $this->user->getTeamMemberPairs($objectID, $type);
|
||||
@@ -3524,7 +3517,7 @@ class execution extends control
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('type')->in('sprint,stage,kanban')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('project')->in(array_keys($projects))->fi()
|
||||
->andWhere('project')->in(array_keys($projects))
|
||||
->orderBy('id_desc')
|
||||
->fetchGroup('project', 'id');
|
||||
|
||||
@@ -3534,33 +3527,19 @@ class execution extends control
|
||||
->fetchGroup('root', 'account');
|
||||
|
||||
$projectPairs = array();
|
||||
if($this->config->systemMode == 'new')
|
||||
foreach($projects as $project)
|
||||
{
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$executions = zget($executionGroups, $project->id, array());
|
||||
if(isset($project->model) and $project->model == 'waterfall') ksort($executions);
|
||||
$executions = zget($executionGroups, $project->id, array());
|
||||
if(isset($project->model) and $project->model == 'waterfall') ksort($executions);
|
||||
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
if(isset($orderedExecutions[$execution->parent]) and $project->model != 'waterfall') unset($orderedExecutions[$execution->parent]);
|
||||
$execution->teams = zget($teams, $execution->id, array());
|
||||
$orderedExecutions[$execution->id] = $execution;
|
||||
}
|
||||
|
||||
$projectPairs[$project->id] = $project->name;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($executionGroups as $projectID => $executions)
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
$execution->teams = zget($teams, $execution->id, array());
|
||||
$orderedExecutions[$execution->id] = $execution;
|
||||
}
|
||||
if(isset($orderedExecutions[$execution->parent]) and $project->model != 'waterfall') unset($orderedExecutions[$execution->parent]);
|
||||
$execution->teams = zget($teams, $execution->id, array());
|
||||
$orderedExecutions[$execution->id] = $execution;
|
||||
}
|
||||
|
||||
$projectPairs[$project->id] = $project->name;
|
||||
}
|
||||
|
||||
$projectExecutions = array();
|
||||
@@ -4010,7 +3989,7 @@ class execution extends control
|
||||
$projectID = $this->dao->findByID($executionID)->from(TABLE_EXECUTION)->fetch('project');
|
||||
$planStories = array_keys($planStory);
|
||||
|
||||
if($this->config->systemMode == 'new' and $executionID != $projectID) $this->execution->linkStory($projectID, $planStories, $planProducts);
|
||||
if($executionID != $projectID) $this->execution->linkStory($projectID, $planStories, $planProducts);
|
||||
$this->execution->linkStory($executionID, $planStories, $planProducts, $extra);
|
||||
}
|
||||
|
||||
@@ -4189,21 +4168,18 @@ class execution extends control
|
||||
*/
|
||||
public function ajaxGetProjectStartDate($executionID = 0)
|
||||
{
|
||||
if($this->config->systemMode == 'new')
|
||||
$execution = $this->dao->select('id,project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch();
|
||||
$project = $this->dao->select('begin,end')->from(TABLE_PROJECT)->where('id')->eq($execution->project)->fetch();
|
||||
if(empty($project))
|
||||
{
|
||||
$execution = $this->dao->select('id,project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch();
|
||||
$project = $this->dao->select('begin,end')->from(TABLE_PROJECT)->where('id')->eq($execution->project)->fetch();
|
||||
if(empty($project))
|
||||
{
|
||||
echo '';
|
||||
return false;
|
||||
}
|
||||
|
||||
$date = array();
|
||||
$date['begin'] = $project->begin;
|
||||
$date['end'] = $project->end;
|
||||
echo json_encode($date);
|
||||
echo '';
|
||||
return false;
|
||||
}
|
||||
|
||||
$date = array();
|
||||
$date['begin'] = $project->begin;
|
||||
$date['end'] = $project->end;
|
||||
echo json_encode($date);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -145,8 +145,7 @@ $lang->execution->estimate = '预计';
|
||||
$lang->execution->consumed = '消耗';
|
||||
$lang->execution->left = '剩余';
|
||||
|
||||
if($this->config->systemMode == 'new') $lang->execution->copyTeamTip = "可以选择复制项目或{$lang->execution->common}团队的成员";
|
||||
if($this->config->systemMode == 'classic') $lang->execution->copyTeamTip = "可以选择复制{$lang->executionCommon}团队的成员";
|
||||
$lang->execution->copyTeamTip = "可以选择复制项目或{$lang->execution->common}团队的成员";
|
||||
|
||||
$lang->execution->start = "开始";
|
||||
$lang->execution->activate = "激活";
|
||||
@@ -371,8 +370,7 @@ $lang->execution->noMembers = '暂时没有团队成员。';
|
||||
$lang->execution->workloadTotal = "工作量占比累计不应当超过100, 当前产品下的工作量之和为%s";
|
||||
// $lang->execution->linkProjectStoryTip = "(关联{$lang->SRCommon}来源于项目下所关联的{$lang->SRCommon})";
|
||||
$lang->execution->linkAllStoryTip = "(项目下还未关联{$lang->SRCommon},可直接关联该{$lang->execution->common}所关联产品的{$lang->SRCommon})";
|
||||
if($config->systemMode == 'classic') $lang->execution->copyTeamTitle = "选择一个{$lang->execution->common}团队";
|
||||
if($config->systemMode == 'new') $lang->execution->copyTeamTitle = "选择一个{$lang->project->common}或{$lang->execution->common}团队";
|
||||
$lang->execution->copyTeamTitle = "选择一个{$lang->project->common}或{$lang->execution->common}团队";
|
||||
|
||||
/* 交互提示。*/
|
||||
$lang->execution->confirmDelete = "您确定删除{$lang->executionCommon}[%s]吗?";
|
||||
|
||||
+51
-86
@@ -92,7 +92,7 @@ class executionModel extends model
|
||||
$this->session->set('execution', $executionID, $this->app->tab);
|
||||
|
||||
/* Unset story, bug, build and testtask if type is ops. */
|
||||
if($execution and $execution->type == 'stage' and $this->config->systemMode == 'new')
|
||||
if($execution and $execution->type == 'stage')
|
||||
{
|
||||
global $lang;
|
||||
$this->app->loadLang('project');
|
||||
@@ -145,31 +145,21 @@ class executionModel extends model
|
||||
setCookie("lastExecution", $executionID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
$currentExecution = $this->getById($executionID);
|
||||
|
||||
if($this->config->systemMode == 'new')
|
||||
if(isset($currentExecution->type) and $currentExecution->type == 'program') return;
|
||||
|
||||
if($currentExecution->project) $project = $this->loadModel('project')->getByID($currentExecution->project);
|
||||
|
||||
if(isset($project) and $project->model == 'waterfall')
|
||||
{
|
||||
if(isset($currentExecution->type) and $currentExecution->type == 'program') return;
|
||||
|
||||
if($currentExecution->project) $project = $this->loadModel('project')->getByID($currentExecution->project);
|
||||
|
||||
if(isset($project) and $project->model == 'waterfall')
|
||||
{
|
||||
$productID = $this->loadModel('product')->getProductIDByProject($project->id);
|
||||
$productName = $this->dao->findByID($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
$currentExecution->name = $productName . '/' . $currentExecution->name;
|
||||
}
|
||||
$productID = $this->loadModel('product')->getProductIDByProject($project->id);
|
||||
$productName = $this->dao->findByID($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
$currentExecution->name = $productName . '/' . $currentExecution->name;
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
$currentExecutionName = '';
|
||||
if(isset($currentExecution->name)) $currentExecutionName = $currentExecution->name;
|
||||
|
||||
if($this->config->systemMode == 'classic')
|
||||
{
|
||||
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentExecutionName}'><span class='text'><i class='icon icon-sprint'></i> {$currentExecutionName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div>";
|
||||
}
|
||||
|
||||
$output = "<div class='btn-group angle-btn'><div class='btn-group'><button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem' title='{$currentExecutionName}'><span class='text'><i class='icon icon-{$this->lang->icons[$currentExecution->type]}'></i> {$currentExecutionName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div></div>";
|
||||
@@ -310,25 +300,22 @@ class executionModel extends model
|
||||
$type = 'sprint';
|
||||
$this->lang->execution->team = $this->lang->execution->teamname;
|
||||
|
||||
if($this->config->systemMode == 'new')
|
||||
if(empty($_POST['project']))
|
||||
{
|
||||
if(empty($_POST['project']))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->execution->projectNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end']);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
/* Determine whether to add a sprint or a stage according to the model of the execution. */
|
||||
$project = $this->loadModel('project')->getByID($_POST['project']);
|
||||
$type = 'sprint';
|
||||
if($project) $type = zget($this->config->execution->modelList, $project->model, 'sprint');
|
||||
|
||||
$this->config->execution->create->requiredFields .= ',project';
|
||||
dao::$errors['message'][] = $this->lang->execution->projectNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end']);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
/* Determine whether to add a sprint or a stage according to the model of the execution. */
|
||||
$project = $this->loadModel('project')->getByID($_POST['project']);
|
||||
$type = 'sprint';
|
||||
if($project) $type = zget($this->config->execution->modelList, $project->model, 'sprint');
|
||||
|
||||
$this->config->execution->create->requiredFields .= ',project';
|
||||
|
||||
/* Judge workdays is legitimate. */
|
||||
$workdays = helper::diffDate($_POST['end'], $_POST['begin']) + 1;
|
||||
if(isset($_POST['days']) and $_POST['days'] > $workdays)
|
||||
@@ -348,7 +335,6 @@ class executionModel extends model
|
||||
->setDefault('team', substr($this->post->name, 0, 30))
|
||||
->setIF($this->post->heightType == 'auto', 'displayCards', 0)
|
||||
->setIF(!isset($_POST['whitelist']), 'whitelist', '')
|
||||
->setIF($this->config->systemMode == 'new', 'parent', $this->post->project)
|
||||
->setIF($this->post->acl == 'open', 'whitelist', '')
|
||||
->join('whitelist', ',')
|
||||
->setDefault('type', $type)
|
||||
@@ -418,7 +404,7 @@ class executionModel extends model
|
||||
$this->file->updateObjectID($this->post->uid, $executionID, 'execution');
|
||||
|
||||
/* Update the path. */
|
||||
if($this->config->systemMode == 'new') $this->setTreePath($executionID);
|
||||
$this->setTreePath($executionID);
|
||||
|
||||
$this->updateProducts($executionID);
|
||||
|
||||
@@ -442,7 +428,7 @@ class executionModel extends model
|
||||
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
|
||||
$teamMembers[$account] = $member;
|
||||
}
|
||||
if($this->config->systemMode == 'new') $this->addProjectMembers($sprint->project, $teamMembers);
|
||||
$this->addProjectMembers($sprint->project, $teamMembers);
|
||||
|
||||
/* Create doc lib. */
|
||||
$this->app->loadLang('doc');
|
||||
@@ -517,7 +503,7 @@ class executionModel extends model
|
||||
|
||||
if(in_array($execution->status, array('closed', 'suspended'))) $this->computeBurn($executionID);
|
||||
|
||||
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
|
||||
if(empty($execution->project) or $execution->project == $oldExecution->project) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
/* Child stage inherits parent stage permissions. */
|
||||
@@ -803,7 +789,7 @@ class executionModel extends model
|
||||
->checkIF($execution->begin != '', 'begin', 'date')
|
||||
->checkIF($execution->end != '', 'end', 'date')
|
||||
->checkIF($execution->end != '', 'end', 'ge', $execution->begin)
|
||||
->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage','kanban') and `project` = $projectID and `deleted` = '0'")
|
||||
->checkIF(!empty($execution->name), 'name', 'unique', "id != $executionID and type in ('sprint','stage','kanban') and `project` = $projectID and `deleted` = '0'")
|
||||
->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage','kanban') and `deleted` = '0'")
|
||||
->checkFlow()
|
||||
->where('id')->eq($executionID)
|
||||
@@ -901,7 +887,7 @@ class executionModel extends model
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
|
||||
$this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->putoff['id'], $this->post->uid);
|
||||
@@ -1225,15 +1211,12 @@ class executionModel extends model
|
||||
$currentExecution = $this->getById($executionID);
|
||||
$currentExecutionName = $currentExecution->name;
|
||||
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($currentExecution->project);
|
||||
$project = $this->loadModel('project')->getByID($currentExecution->project);
|
||||
|
||||
if($project)
|
||||
{
|
||||
$projectNameTitle = $project->name . ' / ';
|
||||
$projectNameSpan = "<span class='text'>{$project->name}</span> / ";
|
||||
}
|
||||
if($project)
|
||||
{
|
||||
$projectNameTitle = $project->name . ' / ';
|
||||
$projectNameSpan = "<span class='text'>{$project->name}</span> / ";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1285,8 +1268,8 @@ class executionModel extends model
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('vision')->eq($this->config->vision)
|
||||
->beginIF($type == 'all')->andWhere('type')->in('stage,sprint,kanban')->fi()
|
||||
->beginIF($projectID and $this->config->systemMode == 'new')->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($type != 'all' and $this->config->systemMode == 'new')->andWhere('type')->eq($type)->fi()
|
||||
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($type != 'all')->andWhere('type')->eq($type)->fi()
|
||||
->beginIF(strpos($mode, 'withdelete') === false)->andWhere('deleted')->eq(0)->fi()
|
||||
->beginIF(!$this->app->user->admin and strpos($mode, 'all') === false)->andWhere('id')->in($this->app->user->view->sprints)->fi()
|
||||
->orderBy($orderBy)
|
||||
@@ -1557,7 +1540,7 @@ class executionModel extends model
|
||||
if($param == 'skipParent')
|
||||
{
|
||||
if($execution->parent < 0 and $execution->type == 'stage') unset($executions[$key]);
|
||||
if($this->config->systemMode == 'new' and $execution->projectName) $execution->name = $execution->projectName . ' / ' . $execution->name;
|
||||
if($execution->projectName) $execution->name = $execution->projectName . ' / ' . $execution->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2296,28 +2279,13 @@ class executionModel extends model
|
||||
*/
|
||||
public function getTasks2Imported($toExecution, $branches)
|
||||
{
|
||||
if($this->config->systemMode == 'classic')
|
||||
{
|
||||
$products = $this->loadModel('product')->getProducts($toExecution);
|
||||
if(empty($products)) return array();
|
||||
|
||||
$execution = $this->getById($toExecution);
|
||||
$executions = $this->dao->select('t1.product, t1.project')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->in(array_keys($products))
|
||||
->andWhere('t2.project')->eq($execution->project)
|
||||
->fetchGroup('project');
|
||||
}
|
||||
else
|
||||
{
|
||||
$execution = $this->getById($toExecution);
|
||||
$project = $this->loadModel('project')->getById($execution->project);
|
||||
$brotherProjects = $this->project->getBrotherProjects($project);
|
||||
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)
|
||||
->where('project')->in($brotherProjects)
|
||||
->andWhere('status')->ne('closed')
|
||||
->fetchPairs('id');
|
||||
}
|
||||
$execution = $this->getById($toExecution);
|
||||
$project = $this->loadModel('project')->getById($execution->project);
|
||||
$brotherProjects = $this->project->getBrotherProjects($project);
|
||||
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)
|
||||
->where('project')->in($brotherProjects)
|
||||
->andWhere('status')->ne('closed')
|
||||
->fetchPairs('id');
|
||||
|
||||
$branches = str_replace(',', "','", $branches);
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')->from(TABLE_TASK)->alias('t1')
|
||||
@@ -2817,12 +2785,10 @@ class executionModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
|
||||
$this->session->set('project', $projectID);
|
||||
$this->linkStory($projectID, $planStories, $planProducts);
|
||||
}
|
||||
$projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch('project');
|
||||
$this->session->set('project', $projectID);
|
||||
$this->linkStory($projectID, $planStories, $planProducts);
|
||||
|
||||
$this->linkStory($executionID, $planStories, $planProducts);
|
||||
}
|
||||
|
||||
@@ -2986,7 +2952,7 @@ class executionModel extends model
|
||||
*/
|
||||
public function getCanCopyObjects($projectID = 0)
|
||||
{
|
||||
if(empty($projectID) and $this->config->systemMode == 'new') return array();
|
||||
if(empty($projectID)) return array();
|
||||
|
||||
$objectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)
|
||||
->where('deleted')->eq(0)
|
||||
@@ -4582,11 +4548,10 @@ class executionModel extends model
|
||||
$burns = join(',', $execution->burns);
|
||||
echo "<tr $trAttrs class='$trClass'>";
|
||||
echo "<td><span id=$execution->id class='table-nest-icon icon table-nest-toggle'></span>";
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$spanClass = $execution->type == 'stage' ? 'label-warning' : 'label-info';
|
||||
echo "<span class='project-type-label label label-outline $spanClass'>{$this->lang->execution->typeList[$execution->type]}</span> ";
|
||||
}
|
||||
|
||||
$spanClass = $execution->type == 'stage' ? 'label-warning' : 'label-info';
|
||||
echo "<span class='project-type-label label label-outline $spanClass'>{$this->lang->execution->typeList[$execution->type]}</span> ";
|
||||
|
||||
if(empty($execution->children))
|
||||
{
|
||||
echo html::a(helper::createLink('execution', 'view', "executionID=$execution->id"), $execution->name);
|
||||
|
||||
@@ -95,8 +95,6 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
|
||||
{
|
||||
if($value->show)
|
||||
{
|
||||
if($config->systemMode == 'classic' and $value->id == 'project') continue;
|
||||
|
||||
$this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
|
||||
$columns ++;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($this->config->systemMode == 'classic' or $execution->grade == 1):?>
|
||||
<?php if($execution->grade == 1):?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->execution->unlinkedProducts;?></div>
|
||||
<div class='detail-content row'>
|
||||
|
||||
@@ -1297,16 +1297,8 @@ class kanban extends control
|
||||
|
||||
$builds2Imported = array();
|
||||
$projects = array($this->lang->kanban->allProjects);
|
||||
if($this->config->systemMode == 'classic')
|
||||
{
|
||||
$projects += $this->loadModel('execution')->getPairs();
|
||||
$builds2Imported = $this->build->getExecutionBuilds($selectedProjectID, '', '', 't1.date_desc,t1.id_desc', $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
$projects += $this->loadModel('project')->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
|
||||
$builds2Imported = $this->build->getProjectBuilds($selectedProjectID, 'all', 0, 't1.date_desc,t1.id_desc', $pager);
|
||||
}
|
||||
$projects += $this->loadModel('project')->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
|
||||
$builds2Imported = $this->build->getProjectBuilds($selectedProjectID, 'all', 0, 't1.date_desc,t1.id_desc', $pager);
|
||||
|
||||
$this->view->projects = $projects;
|
||||
$this->view->selectedProjectID = $selectedProjectID;
|
||||
|
||||
@@ -84,7 +84,7 @@ $lang->kanban->importRelease = 'Release';
|
||||
$lang->kanban->importExecution = $lang->execution->common;
|
||||
$lang->kanban->importBuild = 'Build';
|
||||
$lang->kanban->allKanban = 'All Kanban';
|
||||
$lang->kanban->allProjects = 'All ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Projects');
|
||||
$lang->kanban->allProjects = 'All Projects';
|
||||
$lang->kanban->allProducts = 'All Products';
|
||||
$lang->kanban->mine = 'Mine';
|
||||
$lang->kanban->alignment = 'Alignment';
|
||||
@@ -124,7 +124,7 @@ $lang->kanban->cardCountTip = 'Please enter the number of cards';
|
||||
|
||||
$lang->kanban->selectedKanban = 'Please select Kanban';
|
||||
$lang->kanban->selectedProduct = 'Please select Product';
|
||||
$lang->kanban->selectedProject = 'Please select ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Project');
|
||||
$lang->kanban->selectedProject = 'Please select Project';
|
||||
$lang->kanban->selectedLane = 'Target Lane';
|
||||
|
||||
$lang->kanban->aclGroup['open'] = 'Open';
|
||||
|
||||
@@ -84,7 +84,7 @@ $lang->kanban->importRelease = 'Release';
|
||||
$lang->kanban->importExecution = $lang->execution->common;
|
||||
$lang->kanban->importBuild = 'Build';
|
||||
$lang->kanban->allKanban = 'All Kanban';
|
||||
$lang->kanban->allProjects = 'All ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Projects');
|
||||
$lang->kanban->allProjects = 'All Projects';
|
||||
$lang->kanban->allProducts = 'All Products';
|
||||
$lang->kanban->mine = 'Mine';
|
||||
$lang->kanban->alignment = 'Alignment';
|
||||
@@ -124,7 +124,7 @@ $lang->kanban->cardCountTip = 'Please enter the number of cards';
|
||||
|
||||
$lang->kanban->selectedKanban = 'Please select Kanban';
|
||||
$lang->kanban->selectedProduct = 'Please select Product';
|
||||
$lang->kanban->selectedProject = 'Please select ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Project');
|
||||
$lang->kanban->selectedProject = 'Please select Project';
|
||||
$lang->kanban->selectedLane = 'Target Lane';
|
||||
|
||||
$lang->kanban->aclGroup['open'] = 'Open';
|
||||
|
||||
@@ -84,7 +84,7 @@ $lang->kanban->importRelease = 'Release';
|
||||
$lang->kanban->importExecution = $lang->execution->common;
|
||||
$lang->kanban->importBuild = 'Build';
|
||||
$lang->kanban->allKanban = 'All Kanban';
|
||||
$lang->kanban->allProjects = 'All ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Projects');
|
||||
$lang->kanban->allProjects = 'All Projects';
|
||||
$lang->kanban->allProducts = 'All Products';
|
||||
$lang->kanban->mine = 'Mine';
|
||||
$lang->kanban->alignment = 'Alignment';
|
||||
@@ -124,7 +124,7 @@ $lang->kanban->cardCountTip = 'Please enter the number of cards';
|
||||
|
||||
$lang->kanban->selectedKanban = 'Please select Kanban';
|
||||
$lang->kanban->selectedProduct = 'Please select Product';
|
||||
$lang->kanban->selectedProject = 'Please select ' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : 'Project');
|
||||
$lang->kanban->selectedProject = 'Please select Project';
|
||||
$lang->kanban->selectedLane = 'Target Lane';
|
||||
|
||||
$lang->kanban->aclGroup['open'] = 'Open';
|
||||
|
||||
@@ -84,7 +84,7 @@ $lang->kanban->importRelease = '发布';
|
||||
$lang->kanban->importExecution = $lang->execution->common;
|
||||
$lang->kanban->importBuild = '版本';
|
||||
$lang->kanban->allKanban = '所有看板';
|
||||
$lang->kanban->allProjects = '所有' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : '项目');
|
||||
$lang->kanban->allProjects = '所有项目';
|
||||
$lang->kanban->allProducts = '所有产品';
|
||||
$lang->kanban->mine = '我负责';
|
||||
$lang->kanban->alignment = '列标题对齐方式';
|
||||
@@ -124,7 +124,7 @@ $lang->kanban->cardCountTip = '请输入卡片数量';
|
||||
|
||||
$lang->kanban->selectedKanban = '请选择看板';
|
||||
$lang->kanban->selectedProduct = '请选择产品';
|
||||
$lang->kanban->selectedProject = '请选择' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : '项目');
|
||||
$lang->kanban->selectedProject = '请选择项目';
|
||||
$lang->kanban->selectedLane = '目标泳道';
|
||||
|
||||
$lang->kanban->aclGroup['open'] = '公开';
|
||||
|
||||
@@ -23,10 +23,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class='input-group space'>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<span class='input-group-addon'><?php echo $lang->kanban->selectedProject;?></span>
|
||||
<?php echo html::select('project', $projects, $selectedProjectID, "onchange='reloadObjectList(this.value)' class='form-control chosen' data-drop_direction='down'");?>
|
||||
<?php endif;?>
|
||||
<span class='input-group-addon'><?php echo $lang->kanban->selectedLane;?></span>
|
||||
<?php echo html::select('lane', $lanePairs, '', "onchange='setTargetLane(this.value)' class='form-control chosen' data-drop_direction='down'");?>
|
||||
</div>
|
||||
@@ -88,9 +86,6 @@
|
||||
<div class='table-empty-tip'><?php echo $lang->noData;?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php if($config->systemMode == 'classic'):?>
|
||||
<style>.input-group {width: 45% !important}</style>
|
||||
<?php else:?>
|
||||
<style>#project_chosen {width: 45% !important}</style>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -220,8 +220,7 @@ $(function()
|
||||
if($item.children('.productplan').length) icon = '<i class="icon icon-delay">';
|
||||
if($item.children('.release').length) icon = '<i class="icon icon-publish">';
|
||||
|
||||
if($item.children('.execution').length && systemMode == 'new') icon = '<i class="icon icon-run">';
|
||||
if($item.children('.execution').length && systemMode == 'classic') icon = '<i class="icon icon-project">';
|
||||
if($item.children('.execution').length) icon = '<i class="icon icon-run">';
|
||||
|
||||
$item.children('.cardName').prepend(icon);
|
||||
});
|
||||
|
||||
@@ -792,7 +792,6 @@ class productplan extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Build the search form. */
|
||||
if($this->config->systemMode == 'classic') unset($this->config->bug->search['fields']['project']);
|
||||
$this->config->bug->search['actionURL'] = $this->createLink('productplan', 'view', "planID=$planID&type=bug&orderBy=$orderBy&link=true¶m=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
|
||||
$this->config->bug->search['queryID'] = $queryID;
|
||||
$this->config->bug->search['style'] = 'simple';
|
||||
@@ -801,7 +800,7 @@ class productplan extends control
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productID, $branch = 'all', $params = '');
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getBuildPairs($productID, $branch = 'all', $params = '');
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($plan->product, 'bug', 0, $plan->branch);
|
||||
if($this->config->systemMode == 'new') $this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairsByProduct($productID, $plan->branch);
|
||||
$this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairsByProduct($productID, $plan->branch);
|
||||
|
||||
unset($this->config->bug->search['fields']['product']);
|
||||
if($this->session->currentProductType == 'normal')
|
||||
|
||||
@@ -581,8 +581,7 @@ class programModel extends model
|
||||
->andWhere('t1.reviewStatus')->eq('doing')
|
||||
->fi()
|
||||
->beginIF($path)->andWhere('t1.path')->like($path . '%')->fi()
|
||||
->beginIF(!$queryAll and !$this->app->user->admin and $this->config->systemMode == 'new')->andWhere('t1.id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(!$queryAll and !$this->app->user->admin and $this->config->systemMode == 'classic')->andWhere('t1.id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF(!$queryAll and !$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF($this->cookie->involved or $involved)
|
||||
->andWhere('t1.openedBy', true)->eq($this->app->user->account)
|
||||
->orWhere('t1.PM')->eq($this->app->user->account)
|
||||
|
||||
+12
-16
@@ -163,7 +163,7 @@ class projectModel extends model
|
||||
|
||||
$project = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where('id')->eq($projectID)
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('`type`')->in($type)->fi()
|
||||
->andWhere('`type`')->in($type)
|
||||
->fetch();
|
||||
|
||||
if(!$project) return false;
|
||||
@@ -197,12 +197,11 @@ class projectModel extends model
|
||||
->groupBy('t1.root')
|
||||
->fetchAll('root');
|
||||
|
||||
$condition = $this->config->systemMode == 'classic' ? 't2.id as project' : 't2.parent as project';
|
||||
$condition = 't2.parent as project';
|
||||
$estimates = $this->dao->select("$condition, sum(estimate) as estimate")->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
|
||||
->where('t1.parent')->lt(1)
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('t2.parent')->in($projectIdList)->fi()
|
||||
->beginIF($this->config->systemMode == 'classic')->andWhere('t2.id')->in($projectIdList)->fi()
|
||||
->andWhere('t2.parent')->in($projectIdList)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->groupBy('project')
|
||||
@@ -895,7 +894,7 @@ class projectModel extends model
|
||||
$this->config->project->search['params']['parent']['values'] = $programPairs;
|
||||
|
||||
if(isset($this->config->setCode) and $this->config->setCode == 0) unset($this->config->project->search['fields']['code'], $this->config->project->search['params']['code']);
|
||||
if($this->config->systemMode == 'lite') unset($this->config->project->search['fields']['parent'], $this->config->project->search['params']['parent']);
|
||||
if($this->config->systemMode == 'lean') unset($this->config->project->search['fields']['parent'], $this->config->project->search['params']['parent']);
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->project->search);
|
||||
}
|
||||
@@ -1231,7 +1230,7 @@ class projectModel extends model
|
||||
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
|
||||
$teamMembers[$account] = $member;
|
||||
}
|
||||
if($this->config->systemMode == 'new') $this->loadModel('execution')->addProjectMembers($projectID, $teamMembers);
|
||||
$this->loadModel('execution')->addProjectMembers($projectID, $teamMembers);
|
||||
|
||||
$whitelist = explode(',', $project->whitelist);
|
||||
$this->loadModel('personnel')->updateWhitelist($whitelist, 'project', $projectID);
|
||||
@@ -2202,9 +2201,9 @@ class projectModel extends model
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembers();
|
||||
|
||||
$project = $this->getByID($projectID);
|
||||
$type = $this->config->systemMode == 'new' ? $project->type : 'project';
|
||||
if(empty($project)) return array();
|
||||
|
||||
$type = $this->config->systemMode == 'new' ? $project->type : 'project';
|
||||
return $this->dao->select("t1.*, t1.hours * t1.days AS totalHours, t2.id as userID, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->eq((int)$projectID)
|
||||
@@ -2227,10 +2226,7 @@ class projectModel extends model
|
||||
if(empty($project)) return array();
|
||||
|
||||
$type = 'project';
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
if($project->type == 'sprint' or $project->type == 'stage' or $project->type == 'kanban') $type = 'execution';
|
||||
}
|
||||
if($project->type == 'sprint' or $project->type == 'stage' or $project->type == 'kanban') $type = 'execution';
|
||||
|
||||
$members = $this->dao->select("t1.account, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
@@ -2581,7 +2577,7 @@ class projectModel extends model
|
||||
$menu = '';
|
||||
$params = "projectID=$project->id";
|
||||
|
||||
$moduleName = $this->config->systemMode == 'classic' ? "execution" : "project";
|
||||
$moduleName = "project";
|
||||
if($project->status == 'wait' || $project->status == 'suspended')
|
||||
{
|
||||
$menu .= $this->buildMenu($moduleName, 'start', $params, $project, 'browse', 'play', '', 'iframe', true);
|
||||
@@ -2604,14 +2600,14 @@ class projectModel extends model
|
||||
$from = $project->from == 'project' ? 'project' : 'pgmproject';
|
||||
$iframe = $this->app->tab == 'program' ? 'iframe' : '';
|
||||
$onlyBody = $this->app->tab == 'program' ? true : '';
|
||||
$dataApp = $this->config->systemMode == 'classic' ? "data-app=execution" : "data-app=project";
|
||||
$dataApp = "data-app=project";
|
||||
|
||||
$menu .= $this->buildMenu($moduleName, 'edit', $params, $project, 'browse', 'edit', '', $iframe, $onlyBody, $dataApp);
|
||||
|
||||
if($this->config->vision != 'lite')
|
||||
{
|
||||
$menu .= $this->buildMenu($moduleName, 'team', $params, $project, 'browse', 'group', '', '', '', $dataApp, $this->lang->execution->team);
|
||||
if($this->config->systemMode == 'new') $menu .= $this->buildMenu('project', 'group', "$params&programID={$project->programID}", $project, 'browse', 'lock', '', '', '', $dataApp);
|
||||
$menu .= $this->buildMenu('project', 'group', "$params&programID={$project->programID}", $project, 'browse', 'lock', '', '', '', $dataApp);
|
||||
|
||||
if(common::hasPriv($moduleName, 'manageProducts') || common::hasPriv($moduleName, 'whitelist') || common::hasPriv($moduleName, 'delete'))
|
||||
{
|
||||
@@ -2619,7 +2615,7 @@ class projectModel extends model
|
||||
$menu .= "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
|
||||
$menu .= "<ul class='dropdown-menu pull-right text-center' role='menu'>";
|
||||
$menu .= $this->buildMenu($moduleName, 'manageProducts', $params . "&from={$this->app->tab}", $project, 'browse', 'link', '', 'btn-action', '', '', $this->lang->project->manageProducts);
|
||||
if($this->config->systemMode == 'new') $menu .= $this->buildMenu('project', 'whitelist', "$params&module=project&from=$from", $project, 'browse', 'shield-check', '', 'btn-action', '', $dataApp);
|
||||
$menu .= $this->buildMenu('project', 'whitelist', "$params&module=project&from=$from", $project, 'browse', 'shield-check', '', 'btn-action', '', $dataApp);
|
||||
$menu .= $this->buildMenu($moduleName, "delete", $params, $project, 'browse', 'trash', 'hiddenwin', 'btn-action');
|
||||
$menu .= "</ul>";
|
||||
$menu .= "</div>";
|
||||
@@ -2628,7 +2624,7 @@ class projectModel extends model
|
||||
else
|
||||
{
|
||||
$menu .= $this->buildMenu($moduleName, 'team', $params, $project, 'browse', 'group', '', '', '', $dataApp, $this->lang->execution->team);
|
||||
if($this->config->systemMode == 'new') $menu .= $this->buildMenu('project', 'whitelist', "$params&module=project&from=$from", $project, 'browse', 'shield-check', '', 'btn-action', '', $dataApp);
|
||||
$menu .= $this->buildMenu('project', 'whitelist', "$params&module=project&from=$from", $project, 'browse', 'shield-check', '', 'btn-action', '', $dataApp);
|
||||
$menu .= $this->buildMenu($moduleName, "delete", $params, $project, 'browse', 'trash', 'hiddenwin', 'btn-action');
|
||||
}
|
||||
|
||||
|
||||
+6
-12
@@ -291,7 +291,7 @@ class task extends control
|
||||
/* Set Custom*/
|
||||
foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field;
|
||||
|
||||
$executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($projectID, 'noclosed', 0, true);
|
||||
$executions = $this->execution->getByProject($projectID, 'noclosed', 0, true);
|
||||
|
||||
$testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $execution->id);
|
||||
/* Stories that can be used to create test tasks. */
|
||||
@@ -436,11 +436,8 @@ class task extends control
|
||||
$modules = $this->loadModel('tree')->getTaskOptionMenu($executionID, 0, 0, $showAllModule ? 'allModule' : '');
|
||||
|
||||
/* Set Custom*/
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$project = $this->project->getByID($execution->project);
|
||||
if($project->model == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
|
||||
}
|
||||
$project = $this->project->getByID($execution->project);
|
||||
if($project->model == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
|
||||
|
||||
foreach(explode(',', $this->config->task->customBatchCreateFields) as $field)
|
||||
{
|
||||
@@ -619,7 +616,7 @@ class task extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
|
||||
$this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->execution, 0, 0, $this->view->showAllModule ? 'allModule' : '');
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($task->project, 'noclosed', 0, true, false, $task->execution);
|
||||
$this->view->executions = $this->execution->getByProject($task->project, 'noclosed', 0, true, false, $task->execution);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -730,11 +727,8 @@ class task extends control
|
||||
/* Set Custom*/
|
||||
if(isset($execution))
|
||||
{
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$project = $this->project->getByID($execution->project);
|
||||
if($project->model == 'waterfall') $this->config->task->edit->requiredFields .= ',estStarted,deadline';
|
||||
}
|
||||
$project = $this->project->getByID($execution->project);
|
||||
if($project->model == 'waterfall') $this->config->task->edit->requiredFields .= ',estStarted,deadline';
|
||||
|
||||
foreach(explode(',', $this->config->task->customBatchEditFields) as $field)
|
||||
{
|
||||
|
||||
@@ -1756,7 +1756,7 @@ class userModel extends model
|
||||
if($allProducts === null) $allProducts = $this->dao->select('id,PO,QD,RD,createdBy,acl,whitelist,program,createdBy')->from(TABLE_PRODUCT)->where('acl')->ne('open')->fetchAll('id');
|
||||
if($allProjects === null) $allProjects = $this->dao->select('id,PO,PM,QD,RD,acl,type,path,parent,openedBy')->from(TABLE_PROJECT)->where('acl')->ne('open')->andWhere('type')->eq('project')->fetchAll('id');
|
||||
if($allPrograms === null) $allPrograms = $this->dao->select('id,PO,PM,QD,RD,acl,type,path,parent,openedBy')->from(TABLE_PROGRAM)->where('acl')->ne('open')->andWhere('type')->eq('program')->fetchAll('id');
|
||||
if($allSprints === null) $allSprints = $this->dao->select('id,PO,PM,QD,RD,acl,project,path,parent,type,openedBy')->from(TABLE_PROJECT)->where('acl')->eq('private')->beginIF($this->config->systemMode == 'new')->andWhere('type')->in('sprint,stage,kanban')->fi()->fetchAll('id');
|
||||
if($allSprints === null) $allSprints = $this->dao->select('id,PO,PM,QD,RD,acl,project,path,parent,type,openedBy')->from(TABLE_PROJECT)->where('acl')->eq('private')->andWhere('type')->in('sprint,stage,kanban')->fetchAll('id');
|
||||
|
||||
/* Get admins. */
|
||||
$manageObjects = array();
|
||||
@@ -1938,8 +1938,7 @@ class userModel extends model
|
||||
$teamGroups = array();
|
||||
$stmt = $this->dao->select('root,account')->from(TABLE_TEAM)
|
||||
->where('1=1')
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('type')->eq('project')->fi()
|
||||
->beginIF($this->config->systemMode == 'classic')->andWhere('type')->eq('execution')->fi()
|
||||
->andWhere('type')->eq('project')
|
||||
->andWhere('root')->in(array_keys($projectProducts))
|
||||
->andWhere('root')->ne(0)
|
||||
->query();
|
||||
@@ -2057,8 +2056,8 @@ class userModel extends model
|
||||
/* Set opened sprints and stages into userview. */
|
||||
$openedSprints = $this->dao->select('id')->from(TABLE_PROJECT)
|
||||
->where('acl')->eq('open')
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('type')->in('sprint,stage,kanban')->fi()
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('project')->in($userView->projects)->fi()
|
||||
->andWhere('type')->in('sprint,stage,kanban')
|
||||
->andWhere('project')->in($userView->projects)
|
||||
->fetchAll('id');
|
||||
|
||||
$openedSprints = join(',', array_keys($openedSprints));
|
||||
@@ -2516,7 +2515,7 @@ class userModel extends model
|
||||
}
|
||||
|
||||
/* Judge sprint auth. */
|
||||
if(($project->type == 'sprint' or $project->type == 'stage' or $project->type == 'kanban') and $project->acl == 'private' and $this->config->systemMode == 'new')
|
||||
if(($project->type == 'sprint' or $project->type == 'stage' or $project->type == 'kanban') and $project->acl == 'private')
|
||||
{
|
||||
$parent = $this->dao->select('openedBy,PM')->from(TABLE_PROJECT)->where('id')->eq($project->project)->fetch();
|
||||
if(empty($parent)) return false;
|
||||
@@ -2611,7 +2610,7 @@ class userModel extends model
|
||||
}
|
||||
|
||||
/* Judge sprint auth. */
|
||||
if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private' && $this->config->systemMode == 'new')
|
||||
if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private')
|
||||
{
|
||||
$parent = $this->dao->select('openedBy,PM')->from(TABLE_PROJECT)->where('id')->eq($project->project)->fetch();
|
||||
$users[$parent->openedBy] = $parent->openedBy;
|
||||
|
||||
Reference in New Issue
Block a user