* Modify the code.
This commit is contained in:
@@ -977,6 +977,11 @@ class testcase extends control
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($this->app->tab == 'project') $productBranches = $this->loadModel('execution')->getBranchByProduct(array_keys($products), $this->session->project);
|
||||
|
||||
$this->view->products = $products;
|
||||
$this->view->productBranches = isset($productBranches) ? $productBranches : $this->loadModel('branch')->getByProducts(array_keys($products), 'ignoreNormal');
|
||||
}
|
||||
|
||||
// if(!$this->testcase->forceNotReview()) unset($this->lang->testcase->statusList['wait']); /* Bug#1343 */
|
||||
|
||||
@@ -65,20 +65,18 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $this->loadModel('branch');?>
|
||||
<?php $this->loadModel('execution');?>
|
||||
<?php foreach($caseIDList as $caseID):?>
|
||||
<?php
|
||||
if(!isset($cases[$caseID])) continue;
|
||||
$caseBranch = isset($cases[$caseID]->branch) ? $cases[$caseID]->branch : 0;
|
||||
if((!$productID and !$cases[$caseID]->lib) or $app->tab != 'qa')
|
||||
{
|
||||
$product = $this->product->getByID($cases[$caseID]->product);
|
||||
$branches = array('' => '');
|
||||
$caseProductID = $cases[$caseID]->product;
|
||||
$product = $products[$caseProductID];
|
||||
$branches = array('' => '');
|
||||
if($product->type != 'normal')
|
||||
{
|
||||
if($this->app->tab == 'project') $productBranches = $this->execution->getBranchByProduct($product->id, $this->session->project);
|
||||
$branches = isset($productBranches[$product->id]) ? $productBranches[$product->id] : $this->branch->getPairs($product->id);
|
||||
$branches = isset($productBranches[$product->id]) ? $productBranches[$product->id] : array();
|
||||
foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('product', $products, $productID, "onchange='loadAll(this.value)' class='form-control chosen'");?>
|
||||
<?php if(isset($product->type) and $product->type != 'normal') echo html::select('branch', $branches, $case->branch, "onchange='loadBranch();' class='form-control' style='width:65px'");?>
|
||||
<?php if(isset($product->type) and $product->type != 'normal') echo html::select('branch', $branches, $case->branch, "onchange='loadBranch();' class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user