From 8b874bfbbc8c70a59673be3aa25795100735bf97 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Thu, 9 Dec 2021 09:20:45 +0800 Subject: [PATCH] *Finish task #45545. --- module/bug/control.php | 2 +- module/story/control.php | 4 ++-- module/testcase/control.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index b2e402475e..7d87bd32aa 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -966,7 +966,7 @@ class bug extends control if($this->app->tab == 'execution' or $this->app->tab == 'project') { $objectID = $this->app->tab == 'project' ? $bug->project : $bug->execution; - $productBranches = (isset($product->type) and $product->type != 'normal') ? $this->loadModel('execution')->getBranchByProduct($productID, $objectID) : array(); + $productBranches = (isset($product->type) and $product->type != 'normal') ? $this->loadModel('execution')->getBranchByProduct($productID, $objectID, 'all') : array(); $branches = isset($productBranches[$productID]) ? array(BRANCH_MAIN => $this->lang->branch->main) + $productBranches[$productID] : array(); } else diff --git a/module/story/control.php b/module/story/control.php index a7d2e27a2c..e22521f84c 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -670,7 +670,7 @@ class story extends control if($this->app->tab == 'project' or $this->app->tab == 'execution') { $objectID = $this->app->tab == 'project' ? $this->session->project : $this->session->execution; - $productBranches = $product->type != 'normal' ? $this->loadModel('execution')->getBranchByProduct($story->product, $objectID) : array(); + $productBranches = $product->type != 'normal' ? $this->loadModel('execution')->getBranchByProduct($story->product, $objectID, '') : array(); $branches = isset($productBranches[$story->product]) ? array(BRANCH_MAIN => $this->lang->branch->main) + $productBranches[$story->product] : array(); $products = $this->product->getProductPairsByProject($objectID); @@ -678,7 +678,7 @@ class story extends control } else { - $branches = $product->type != 'normal' ? $this->loadModel('branch')->getPairs($product->id, 'active') : array(); + $branches = $product->type != 'normal' ? $this->loadModel('branch')->getPairs($product->id) : array(); } /* Get product reviewers. */ diff --git a/module/testcase/control.php b/module/testcase/control.php index 983e45a2dd..2d2c32c8af 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -856,7 +856,7 @@ class testcase extends control if($this->app->tab == 'execution' or $this->app->tab == 'project') { $objectID = $this->app->tab == 'project' ? $case->project : $case->execution; - $productBranches = (isset($product->type) and $product->type != 'normal') ? $this->execution->getBranchByProduct($productID, $objectID) : array(); + $productBranches = (isset($product->type) and $product->type != 'normal') ? $this->execution->getBranchByProduct($productID, $objectID, 'all') : array(); $branches = isset($productBranches[$productID]) ? $productBranches[$productID] : array(); } else @@ -1008,7 +1008,7 @@ class testcase extends control if($this->app->tab == 'project') { - $productBranches = $this->loadModel('execution')->getBranchByProduct(array_keys($products), $this->session->project); + $productBranches = $this->loadModel('execution')->getBranchByProduct(array_keys($products), $this->session->project, 'all'); } else {