* Fix bug #35535, Level 1.5 navigation drop-down is loading all the time.

This commit is contained in:
tanghucheng
2023-05-24 03:00:49 +00:00
parent c6b89a4a52
commit 3bfa842e05
2 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -2608,8 +2608,15 @@ class testcase extends control
}
/* Set menu. */
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
$this->qa->setMenu($this->products, $productID, $branch);
if($this->app->tab == 'project')
{
$this->loadModel('project')->setMenu($this->session->project);
}
else
{
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
$this->qa->setMenu($this->products, $productID, $branch);
}
/* Set branch. */
$product = $this->product->getById($productID);
@@ -2617,7 +2624,7 @@ class testcase extends control
if($this->app->tab == 'execution' or $this->app->tab == 'project')
{
$objectID = $this->app->tab == 'project' ? $this->session->project : $executionID;
$productBranches = (isset($product->type) and $product->type != 'normal') ? $this->execution->getBranchByProduct($productID, $objectID, 'noclosed|withMain') : array();
$productBranches = (isset($product->type) and $product->type != 'normal') ? $this->loadModel('execution')->getBranchByProduct($productID, $objectID, 'noclosed|withMain') : array();
$branches = isset($productBranches[$productID]) ? $productBranches[$productID] : array();
$branch = key($branches);
}
+1 -1
View File
@@ -292,7 +292,7 @@
<li><?php echo html::a($createTestcaseLink, $lang->testcase->create);?></li>
<li><?php echo html::a($batchCreateLink, $lang->testcase->batchCreate, '', "data-app='{$this->app->tab}'");?></li>
<?php if(common::hasPriv('testcase', 'createScene')){ ?>
<li><?php echo html::a($createSceneLink, $lang->testcase->newScene);?></li>
<li><?php echo html::a($createSceneLink, $lang->testcase->newScene, '', "data-app='{$this->app->tab}'");?></li>
<?php } ?>
</ul>
<?php endif;?>