* Finish task#36071.
This commit is contained in:
@@ -221,7 +221,7 @@ class upgrade extends control
|
||||
/* Create Program. */
|
||||
list($programID, $projectID) = $this->upgrade->createProgram($linkedProducts, $linkedSprints);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
|
||||
/* Process merged products and projects. */
|
||||
$this->upgrade->processMergedData($programID, $projectID, $linkedProducts, $linkedSprints);
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ $(function()
|
||||
PGMEnd = $('.PGMParams #end').val();
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
setPRJPM();
|
||||
|
||||
$('[name^=lines]').change(function()
|
||||
{
|
||||
@@ -22,6 +23,7 @@ $(function()
|
||||
}
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
setPRJPM();
|
||||
})
|
||||
|
||||
var PGMOriginEnd = $('#end').val();
|
||||
@@ -71,6 +73,7 @@ $(function()
|
||||
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
setPRJPM();
|
||||
})
|
||||
|
||||
$('[name^=products]').change(function()
|
||||
@@ -89,6 +92,7 @@ $(function()
|
||||
}
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
setPRJPM();
|
||||
})
|
||||
|
||||
$('[name^=sprints]').change(function()
|
||||
@@ -103,6 +107,7 @@ $(function()
|
||||
}
|
||||
setPGMBegin(PGMBegin);
|
||||
setPGMEnd(PGMEnd);
|
||||
setPRJPM();
|
||||
})
|
||||
|
||||
toggleProgram($('form #newProgram0'));
|
||||
@@ -206,6 +211,21 @@ function setPGMEnd(PGMEnd)
|
||||
});
|
||||
}
|
||||
|
||||
function setPRJPM()
|
||||
{
|
||||
var PM = [];
|
||||
$(':checkbox:checked[data-pm]').each(function()
|
||||
{
|
||||
var PMName = $(this).attr('data-pm');
|
||||
PM[PMName] = PM[PMName] == undefined ? 0 : PM[PMName];
|
||||
PM[PMName] = PM[PMName] + 1;
|
||||
});
|
||||
PM.sort(function(el1, el2){return el2 - el1;});
|
||||
PMNameList = Object.keys(PM);
|
||||
PMNameList = PMNameList.filter(Boolean);
|
||||
$('#PM').val(PMNameList[0]).trigger("chosen:updated");
|
||||
}
|
||||
|
||||
function convertStringToDate(dateString)
|
||||
{
|
||||
dateString = dateString.split('-');
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class='scroll-handle'>
|
||||
<?php if(isset($productGroups[$productID])):?>
|
||||
<?php foreach($productGroups[$productID] as $sprint):?>
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => "{$lang->upgrade->project} #{$sprint->id} {$sprint->name}"), $i == 0 ? $sprint->id : 0, "title='{$sprint->name}' data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}'");?>
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => "{$lang->upgrade->project} #{$sprint->id} {$sprint->name}"), $i == 0 ? $sprint->id : 0, "title='{$sprint->name}' data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-pm='{$sprint->PM}'");?>
|
||||
<?php echo html::hidden("sprintIdList[$line->id][$productID][$sprint->id]", $sprint->id);?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class='scroll-handle'>
|
||||
<?php if(isset($productGroups[$productID])):?>
|
||||
<?php foreach($productGroups[$productID] as $sprint):?>
|
||||
<?php echo html::checkBox("sprints[$productID]", array($sprint->id => "{$sprint->name}"), $isChecked ? $sprint->id : '', "data-product='{$productID}' data-begin='{$sprint->begin}' data-end='{$sprint->end}'");?>
|
||||
<?php echo html::checkBox("sprints[$productID]", array($sprint->id => "{$sprint->name}"), $isChecked ? $sprint->id : '', "data-product='{$productID}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-pm='{$sprint->PM}'");?>
|
||||
<?php echo html::hidden("sprintIdList[$productID][$sprint->id]", $sprint->id);?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
<div class='line-groups'>
|
||||
<?php foreach($noMergedSprints as $sprintID => $sprint):?>
|
||||
<?php echo html::checkBox("sprints", array($sprint->id => "{$lang->upgrade->project} #{$sprint->id} {$sprint->name}"), $sprint->id, "data-begin='{$sprint->begin}' data-end='{$sprint->end}'");?>
|
||||
<?php echo html::checkBox("sprints", array($sprint->id => "{$lang->upgrade->project} #{$sprint->id} {$sprint->name}"), $sprint->id, "data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-pm='{$sprint->PM}'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user