diff --git a/module/testcase/control.php b/module/testcase/control.php index 86e7b36567..78f39032d4 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -473,7 +473,6 @@ class testcase extends control if($from == 'testtask') $run = $this->loadModel('testtask')->getRunByCase($taskID, $caseID); $productID = $case->product; - $product = $this->loadModel('product')->getById($productID); $this->testcase->setMenu($this->products, $productID, $case->branch); $this->view->title = "CASE #$case->id $case->title - " . $this->products[$productID]; @@ -486,8 +485,7 @@ class testcase extends control $this->view->taskID = $taskID; $this->view->version = $version ? $version : $case->version; $this->view->productName = $this->products[$productID]; - $this->view->product = $product; - $this->view->branchName = $product->type == 'normal' ? '' : $this->loadModel('branch')->getById($case->branch); + $this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($case->branch); $this->view->modulePath = $this->tree->getParents($case->module); $this->view->users = $this->user->getPairs('noletter'); $this->view->actions = $this->loadModel('action')->getList('case', $caseID); diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 5310738a2c..5a59fbc4a5 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -122,7 +122,7 @@ testcase->product;?> product", $productName)) echo $productName;?> - type != 'normal'):?> + session->currentProductType != 'normal'):?> product->branch;?> product&branch=$case->branch", $branchName)) echo $branchName;?>