Merge branch 'sprint/290_liumengyi_fixbug' into 'master'

* Fix bug of create waterfallplus's execution.

See merge request easycorp/zentaopms!6981
This commit is contained in:
王怡栋
2023-02-17 02:01:40 +00:00
6 changed files with 28 additions and 12 deletions
+4 -3
View File
@@ -10,9 +10,10 @@ $config->execution->defaultBurnPeriod = 30;
$config->execution->list = new stdclass();
$config->execution->list->exportFields = 'id,name,projectName,PM,begin,end,status,totalEstimate,totalConsumed,totalLeft,progress';
$config->execution->modelList['scrum'] = 'sprint';
$config->execution->modelList['waterfall'] = 'stage';
$config->execution->modelList['kanban'] = 'kanban';
$config->execution->modelList['scrum'] = 'sprint';
$config->execution->modelList['waterfall'] = 'stage';
$config->execution->modelList['kanban'] = 'kanban';
$config->execution->modelList['waterfallplus'] = 'stage';
$config->execution->statusActions = array('start', 'putoff', 'suspend', 'close', 'activate');
+1 -1
View File
@@ -1694,7 +1694,7 @@ class execution extends control
$lang->execution->typeList['sprint'] = $executionCommonLang;
}
elseif(!empty($project) and $project->model == 'waterfall')
elseif(!empty($project) and ($project->model == 'waterfall' or $project->model == 'waterfallplus'))
{
global $lang;
$lang->executionCommon = $lang->execution->stage;
+1
View File
@@ -38,3 +38,4 @@
.productsBox .input-group-addon > div {display: inline-block !important;}
.productsBox .required + .text-danger.help-text {position: relative; left: 10px;}
.productsBox > #productNameLabel {padding-top: 8px;}
.productsBox div[id^='branch'].chosen-disabled {pointer-events: none;}
+10 -3
View File
@@ -179,6 +179,13 @@ function loadBranches(product)
var branch = $('#branch' + index);
loadPlans(product, branch);
if(typeof isWaterfall != 'undefined' && isWaterfall == true)
{
$tableRow.find("select[name^='branch'] option").attr('selected', 'selected');
$tableRow.find("select[name^='branch']").trigger('chosen:updated');
$tableRow.find("div[id^='branch']").addClass('chosen-disabled');
}
});
}
@@ -210,15 +217,15 @@ function loadPlans(product, branch)
/**
* Add new line for link product.
*
* @param obj $obj
*
* @param obj $obj
* @access public
* @return void
*/
function addNewLine(obj)
{
var newLine = $(obj).closest('tr').clone();
var index = 0;
var index = 0;
$(".productsBox select[name^='products']").each(function()
{
var id = $(this).attr('id').replace('products' , '');
+5
View File
@@ -148,6 +148,11 @@ $(function()
});
$(document).on('change', "select[id^='branch']", disableSelectedBranch);
if($('.disabledBranch').length > 0)
{
$('.disabledBranch div[id^="branch"]').addClass('chosen-disabled');
}
});
function showLifeTimeTips()
+7 -5
View File
@@ -31,6 +31,7 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php $isWaterfall = (!empty($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false;?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('weekend', $config->execution->weekend);?>
<?php js::set('holders', $lang->execution->placeholder);?>
@@ -46,6 +47,7 @@
<?php js::set('cancelCopy', $lang->execution->cancelCopy);?>
<?php js::set('copyNoExecution', $lang->execution->copyNoExecution);?>
<?php js::set('model', isset($project->model) ? $project->model : '');?>
<?php js::set('isWaterfall', $isWaterfall);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
@@ -151,12 +153,12 @@
<?php $hasBranch = $product->type != 'normal' and isset($branchGroups[$product->id]);?>
<div class='input-group <?php if($hasBranch) echo ' has-branch';?>'>
<span class='input-group-addon'><?php echo $lang->product->common;?></span>
<?php $disabled = ($project->model == 'waterfall' and !$project->division) ? "disabled='disabled'" : '';?>
<?php $disabled = ($isWaterfall and !$project->division) ? "disabled='disabled'" : '';?>
<?php echo html::select("products[$i]", $allProducts, $product->id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?>
<?php if($project->model == 'waterfall' and !$project->division) echo html::hidden("products[$i]", $product->id);?>
<?php if($isWaterfall and !$project->division) echo html::hidden("products[$i]", $product->id);?>
</div>
</div>
<div class='table-col <?php if(!$hasBranch) echo 'hidden';?>'>
<div class='table-col <?php if(!$hasBranch) echo 'hidden'; if($disabled) echo ' disabledBranch'?>'>
<div class='input-group required'>
<span class='input-group-addon fix-border'><?php echo $lang->project->branch;?></span>
<?php $branchIdList = isset($product->branches) ? join(',', $product->branches) : '';?>
@@ -169,7 +171,7 @@
<div class='input-group' <?php echo "id='plan$i'";?>>
<span class='input-group-addon'><?php echo $lang->product->plan;?></span>
<?php echo html::select("plans[$product->id][]", isset($productPlans[$product->id]) ? $productPlans[$product->id] : array(), isset($product->plans) ? $product->plans : '', "class='form-control chosen' multiple");?>
<?php if(!($project->model == 'waterfall' and !$project->division)):?>
<?php if(!($isWaterfall and !$project->division)):?>
<div class='input-group-btn'>
<a href='javascript:;' onclick='addNewLine(this)' class='btn btn-link addLine'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='removeLine(this)' class='btn btn-link removeLine' <?php if($i == 0) echo "style='visibility: hidden'";?>><i class='icon-close'></i></a>
@@ -207,7 +209,7 @@
<div class='input-group' id='plan0'>
<span class='input-group-addon'><?php echo $lang->product->plan;?></span>
<?php echo html::select("plans[][]", $productPlan, '', "class='form-control chosen' multiple");?>
<?php if(!($project->model == 'waterfall' and $project->division)):?>
<?php if(!($isWaterfall and $project->division)):?>
<div class='input-group-btn'>
<a href='javascript:;' onclick='addNewLine(this)' class='btn btn-link addLine'><i class='icon-plus'></i></a>
<a href='javascript:;' onclick='removeLine(this)' class='btn btn-link removeLine' style='visibility: hidden'><i class='icon-close'></i></a>