* Finish task #84584.

This commit is contained in:
liumengyi
2023-02-14 13:13:46 +08:00
parent 56c2cdcb21
commit 7ea51e54b5
17 changed files with 139 additions and 49 deletions
+4
View File
@@ -142,6 +142,8 @@ $lang->block->default['waterfall']['project']['6']['block'] = 'projectdynamic';
$lang->block->default['waterfall']['project']['6']['grid'] = 4;
$lang->block->default['waterfall']['project']['6']['source'] = 'project';
$lang->block->default['waterfallplus'] = $lang->block->default['waterfall'];
$lang->block->default['scrum']['project']['1']['title'] = '项目概况';
$lang->block->default['scrum']['project']['1']['block'] = 'scrumoverview';
$lang->block->default['scrum']['project']['1']['grid'] = 8;
@@ -383,6 +385,8 @@ $lang->block->modules['waterfall']['index']->availableBlocks = new stdclass();
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = "项目计划";
$lang->block->modules['waterfall']['index']->availableBlocks->projectdynamic = '最新动态';
$lang->block->modules['waterfallplus']['index'] = $lang->block->modules['waterfall']['index'];
$lang->block->modules['product'] = new stdclass();
$lang->block->modules['product']->availableBlocks = new stdclass();
$lang->block->modules['product']->availableBlocks->statistic = $lang->productCommon . '统计';
+2 -2
View File
@@ -4056,7 +4056,7 @@ class execution extends control
$fields = $this->post->exportFields ? $this->post->exportFields : explode(',', $executionConfig->list->exportFields);
foreach($fields as $key => $fieldName)
{
if($fieldName == 'name' and $this->app->tab == 'project' and $project->model == 'agileplus') $fields['method'] = $executionLang->method;
if($fieldName == 'name' and $this->app->tab == 'project' and ($project->model == 'agileplus' or $project->model == 'waterfallplus')) $fields['method'] = $executionLang->method;
$fieldName = trim($fieldName);
$fields[$fieldName] = zget($executionLang, $fieldName);
@@ -4089,7 +4089,7 @@ class execution extends control
$execution->totalConsumed = $execution->hours->totalConsumed;
$execution->totalLeft = $execution->hours->totalLeft;
$execution->progress = $execution->hours->progress . '%';
if($this->app->tab == 'project' and $project->model == 'agileplus') $execution->method = zget($executionLang->typeList, $execution->type);
if($this->app->tab == 'project' and ($project->model == 'agileplus' or $project->model == 'waterfallplus')) $execution->method = zget($executionLang->typeList, $execution->type);
if($this->post->exportType == 'selected')
{
+5 -4
View File
@@ -1669,7 +1669,7 @@ class executionModel extends model
}
else
{
if(isset($executions[$execution->parent]) and $execution->type == 'stage')
if(isset($executions[$execution->parent]))
{
$executions[$execution->parent]->children[$key] = $execution;
$childList[$key] = $key;
@@ -1970,7 +1970,7 @@ class executionModel extends model
*/
public function getChildExecutions($executionID)
{
return $this->dao->select('id, name, status')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('parent')->eq((int)$executionID)->fetchAll('id');
return $this->dao->select('*')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('parent')->eq((int)$executionID)->fetchAll('id');
}
/**
@@ -4827,11 +4827,12 @@ class executionModel extends model
$class = !empty($execution->children) ? 'disabled' : '';
common::printIcon('task', 'create', "executionID={$execution->id}", '', 'list', '', '', $class, false, "data-app='execution'");
if($execution->type == 'stage')
if($execution->type == 'stage' or $this->app->tab == 'project')
{
$isCreateTask = $this->loadModel('programplan')->isCreateTask($execution->id);
$disabled = $isCreateTask ? '' : ' disabled';
$disabled = ($isCreateTask and $execution->type == 'stage') ? '' : ' disabled';
$title = !$isCreateTask ? $this->lang->programplan->error->createdTask : $this->lang->programplan->createSubPlan;
$title = (!empty($disabled) and $execution->type != 'stage') ? $this->lang->programplan->error->notStage : $title;
common::printIcon('programplan', 'create', "program={$execution->project}&productID=$productID&planID=$execution->id", $execution, 'list', 'split', '', $disabled, '', '', $title);
}
+5
View File
@@ -58,6 +58,11 @@ $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->customAgilePlus = new stdclass();
$config->programplan->customAgilePlus->createFields = 'PM,milestone,acl,desc';
$config->programplan->custom->customGanttFields = 'PM,deadline,status,realBegan,realEnd,progress,taskProgress,estimate,consumed,delay,delayDays';
$config->programplan->ganttCustom = new stdclass();
$config->programplan->ganttCustom->ganttFields = 'PM,deadline';
+28 -7
View File
@@ -141,7 +141,7 @@ class programplan extends control
* @access public
* @return void
*/
public function create($projectID = 0, $productID = 0, $planID = 0)
public function create($projectID = 0, $productID = 0, $planID = 0, $executionType = 'stage')
{
$this->commonAction($projectID, $productID);
$this->app->loadLang('project');
@@ -165,10 +165,27 @@ class programplan extends control
$this->view->position[] = html::a($this->createLink('programplan', 'browse', "projectID=$projectID"), $project->name);
$this->view->position[] = $this->lang->programplan->create;
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $this->config->programplan->customCreateFields) as $field) $customFields[$field] = $this->lang->programplan->$field;
$showFields = $this->config->programplan->custom->createFields;
$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))
{
$executionType = 'stage';
unset($this->lang->programplan->typeList['agileplus']);
}
if(!empty($planID) and !empty($executions) and empty($plans))
{
$executionType = 'agileplus';
unset($this->lang->programplan->typeList['stage']);
}
$visibleFields = array();
$requiredFields = array();
$custom = $executionType == 'stage' ? 'custom' : 'customAgilePlus';
$customCreateFields = $executionType == 'stage' ? 'customCreateFields' : 'customAgilePlusCreateFields';
foreach(explode(',', $this->config->programplan->$customCreateFields) as $field) $customFields[$field] = $this->lang->programplan->$field;
$showFields = $this->config->programplan->$custom->createFields;
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
@@ -179,19 +196,23 @@ class programplan extends control
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$this->config->programplan->customCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
if(strpos(",{$this->config->programplan->$customCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
if($executionType != 'stage') unset($this->lang->execution->typeList[''], $this->lang->execution->typeList['stage']);
$this->view->productList = $productList;
$this->view->project = $project;
$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 = $this->programplan->getStage($planID ? $planID : $projectID, $this->productID, 'parent');
$this->view->plans = empty($executions) ? $this->programplan->getStage($planID ? $planID : $projectID, $this->productID, 'parent') : $executions;
$this->view->planID = $planID;
$this->view->type = 'lists';
$this->view->executionType = $executionType;
$this->view->PMUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $project->PM);
$this->view->custom = $custom;
$this->view->customFields = $customFields;
$this->view->showFields = $showFields;
$this->view->visibleFields = $visibleFields;
+2
View File
@@ -13,6 +13,8 @@ function addItem(obj)
newItem.find('.form-date').datepicker();
$("#output" + itemIndex).picker();
$("#PM" + itemIndex).picker();
$("#type" + itemIndex).chosen();
$("#type_i__chosen").remove();
itemIndex ++;
}
+6
View File
@@ -64,6 +64,7 @@ $lang->programplan->delay = 'Delay';
$lang->programplan->delayDays = 'Delay days';
$lang->programplan->settingGantt = 'Gantt Setting';
$lang->programplan->viewSetting = 'Setting';
$lang->programplan->desc = 'Description';
$lang->programplan->errorBegin = "Project begin date: %s, begin date should be >= project begin date.";
$lang->programplan->errorEnd = "Project end date: %s, end date should be <= project end date.";
@@ -79,6 +80,10 @@ $lang->programplan->delayList = array();
$lang->programplan->delayList[1] = 'Yes';
$lang->programplan->delayList[0] = 'No';
$lang->programplan->typeList = array();
$lang->programplan->typeList['stage'] = 'Stage';
$lang->programplan->typeList['agileplus'] = 'Sprint/Kanban';
$lang->programplan->noData = 'No Data';
$lang->programplan->children = 'Sub Plan';
$lang->programplan->childrenAB = 'Child';
@@ -113,6 +118,7 @@ $lang->programplan->error->sameName = 'Stage name cannot be the same!';
$lang->programplan->error->sameCode = 'Stage code cannot be the same!';
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
$lang->programplan->error->planDrag = 'The %s stage cannot be dragged';
$lang->programplan->error->notStage = 'Sprint/Kanban cannot create a sub stage.';
$lang->programplan->ganttBrowseType['gantt'] = 'Group by Stage';
$lang->programplan->ganttBrowseType['assignedTo'] = 'Group by AssignedTo';
+6
View File
@@ -64,6 +64,7 @@ $lang->programplan->delay = 'Delay';
$lang->programplan->delayDays = 'Delay days';
$lang->programplan->settingGantt = 'Gantt Setting';
$lang->programplan->viewSetting = 'Setting';
$lang->programplan->desc = 'Description';
$lang->programplan->errorBegin = "Project begin date: %s, begin date should be >= project begin date.";
$lang->programplan->errorEnd = "Project end date: %s, end date should be <= project end date.";
@@ -79,6 +80,10 @@ $lang->programplan->delayList = array();
$lang->programplan->delayList[1] = 'Yes';
$lang->programplan->delayList[0] = 'No';
$lang->programplan->typeList = array();
$lang->programplan->typeList['stage'] = 'Stage';
$lang->programplan->typeList['agileplus'] = 'Sprint/Kanban';
$lang->programplan->noData = 'No Data';
$lang->programplan->children = 'Sub Plan';
$lang->programplan->childrenAB = 'Child';
@@ -113,6 +118,7 @@ $lang->programplan->error->sameName = 'Stage name cannot be the same!';
$lang->programplan->error->sameCode = 'Stage code cannot be the same!';
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
$lang->programplan->error->planDrag = 'The %s stage cannot be dragged';
$lang->programplan->error->notStage = 'Sprint/Kanban cannot create a sub stage.';
$lang->programplan->ganttBrowseType['gantt'] = 'Group by Stage';
$lang->programplan->ganttBrowseType['assignedTo'] = 'Group by AssignedTo';
+6
View File
@@ -64,6 +64,7 @@ $lang->programplan->delay = 'Delay';
$lang->programplan->delayDays = 'Delay days';
$lang->programplan->settingGantt = 'Gantt Setting';
$lang->programplan->viewSetting = 'Setting';
$lang->programplan->desc = 'Description';
$lang->programplan->errorBegin = "Project begin date: %s, begin date should be >= project begin date.";
$lang->programplan->errorEnd = "Project end date: %s, end date should be <= project end date.";
@@ -79,6 +80,10 @@ $lang->programplan->delayList = array();
$lang->programplan->delayList[1] = 'Yes';
$lang->programplan->delayList[0] = 'No';
$lang->programplan->typeList = array();
$lang->programplan->typeList['stage'] = 'Stage';
$lang->programplan->typeList['agileplus'] = 'Sprint/Kanban';
$lang->programplan->noData = 'No Data';
$lang->programplan->children = 'Sub Plan';
$lang->programplan->childrenAB = 'Child';
@@ -113,6 +118,7 @@ $lang->programplan->error->sameName = 'Stage name cannot be the same!';
$lang->programplan->error->sameCode = 'Stage code cannot be the same!';
$lang->programplan->error->taskDrag = 'The %s task cannot be dragged';
$lang->programplan->error->planDrag = 'The %s stage cannot be dragged';
$lang->programplan->error->notStage = 'Sprint/Kanban cannot create a sub stage.';
$lang->programplan->ganttBrowseType['gantt'] = 'Group by Stage';
$lang->programplan->ganttBrowseType['assignedTo'] = 'Group by AssignedTo';
+6
View File
@@ -64,6 +64,7 @@ $lang->programplan->delay = '是否延期';
$lang->programplan->delayDays = '延期天数';
$lang->programplan->settingGantt = '设置甘特图';
$lang->programplan->viewSetting = '显示设置';
$lang->programplan->desc = '描述';
$lang->programplan->errorBegin = '阶段的开始时间不能小于所属项目的开始时间%s';
$lang->programplan->errorEnd = '阶段的结束时间不能大于所属项目的结束时间%s';
@@ -79,6 +80,10 @@ $lang->programplan->delayList = array();
$lang->programplan->delayList[1] = '是';
$lang->programplan->delayList[0] = '否';
$lang->programplan->typeList = array();
$lang->programplan->typeList['stage'] = '阶段';
$lang->programplan->typeList['agileplus'] = '迭代/看板';
$lang->programplan->noData = '暂无数据。';
$lang->programplan->children = '二级计划';
$lang->programplan->childrenAB = '子';
@@ -113,6 +118,7 @@ $lang->programplan->error->sameName = '阶段名称不能相同!';
$lang->programplan->error->sameCode = '阶段代号不能相同!';
$lang->programplan->error->taskDrag = '%s的任务不可以拖动';
$lang->programplan->error->planDrag = '%s的阶段不可以拖动';
$lang->programplan->error->notStage = '迭代/看板不支持创建子阶段';
$lang->programplan->ganttBrowseType['gantt'] = '按阶段分组';
$lang->programplan->ganttBrowseType['assignedTo'] = '按指派给分组';
+4 -2
View File
@@ -710,7 +710,8 @@ class programplanModel extends model
if(!$this->checkNameUnique($names))
{
dao::$errors['message'][] = $this->lang->programplan->error->sameName;
$this->app->loadLang('execution');
dao::$errors['message'][] = empty($type) ? $this->lang->programplan->error->sameName : str_replace($this->lang->execution->stage, '', $this->lang->programplan->error->sameName);;
return false;
}
@@ -731,7 +732,7 @@ class programplanModel extends model
$plan = new stdclass();
$plan->id = isset($planIDList[$key]) ? $planIDList[$key] : '';
$plan->type = 'stage';
$plan->type = empty($type[$key]) ? 'stage' : $type[$key];
$plan->project = $projectID;
$plan->parent = $parentID ? $parentID : $projectID;
$plan->name = $names[$key];
@@ -746,6 +747,7 @@ class programplanModel extends model
$plan->output = empty($output[$key]) ? '' : implode(',', $output[$key]);
$plan->acl = empty($parentID) ? $acl[$key] : $parentACL;
$plan->PM = empty($PM[$key]) ? '' : $PM[$key];
$plan->desc = empty($desc[$key]) ? '' : $desc[$key];
$plan->hasProduct = $project->hasProduct;
$datas[] = $plan;
+41 -16
View File
@@ -40,27 +40,45 @@
<?php endif;?>
</div>
</div>
<?php $hideAttribute = ($planID == 0 and isset($visibleFields['attribute'])) ? '' : ' hidden'?>
<?php $attrAlign = $enableOptionalAttr ? '' : 'text-center';?>
<?php $class = $planID == 0 ? '' : "disabled='disabled'"?>
<?php $name = $planID == 0 ? $lang->programplan->name : $lang->programplan->subStageName;?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<?php if(!empty($planID)):?>
<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>
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
<?php
foreach($lang->programplan->typeList as $key => $value)
{
$class = $executionType == $key ? 'class="active"' : '';
echo "<li $class>" . html::a($this->createLink('programplan', 'create', "projectID=$project->id&productID=$productID&planID=$planID&type=$key"), $value) . "</li>";
}
?>
</ul>
</div>
</div>
<?php endif;?>
<div class="btn-toolbar pull-right">
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=programplan&section=custom&key=createFields')?>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', "module=programplan&section={$custom}&key=createFields")?>
<?php include '../../common/view/customfield.html.php';?>
</div>
</div>
<?php $hideAttribute = isset($visibleFields['attribute']) ? '' : ' hidden'?>
<?php $typeClass = ($planID != 0 and $executionType == 'agileplus') ? '' : ' hidden'?>
<?php $attrAlign = $enableOptionalAttr ? '' : 'text-center';?>
<?php $class = $planID == 0 ? '' : "disabled='disabled'"?>
<?php $name = $planID == 0 ? $lang->programplan->name : $lang->programplan->subStageName;?>
<form class='main-form form-ajax' method='post' id='planForm' enctype='multipart/form-data'>
<div class='table-responsive'>
<table class='table table-form'>
<thead>
<tr class='text-center'>
<th class='c-name required'><?php echo $name;?></th>
<th class='c-type<?php echo $typeClass;?> required'><?php echo $lang->execution->method;?></th>
<th class='c-name required'><?php echo $executionType == 'stage' ? $name : $lang->nameAB;?></th>
<?php if(!isset($config->setCode) or $config->setCode == 1):?>
<th class='c-code required'><?php echo $lang->execution->code;?></th>
<th class='c-code required'><?php echo $executionType == 'stage' ? $lang->execution->code : $lang->code;?></th>
<?php endif;?>
<th class='c-pm <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>'><?php echo $lang->programplan->PM;?></th>
<th class='c-pm <?php echo zget($visibleFields, 'PM', ' hidden') . zget($requiredFields, 'PM', '', ' required');?>'><?php echo $executionType == 'stage' ? $lang->programplan->PM : $lang->programplan->PMAB;?></th>
<th class='c-percent <?php echo zget($visibleFields, 'percent', ' hidden') . zget($requiredFields, 'percent', '', ' required');?>'>
<?php echo $lang->programplan->percent;?>
<?php if($planID):?>
@@ -74,7 +92,8 @@
<th class='c-date required'><?php echo $lang->programplan->end;?></th>
<th class='c-date <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>'><?php echo $lang->programplan->realBegan;?></th>
<th class='c-date <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>'><?php echo $lang->programplan->realEnd;?></th>
<?php if($this->config->edition == 'max'):?>
<th class='c-desc <?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->programplan->desc;?></th>
<?php if($this->config->edition == 'max' and $executionType == 'stage'):?>
<th class='w-110px'><?php echo $lang->programplan->output;?></th>
<?php endif;?>
<th class="c-action text-center w-110px"> <?php echo $lang->actions;?></th>
@@ -103,7 +122,7 @@
<td><input type='text' name='end[<?php echo $i;?>]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>><input type='text' name='realBegan[<?php echo $i;?>]' id='realBegan<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>><input type='text' name='realEnd[<?php echo $i;?>]' id='realEnd<?php echo $i;?>' value='' class='form-control form-date' /></td>
<?php if($this->config->edition == 'max'):?>
<?php if($this->config->edition == 'max' and $executionType == 'stage'):?>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control picker-select' data-drop-width='auto' multiple");?></td>
<?php endif;?>
<td class='c-actions text-center'>
@@ -116,9 +135,10 @@
<?php endif;?>
<?php if(!empty($plans)):?>
<?php foreach($plans as $plan):?>
<?php $disabled = $plan->setMilestone ? '' : "disabled='disabled'"?>
<?php $disabled = isset($plan->setMilestone) ? '' : "disabled='disabled'"?>
<?php echo html::hidden("planIDList[$i]", $plan->id);?>
<tr>
<td class='<?php echo $typeClass;?>'><?php echo html::select("type[$i]", $lang->execution->typeList, $plan->type, "class='form-control chosen'");?></td>
<td><input type='text' name="names[<?php echo $i;?>]" id='names<?php echo $i;?>' value='<?php echo $plan->name;?>' class='form-control' /></td>
<?php if(!isset($config->setCode) or $config->setCode == 1):?>
<td><?php echo html::input("codes[$i]", $plan->code, "class='form-control'");?></td>
@@ -137,7 +157,8 @@
<td><input type='text' name='end[<?php echo $i;?>]' id='end<?php echo $i;?>' value='<?php echo $plan->end;?>' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>><input type='text' name='realBegan[<?php echo $i;?>] ' id='realBegan<?php echo $i;?>' value='<?php echo $plan->realBegan;?>' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>><input type='text' name='realEnd[<?php echo $i;?>]' id='realEnd<?php echo $i;?>' value='<?php echo $plan->realEnd;?>' class='form-control form-date' /></td>
<?php if($this->config->edition == 'max'):?>
<td class='<?php echo zget($visibleFields, 'desc', 'hidden')?>'><?php echo html::textarea("desc[$i]", $plan->desc, "rows='1' class='form-control autosize'");?></td>
<?php if($this->config->edition == 'max' and $executionType == 'stage'):?>
<?php $option = empty($plan->output) ? 0 : explode(',', $plan->output);?>
<td><?php echo html::select("output[$i][]", $documentList, $option, "class='form-control picker-select' data-drop-width='auto' multiple");?></td>
<?php endif;?>
@@ -151,6 +172,7 @@
<?php endif;?>
<?php for($j = 0; $j < 5; $j ++):?>
<tr class='addedItem'>
<td class='<?php echo $typeClass;?>'><?php echo html::select("type[$i]", $lang->execution->typeList, '', "class='form-control chosen'");?></td>
<td><input type='text' name='names[<?php echo $i;?>]' id='names<?php echo $i;?>' value='' class='form-control' /></td>
<?php if(!isset($config->setCode) or $config->setCode == 1):?>
<td><?php echo html::input("codes[$i]", '', "class='form-control'");?></td>
@@ -162,14 +184,15 @@
<span class='input-group-addon'>%</span>
</div>
</td>
<td class='<?php echo $hideAttribute . zget($requiredFields, 'attribute', '', ' required');?> <?php echo $attrAlign;?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
<td class='<?php echo $hideAttribute . zget($requiredFields, 'attribute', '', ' required');?> <?php echo $attrAlign;?>'><?php echo $enableOptionalAttr ? html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'") : zget($lang->stage->typeList, $programPlan->attribute);?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, empty($programPlan) ? 'open' : $programPlan->acl, "class='form-control' $class");?></td>
<td class='text-center' <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td><input type='text' name='begin[<?php echo $i;?>] ' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td><input type='text' name='end[<?php echo $i;?>]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>><input type='text' name='realBegan[<?php echo $i;?>] ' id='realBegan<?php echo $i;?>' value='' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>><input type='text' name='realEnd[<?php echo $i;?>]' id='realEnd<?php echo $i;?>' value='' class='form-control form-date' /></td>
<?php if($this->config->edition == 'max'):?>
<td class='<?php echo zget($visibleFields, 'desc', 'hidden')?>'><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<?php if($this->config->edition == 'max' and $executionType == 'stage'):?>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control picker-select' data-drop-width='auto' multiple");?></td>
<?php endif;?>
<td class='c-actions text-center'>
@@ -195,6 +218,7 @@
<?php $i = '%i%';?>
<table class='hidden'>
<tr id='addItem' class='hidden'>
<td class='<?php echo $typeClass;?>'><?php echo html::select("type[$i]", $lang->execution->typeList, '', "class='form-control chosen'");?></td>
<td><input type='text' name='<?php echo "names[$i]";?>' id='names<?php echo $i;?>' class='form-control' /></td>
<?php if(!isset($config->setCode) or $config->setCode == 1):?>
<td><?php echo html::input("codes[$i]", '', "class='form-control'");?></td>
@@ -207,14 +231,15 @@
<span class='input-group-addon'>%</span>
</div>
</td>
<td class='<?php echo $hideAttribute . zget($requiredFields, 'attribute', '', ' required');?> <?php echo $attrAlign;?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
<td class='<?php echo $hideAttribute . zget($requiredFields, 'attribute', '', ' required');?> <?php echo $attrAlign;?>'><?php echo $enableOptionalAttr ? html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'") : zget($lang->stage->typeList, $programPlan->attribute);?></td>
<td <?php echo zget($visibleFields, 'acl', ' hidden') . zget($requiredFields, 'acl', '', ' required');?>><?php echo html::select("acl[$i]", $lang->execution->aclList, empty($programPlan) ? 'open' : $programPlan->acl, "class='form-control' $class");?></td>
<td class='text-center' <?php echo zget($visibleFields, 'milestone', ' hidden') . zget($requiredFields, 'milestone', '', ' required');?>><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
<td><input type='text' name='<?php echo "begin[$i]";?>' id='begin<?php echo $i;?>' class='form-control form-date' /></td>
<td><input type='text' name='<?php echo "end[$i]";?>' id='end<?php echo $i;?>' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realBegan', ' hidden') . zget($requiredFields, 'realBegan', '', ' required');?>><input type='text' name='<?php echo "realBegan[$i]";?>' id='realBegan<?php echo $i;?>' class='form-control form-date' /></td>
<td <?php echo zget($visibleFields, 'realEnd', ' hidden') . zget($requiredFields, 'realEnd', '', ' required');?>><input type='text' name='<?php echo "realEnd[$i]";?>' id='realEnd<?php echo $i;?>' class='form-control form-date' /></td>
<?php if($this->config->edition == 'max'):?>
<td class='<?php echo zget($visibleFields, 'desc', 'hidden')?>'><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<?php if($this->config->edition == 'max' and $executionType == 'stage'):?>
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control' data-drop-width='auto' multiple");?></td>
<?php endif;?>
<td class='c-actions text-center'>
+10 -8
View File
@@ -139,16 +139,18 @@ $config->project->datatable->fieldList['actions']['pri'] = '1';
if(isset($config->setCode) and $config->setCode == 0) unset($config->project->datatable->fieldList['code']);
$config->project->checkList = new stdclass();
$config->project->checkList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case');
$config->project->checkList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask');
$config->project->checkList->kanban = array('execution', 'build');
$config->project->checkList->agileplus = $config->project->checkList->scrum;
$config->project->checkList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case');
$config->project->checkList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask');
$config->project->checkList->kanban = array('execution', 'build');
$config->project->checkList->agileplus = $config->project->checkList->scrum;
$config->project->checkList->waterfallplus = $config->project->checkList->waterfall;
$config->project->maxCheckList = new stdclass();
$config->project->maxCheckList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case', 'issue', 'risk', 'meeting');
$config->project->maxCheckList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask', 'review', 'build', 'researchplan', 'issue', 'risk', 'opportunity', 'auditplan', 'gapanalysis', 'meeting');
$config->project->maxCheckList->kanban = array('execution', 'build');
$config->project->maxCheckList->agileplus = $config->project->maxCheckList->scrum;
$config->project->maxCheckList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case', 'issue', 'risk', 'meeting');
$config->project->maxCheckList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask', 'review', 'build', 'researchplan', 'issue', 'risk', 'opportunity', 'auditplan', 'gapanalysis', 'meeting');
$config->project->maxCheckList->kanban = array('execution', 'build');
$config->project->maxCheckList->agileplus = $config->project->maxCheckList->scrum;
$config->project->maxCheckList->waterfallplus = $config->project->maxCheckList->waterfall;
$config->project->search['module'] = 'project';
$config->project->search['fields']['name'] = $lang->project->name;
+4 -4
View File
@@ -531,7 +531,7 @@ class project extends control
}
else
{
if($model == 'waterfall')
if($model == 'waterfall' or $model == 'waterfallplus')
{
$productID = $this->product->getProductIDByProject($projectID, true);
$this->session->set('projectPlanList', $this->createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=lists", '', '', $projectID), 'project');
@@ -875,7 +875,7 @@ class project extends control
$this->view->programList = $this->loadModel('program')->getPairsByList($programList);
}
if(empty($project) || strpos('scrum,waterfall,kanban,agileplus', $project->model) === false)
if(empty($project) || strpos('scrum,waterfall,kanban,agileplus,waterfallplus', $project->model) === false)
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
return print(js::error($this->lang->notFound) . js::locate($this->createLink('project', 'browse')));
@@ -1115,7 +1115,7 @@ class project extends control
$this->view->orderBy = $orderBy;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->status = $status;
$this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false;
$this->view->isStage = (isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false;
$this->display();
}
@@ -1586,7 +1586,7 @@ class project extends control
unset($this->lang->resource->tree->fix);
}
if($project->model == 'waterfall')
if($project->model == 'waterfall' or $project->model == 'waterfallplus')
{
unset($this->lang->resource->productplan);
unset($this->lang->resource->projectplan);
+6 -2
View File
@@ -1484,7 +1484,7 @@ class projectModel extends model
if($project->acl != 'open') $this->loadModel('user')->updateUserView($projectID, 'project');
if(empty($project->multiple) and $project->model != 'waterfall') $this->loadModel('execution')->createDefaultSprint($projectID);
if(empty($project->multiple) and $project->model != 'waterfall' and $project->model != 'waterfallplus') $this->loadModel('execution')->createDefaultSprint($projectID);
return $projectID;
}
@@ -2757,6 +2757,7 @@ class projectModel extends model
$project = $this->getByID($objectID);
if($project and $project->model == 'waterfall') $model = $project->model;
if($project and $project->model == 'waterfallplus') $model = 'waterfall';
if($project and $project->model == 'kanban')
{
$model = $project->model . 'Project';
@@ -2816,15 +2817,18 @@ class projectModel extends model
$this->loadModel('common')->resetProjectPriv($objectID);
if(!$this->common->isOpenMethod($moduleName, $methodName) and !commonModel::hasPriv($moduleName, $methodName)) $this->common->deny($moduleName, $methodName, false);
if(isset($project->model) and $project->model == 'waterfall')
if(isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus'))
{
$lang->project->createExecution = str_replace($lang->executionCommon, $lang->project->stage, $lang->project->createExecution);
$lang->project->lastIteration = str_replace($lang->executionCommon, $lang->project->stage, $lang->project->lastIteration);
$this->loadModel('execution');
$executionCommonLang = $lang->executionCommon;
$lang->executionCommon = $lang->project->stage;
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
$lang->execution->typeList['sprint'] = $executionCommonLang;
}
$lang->switcherMenu = $this->getSwitcher($objectID, $moduleName, $methodName);
+2 -2
View File
@@ -79,7 +79,7 @@
<td><?php echo html::input('code', $code, "class='form-control' required");?></td>
</tr>
<?php endif;?>
<?php if($model != 'waterfall' and $model != 'agileplus'):?>
<?php if($model == 'scrum' or $model == 'kanban'):?>
<tr>
<th><?php echo $lang->project->multiple;?></th>
<td colspan='3'>
@@ -229,7 +229,7 @@
</td>
</tr>
<?php endif;?>
<?php if($model == 'waterfall'):?>
<?php if($model == 'waterfall' or $model == 'waterfallplus'):?>
<tr class='hide division'>
<th><?php echo $lang->project->division;?></th>
<td>
+2 -2
View File
@@ -81,7 +81,7 @@
<td><?php echo html::input('code', $project->code, "class='form-control' required");?></td>
</tr>
<?php endif;?>
<?php if($model != 'waterfall' and $model != 'agileplus'):?>
<?php if($model != 'waterfall' and $model != 'agileplus' and $model != 'waterfallplus'):?>
<tr>
<th><?php echo $lang->project->multiple;?></th>
<td colspan='3'><?php echo nl2br(html::radio('multiple', $lang->project->multipleList, $project->multiple, 'disabled'));?></td>
@@ -187,7 +187,7 @@
<?php $i ++;?>
<?php endforeach;?>
<?php endif;?>
<?php if($project->model == 'waterfall'):?>
<?php if($project->model == 'waterfall' or $project->model == 'waterfallplus'):?>
<?php $class = (!$project->division and count($linkedProducts) < 2) ? 'hide' : '';?>
<?php $disabled = !empty($executions) ? "disabled='disabled'" : '';?>
<tr class='<?php echo $class;?> division'>