* Fix details.
This commit is contained in:
@@ -374,7 +374,7 @@ class upgrade extends control
|
||||
/* Get no merged projects than is not linked product. */
|
||||
if($type == 'sprint')
|
||||
{
|
||||
$noMergedSprints = $this->dao->select('*')->from(TABLE_PROJECT)->where('parent')->eq(0)->andWhere('path')->eq('')->fetchAll('id');
|
||||
$noMergedSprints = $this->dao->select('*')->from(TABLE_PROJECT)->where('parent')->eq(0)->andWhere('path')->eq('')->orderBy('id_desc')->fetchAll('id');
|
||||
$projectProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($noMergedSprints))->fetchGroup('project', 'product');
|
||||
foreach($projectProducts as $sprintID => $products) unset($noMergedSprints[$sprintID]);
|
||||
|
||||
@@ -385,7 +385,7 @@ class upgrade extends control
|
||||
/* Get no merged projects that link more then two products. */
|
||||
if($type == 'moreLink')
|
||||
{
|
||||
$noMergedSprints = $this->dao->select('*')->from(TABLE_PROJECT)->where('parent')->eq(0)->andWhere('path')->eq('')->fetchAll('id');
|
||||
$noMergedSprints = $this->dao->select('*')->from(TABLE_PROJECT)->where('parent')->eq(0)->andWhere('path')->eq('')->orderBy('id_desc')->fetchAll('id');
|
||||
$projectProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->in(array_keys($noMergedSprints))->fetchGroup('project', 'product');
|
||||
|
||||
$productPairs = array();
|
||||
|
||||
@@ -5,7 +5,9 @@ $(function()
|
||||
$('#programBox .cell').height($('#programBox').height() - 20);
|
||||
|
||||
pgmBegin = $('.pgmParams #begin').val();
|
||||
pgmEnd = $('.pgmParams #end').val();
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
|
||||
$('[name^=lines]').change(function()
|
||||
{
|
||||
@@ -19,6 +21,7 @@ $(function()
|
||||
$('[data-line=' + value + ']').prop('checked', false)
|
||||
}
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
})
|
||||
|
||||
$('#longTime').change(function()
|
||||
@@ -59,6 +62,7 @@ $(function()
|
||||
})
|
||||
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
})
|
||||
|
||||
$('[name^=products]').change(function()
|
||||
@@ -76,6 +80,7 @@ $(function()
|
||||
$('[data-product=' + value + ']').prop('checked', false)
|
||||
}
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
})
|
||||
|
||||
$('[name^=sprints]').change(function()
|
||||
@@ -89,6 +94,7 @@ $(function()
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
}
|
||||
setPgmBegin(pgmBegin);
|
||||
setPgmEnd(pgmEnd);
|
||||
})
|
||||
|
||||
toggleProgram($('form #newProgram0'));
|
||||
@@ -159,6 +165,21 @@ function setPgmBegin(pgmBegin)
|
||||
});
|
||||
}
|
||||
|
||||
function setPgmEnd(pgmEnd)
|
||||
{
|
||||
$(':checkbox:checked[data-end]').each(function()
|
||||
{
|
||||
end = $(this).attr('data-end').substr(0, 10);
|
||||
if(end == '0000-00-00') return true;
|
||||
|
||||
if(end > pgmEnd)
|
||||
{
|
||||
pgmEnd = end;
|
||||
$('.pgmParams #end').val(pgmEnd);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function convertStringToDate(dateString)
|
||||
{
|
||||
dateString = dateString.split('-');
|
||||
|
||||
@@ -42,7 +42,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, "data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}'");?>
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => "{$lang->upgrade->project} #{$sprint->id} {$sprint->name}"), $i == 0 ? $sprint->id : 0, "data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}'");?>
|
||||
<?php echo html::hidden("sprintIdList[$line->id][$productID][$sprint->id]", $sprint->id);?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -21,7 +21,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 => "{$lang->upgrade->project} #{$sprint->id} {$sprint->name}"), $sprint->id, "data-product='{$productID}' data-begin='{$sprint->begin}'");?>
|
||||
<?php echo html::checkBox("sprints[$productID]", array($sprint->id => "{$lang->upgrade->project} #{$sprint->id} {$sprint->name}"), $sprint->id, "data-product='{$productID}' data-begin='{$sprint->begin}' data-end='{$sprint->end}'");?>
|
||||
<?php echo html::hidden("sprintIdList[$productID][$sprint->id]", $sprint->id);?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user