* Fix bug of task #84584.
This commit is contained in:
@@ -374,6 +374,11 @@ class action extends control
|
||||
$hasCreatedTask = $this->loadModel('programplan')->isCreateTask($execution->parent);
|
||||
if(!$hasCreatedTask) die(js::alert($this->lang->action->hasCreatedTask));
|
||||
|
||||
/* Check type of siblings. */
|
||||
$siblings = $this->dao->select('DISTINCT type')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('parent')->eq($execution->parent)->fetchPairs('type');
|
||||
if($execution->type == 'stage' and (isset($bsiblings['sprint']) or isset($siblings['kanban']))) die(js::alert($this->lang->action->hasOtherType[$execution->type]));
|
||||
if(($execution->type == 'sprint' or $execution->type == 'kanban') and isset($siblings['stage'])) die(js::alert($this->lang->action->hasOtherType[$execution->type]));
|
||||
|
||||
/* If parent stage is not exists, you should recover its parent stages, refresh status. */
|
||||
$stagePathList = explode(',', trim($execution->path, ','));
|
||||
$deletedStageList = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($stagePathList)->andWhere('deleted')->eq(1)->andWhere('type')->eq('stage')->orderBy('id_asc')->fetchAll('id');
|
||||
|
||||
@@ -63,6 +63,11 @@ $lang->action->hasDeletedParent = 'Restoring this phase requires restoring the
|
||||
$lang->action->hasChangedAttr = "After recovery, the phase type will be adjusted to '%s' according to the parent phase type.";
|
||||
$lang->action->whetherToRestore = 'Confirm to restore?';
|
||||
|
||||
$lang->action->hasOtherType = array();
|
||||
$lang->action->hasOtherType['stage'] = "Only subtypes of {$lang->executionCommon} / Kanban types can be created at this parent stage, so the current stage cannot be restored.";
|
||||
$lang->action->hasOtherType['sprint'] = "Only subtypes of Stage types can be created at this parent stage, so the current {$lang->executionCommon} cannot be restored.";
|
||||
$lang->action->hasOtherType['kanban'] = "Only subtypes of Stage types can be created at this parent stage, so the current Kanban cannot be restored.";
|
||||
|
||||
$lang->action->repeatChange = '%s with the same name and code already exists in the system, After recovery, the name are \"%s\",the code are \"%s\".';
|
||||
$lang->action->nameRepeatChange = '%s with the same name already exists in the system, After recovery, the name are \"%s\".';
|
||||
$lang->action->codeRepeatChange = '%s with the same code already exists in the system, After recovery, the code are \"%s\".';
|
||||
|
||||
@@ -63,6 +63,11 @@ $lang->action->hasDeletedParent = 'Restoring this phase requires restoring the
|
||||
$lang->action->hasChangedAttr = "After recovery, the phase type will be adjusted to '%s' according to the parent phase type.";
|
||||
$lang->action->whetherToRestore = 'Confirm to restore?';
|
||||
|
||||
$lang->action->hasOtherType = array();
|
||||
$lang->action->hasOtherType['stage'] = "Only subtypes of {$lang->executionCommon} / Kanban types can be created at this parent stage, so the current stage cannot be restored.";
|
||||
$lang->action->hasOtherType['sprint'] = "Only subtypes of Stage types can be created at this parent stage, so the current {$lang->executionCommon} cannot be restored.";
|
||||
$lang->action->hasOtherType['kanban'] = "Only subtypes of Stage types can be created at this parent stage, so the current Kanban cannot be restored.";
|
||||
|
||||
$lang->action->repeatChange = '%s with the same name and code already exists in the system, After recovery, the name are \"%s\",the code are \"%s\".';
|
||||
$lang->action->nameRepeatChange = '%s with the same name already exists in the system, After recovery, the name are \"%s\".';
|
||||
$lang->action->codeRepeatChange = '%s with the same code already exists in the system, After recovery, the code are \"%s\".';
|
||||
|
||||
@@ -63,6 +63,11 @@ $lang->action->hasDeletedParent = 'Restoring this phase requires restoring the
|
||||
$lang->action->hasChangedAttr = "After recovery, the phase type will be adjusted to '%s' according to the parent phase type.";
|
||||
$lang->action->whetherToRestore = 'Confirm to restore?';
|
||||
|
||||
$lang->action->hasOtherType = array();
|
||||
$lang->action->hasOtherType['stage'] = "Only subtypes of {$lang->executionCommon} / Kanban types can be created at this parent stage, so the current stage cannot be restored.";
|
||||
$lang->action->hasOtherType['sprint'] = "Only subtypes of Stage types can be created at this parent stage, so the current {$lang->executionCommon} cannot be restored.";
|
||||
$lang->action->hasOtherType['kanban'] = "Only subtypes of Stage types can be created at this parent stage, so the current Kanban cannot be restored.";
|
||||
|
||||
$lang->action->repeatChange = '%s with the same name and code already exists in the system, After recovery, the name are \"%s\",the code are \"%s\".';
|
||||
$lang->action->nameRepeatChange = '%s with the same name already exists in the system, After recovery, the name are \"%s\".';
|
||||
$lang->action->codeRepeatChange = '%s with the same code already exists in the system, After recovery, the code are \"%s\".';
|
||||
|
||||
@@ -63,6 +63,11 @@ $lang->action->hasDeletedParent = '恢复该阶段需要同时恢复已删除
|
||||
$lang->action->hasChangedAttr = '恢复后阶段类型将根据父阶段类型均调整为“%s”,';
|
||||
$lang->action->whetherToRestore = '是否恢复?';
|
||||
|
||||
$lang->action->hasOtherType = array();
|
||||
$lang->action->hasOtherType['stage'] = "当前阶段的父级现在只允许创建{$lang->executionCommon}/看板类型的子级,故无法恢复当前阶段。";
|
||||
$lang->action->hasOtherType['sprint'] = "当前{$lang->executionCommon}的父级现在只允许创建阶段类型的子级,故无法恢复当前{$lang->executionCommon}。";
|
||||
$lang->action->hasOtherType['kanban'] = "当前看板的父级现在只允许创建阶段类型的子级,故无法恢复当前看板。";
|
||||
|
||||
$lang->action->repeatChange = '系统内已有同名、同代号的%s,恢复后名称为\"%s\"、代号为\"%s\"。';
|
||||
$lang->action->nameRepeatChange = '系统内已有同名的%s,恢复后名称为\"%s\"。';
|
||||
$lang->action->codeRepeatChange = '系统内已有同代号的%s,恢复后代号为\"%s\"。';
|
||||
|
||||
@@ -58,10 +58,10 @@ $config->programplan->customCreateFields = 'PM,percent,attribute,acl,milestone,r
|
||||
$config->programplan->custom = new stdclass();
|
||||
$config->programplan->custom->createFields = 'PM,percent,attribute,acl,milestone';
|
||||
|
||||
$config->programplan->customAgilePlusCreateFields = 'PM,milestone,acl,desc';
|
||||
$config->programplan->customAgilePlusCreateFields = 'PM,milestone,acl,desc,attribute';
|
||||
|
||||
$config->programplan->customAgilePlus = new stdclass();
|
||||
$config->programplan->customAgilePlus->createFields = 'PM,milestone,acl,desc';
|
||||
$config->programplan->customAgilePlus->createFields = 'PM,milestone,acl,desc,attribute';
|
||||
|
||||
$config->programplan->custom->customGanttFields = 'PM,deadline,status,realBegan,realEnd,progress,taskProgress,estimate,consumed,delay,delayDays';
|
||||
$config->programplan->ganttCustom = new stdclass();
|
||||
|
||||
@@ -168,13 +168,13 @@ class programplan extends control
|
||||
|
||||
$executions = !empty($planID) ? $this->loadModel('execution')->getChildExecutions($planID) : array();
|
||||
$plans = $this->programplan->getStage($planID ? $planID : $projectID, $this->productID, 'parent');
|
||||
if(!empty($planID) and !empty($plans))
|
||||
if(!empty($planID) and !empty($plans) and $project->model == 'waterfallplus')
|
||||
{
|
||||
$executionType = 'stage';
|
||||
unset($this->lang->programplan->typeList['agileplus']);
|
||||
}
|
||||
|
||||
if(!empty($planID) and !empty($executions) and empty($plans))
|
||||
if(!empty($planID) and !empty($executions) and empty($plans) and $project->model == 'waterfallplus')
|
||||
{
|
||||
$executionType = 'agileplus';
|
||||
unset($this->lang->programplan->typeList['stage']);
|
||||
@@ -208,7 +208,7 @@ class programplan extends control
|
||||
$this->view->productID = $productID ? $productID : key($productList);
|
||||
$this->view->stages = empty($planID) ? $this->loadModel('stage')->getStages('id_asc') : array();
|
||||
$this->view->programPlan = $programPlan;
|
||||
$this->view->plans = empty($executions) ? $this->programplan->getStage($planID ? $planID : $projectID, $this->productID, 'parent', 'order_asc') : $executions;
|
||||
$this->view->plans = empty($executions) ? $plans : $executions;
|
||||
$this->view->planID = $planID;
|
||||
$this->view->type = 'lists';
|
||||
$this->view->executionType = $executionType;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<?php if(!empty($planID)):?>
|
||||
<?php if(!empty($planID) and $project->model == 'waterfallplus'):?>
|
||||
<div class="pull-left">
|
||||
<div class='btn-group'>
|
||||
<a href='javascript:;' class='btn btn-link btn-limit' data-toggle='dropdown'><span class='text' title='<?php echo zget($lang->programplan->typeList, $executionType);?>'><?php echo zget($lang->programplan->typeList, $executionType);?></span> <span class='caret'></span></a>
|
||||
|
||||
Reference in New Issue
Block a user