* Fix bug for batch edit story and bug in project.

This commit is contained in:
xieqiyu
2021-11-30 17:10:12 +08:00
parent 64be419604
commit d0afac5593
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -954,7 +954,7 @@ class bug extends control
{
$objectID = $this->app->tab == 'project' ? $bug->project : $bug->execution;
$productBranches = (isset($product->type) and $product->type != 'normal') ? $this->loadModel('execution')->getBranchByProduct($productID, $objectID) : array();
$branches = isset($productBranches[$productID]) ? $productBranches[$productID] : array();
$branches = isset($productBranches[$productID]) ? array(BRANCH_MAIN => $this->lang->branch->main) + $productBranches[$productID] : array();
}
else
{
+2 -2
View File
@@ -671,7 +671,7 @@ class story extends control
{
$objectID = $this->app->tab == 'project' ? $this->session->project : $this->session->execution;
$productBranches = $product->type != 'normal' ? $this->loadModel('execution')->getBranchByProduct($story->product, $objectID) : array();
$branches = isset($productBranches[$story->product]) ? $productBranches[$story->product] : array();
$branches = isset($productBranches[$story->product]) ? array(BRANCH_MAIN => $this->lang->branch->main) + $productBranches[$story->product] : array();
$products = $this->product->getProductPairsByProject($objectID);
$this->view->objectID = $objectID;
@@ -791,7 +791,7 @@ class story extends control
foreach($linkedProducts as $linkedProduct)
{
$branchList = $this->branch->getPairs($linkedProduct->id, '', $executionID);
$branches[$linkedProduct->id] = $branchList;
$branches[$linkedProduct->id] = array(BRANCH_MAIN => $this->lang->branch->main) + $branchList;
$modules[$linkedProduct->id] = $this->tree->getOptionMenu($linkedProduct->id, 'story', 0, array_keys($branchList));
$plans[$linkedProduct->id] = $this->productplan->getBranchPlanPairs($linkedProduct->id, array_keys($branchList), true);
if(empty($plans[$linkedProduct->id])) $plans[$linkedProduct->id][0] = $plans[$linkedProduct->id];
+1 -1
View File
@@ -375,7 +375,7 @@ class testcase extends control
$product = $this->product->getById($productID);
if($this->app->tab == 'execution' or $this->app->tab == 'project')
{
$objectID = $this->app->tab == 'project' ? $projectID : $executionID;
$objectID = $this->app->tab == 'project' ? $this->session->project : $executionID;
$productBranches = (isset($product->type) and $product->type != 'normal') ? $this->execution->getBranchByProduct($productID, $objectID) : array();
$branches = isset($productBranches[$productID]) ? $productBranches[$productID] : array();
$branch = key($branches);