* Fix bug #26110.
This commit is contained in:
@@ -164,19 +164,19 @@
|
||||
<td colspan="3" id="plansBox">
|
||||
<div class='row'>
|
||||
<?php if(isset($plan) && !empty($plan->begin)):?>
|
||||
<div class="col-sm-4" id="plan0"><?php echo html::select("plans[{$plan->product}][{$plan->branch}]", $productPlan, $plan->id, "class='form-control chosen' multiple");?></div>
|
||||
<div class="col-sm-4" id="plan0"><?php echo html::select("plans[{$plan->product}][{$plan->branch}][]", $productPlan, $plan->id, "class='form-control chosen' multiple");?></div>
|
||||
<?php js::set('currentPlanID', $plan->id)?>
|
||||
<?php elseif($copyExecutionID):?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($products as $product):?>
|
||||
<?php foreach($linkedBranches[$product->id] as $branchID => $branch):?>
|
||||
<?php $plans = isset($productPlans[$product->id][$branchID]) ? $productPlans[$product->id][$branchID] : array();?>
|
||||
<div class="col-sm-4" id="plan<?php echo $i;?>"><?php echo html::select("plans[{$product->id}][$branchID]", $plans, $branches[$product->id][$branchID]->plan, "class='form-control chosen' multiple");?></div>
|
||||
<div class="col-sm-4" id="plan<?php echo $i;?>"><?php echo html::select("plans[{$product->id}][$branchID][]", $plans, $branches[$product->id][$branchID]->plan, "class='form-control chosen' multiple");?></div>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<?php endforeach;?>
|
||||
<?php else:?>
|
||||
<div class="col-sm-4" id="plan0"><?php echo html::select("plans[][]", $productPlan, '', "class='form-control chosen' multiple");?></div>
|
||||
<div class="col-sm-4" id="plan0"><?php echo html::select("plans[][][]", $productPlan, '', "class='form-control chosen' multiple");?></div>
|
||||
<?php js::set('currentPlanID', '')?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -116,16 +116,21 @@ class productplanModel extends model
|
||||
|
||||
if(!empty($plans))
|
||||
{
|
||||
$plans = $this->reorder4Children($plans);
|
||||
$planIdList = array_keys($plans);
|
||||
$plans = $this->reorder4Children($plans);
|
||||
$planIdList = array_keys($plans);
|
||||
$planProjects = array();
|
||||
|
||||
$planProjects = $this->dao->select('t1.*,t2.type')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($product)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t1.plan')->in(array_keys($plans))
|
||||
->andWhere('t2.type')->in('sprint,stage,kanban')
|
||||
->fetchPairs('plan', 'project');
|
||||
foreach($planIdList as $planID)
|
||||
{
|
||||
$planProjects[$planID] = $this->dao->select('t1.*,t2.type')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($product)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t1.plan')->like(",$planID,")
|
||||
->andWhere('t2.type')->in('sprint,stage,kanban')
|
||||
->orderBy('project_desc')
|
||||
->fetch('project');
|
||||
}
|
||||
|
||||
$storyCountInTable = $this->dao->select('plan,count(story) as count')->from(TABLE_PLANSTORY)->where('plan')->in($planIdList)->groupBy('plan')->fetchPairs('plan', 'count');
|
||||
$product = $this->loadModel('product')->getById($product);
|
||||
|
||||
Reference in New Issue
Block a user