* Finish task#56935.

This commit is contained in:
xieqiyu
2022-06-14 13:10:19 +08:00
parent a9a75958c7
commit 254dbf58e5
+4 -1
View File
@@ -115,7 +115,10 @@ class testcase extends control
/* Set menu, save session. */
if($this->app->tab == 'project')
{
$this->products = array('0' => $this->lang->product->all) + $this->product->getProducts($projectID, 'all', '', false);
$linkedProducts = $this->product->getProducts($projectID, 'all', '', false);
$this->products = count($linkedProducts) > 1 ? array('0' => $this->lang->product->all) + $linkedProducts : $linkedProducts;
$productID = count($linkedProducts) > 1 ? $productID : key($linkedProducts);
$branch = 'all';
$this->loadModel('project')->setMenu($projectID);
}