* Resolved feedback #1468.
This commit is contained in:
@@ -1243,8 +1243,12 @@ class bug extends control
|
||||
$branchProduct = $product->type == 'normal' ? false : true;
|
||||
|
||||
/* Set plans. */
|
||||
$plans = $this->loadModel('productplan')->getPairs($productID, $branch, '', true);
|
||||
$plans = array('' => '', 'ditto' => $this->lang->bug->ditto) + $plans;
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
$plans = $this->loadModel('productplan')->getPairs($productID, $bug->branch, '', true);
|
||||
$plans = array('' => '', 'ditto' => $this->lang->bug->ditto) + $plans;
|
||||
$bug->plans = $plans;
|
||||
}
|
||||
|
||||
/* Set branches and modules. */
|
||||
$branches = 0;
|
||||
|
||||
@@ -885,6 +885,14 @@ function setBranchRelated(branchID, productID, num)
|
||||
$('#plans' + num).parent('td').load(planLink, function()
|
||||
{
|
||||
$('#plans' + num).chosen();
|
||||
if(planID == 1)
|
||||
{
|
||||
$(this).find('option').each(function()
|
||||
{
|
||||
if($(this).val() == 'ditto') $(this).remove();
|
||||
});
|
||||
$('#plans' + num).chosen().trigger('chosen:updated');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo html::select("modules[$bugID]", isset($modules[$bug->product][$bug->branch]) ? $modules[$bug->product][$bug->branch] : array(0 => '/'), $bug->module, "class='form-control picker-select' data-drop-width='auto'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bug->plan, "class='form-control picker-select' data-drop-width='auto'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $bug->plans, $bug->plan, "class='form-control picker-select' data-drop-width='auto'");?></td>
|
||||
<?php
|
||||
$assignedToList = array();
|
||||
if($app->tab == 'project' or $app->tab == 'execution')
|
||||
|
||||
@@ -247,7 +247,7 @@ class productplanModel extends model
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t3.id=t1.product')
|
||||
->where('t1.product')->in($product)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($branch !== '')->andWhere('t1.branch')->in($branch)->fi()
|
||||
->beginIF($branch !== '' and $branch != 'all')->andWhere('t1.branch')->in("0,$branch")->fi()
|
||||
->beginIF(strpos($param, 'unexpired') !== false)->andWhere('t1.end')->ge($date)->fi()
|
||||
->beginIF(strpos($param, 'noclosed') !== false)->andWhere('t1.status')->ne('closed')->fi()
|
||||
->orderBy('t1.begin desc')
|
||||
@@ -255,6 +255,7 @@ class productplanModel extends model
|
||||
|
||||
$plans = $this->reorder4Children($plans);
|
||||
$planPairs = array();
|
||||
$this->app->loadLang('bug');
|
||||
$this->app->loadLang('branch');
|
||||
foreach($plans as $plan)
|
||||
{
|
||||
@@ -263,8 +264,14 @@ class productplanModel extends model
|
||||
$planPairs[$plan->id] = $plan->title . " [{$plan->begin} ~ {$plan->end}]";
|
||||
if($plan->begin == $this->config->productplan->future and $plan->end == $this->config->productplan->future) $planPairs[$plan->id] = $plan->title . ' ' . $this->lang->productplan->future;
|
||||
if($plan->productType != 'normal') $planPairs[$plan->id] = ($plan->branchName ? $plan->branchName : $this->lang->branch->main) . ' / ' . $planPairs[$plan->id];
|
||||
if(empty($plan->branchName))
|
||||
{
|
||||
$mainplan = $planPairs[$plan->id];
|
||||
unset($planPairs[$plan->id]);
|
||||
}
|
||||
}
|
||||
return array('' => '') + $planPairs;
|
||||
array_splice($planPairs, 0, 0, $mainplan);
|
||||
return array('' => '', 'ditto' => $this->lang->bug->ditto) + $planPairs;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user