diff --git a/module/index/js/index.js b/module/index/js/index.js index af88f8f157..18b56647d4 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -148,7 +148,7 @@ if(methodLowerCase === 'browse') { var viewType = link.params.view || link.params.$2; - if(['bug', 'case', 'caselib'].includes(viewType)) return link.params.from === 'project' ? 'project' : 'qa'; + if(['bug', 'case', 'caselib'].includes(viewType)) return link.params.$5 === 'project' ? 'project' : 'qa'; if(viewType === 'doc' && (link.params.from === 'product' || link.params.$5 == 'product')) return 'product'; if(viewType === 'doc' && (link.params.from === 'project' || link.params.$5 == 'project')) return 'project'; diff --git a/module/project/control.php b/module/project/control.php index bf7faf73b6..0051e6c827 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -964,6 +964,7 @@ class project extends control { $this->loadModel('product'); $this->session->set('bugList', $this->app->getURI(true), 'project'); + $this->lang->navGroup->testcase = 'project'; $products = array('0' => $this->lang->product->all) + $this->product->getProducts($projectID, 'all', '', false); diff --git a/module/story/model.php b/module/story/model.php index 242870ac72..f6a4e299cf 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2592,7 +2592,7 @@ class storyModel extends model $productParam = ($type == 'byproduct' and $param) ? $param : $this->cookie->storyProductParam; $branchParam = $branchID = ($type == 'bybranch' and $param !== '') ? $param : $this->cookie->storyBranchParam; $moduleParam = ($type == 'bymodule' and $param) ? $param : $this->cookie->storyModuleParam; - $modules = (empty($moduleParam) or strpos(',all,unclosed,bymodule,', ",$type,") === false) ? array() : $this->dao->select('*')->from(TABLE_MODULE)->where('path')->like("%,$moduleParam,%")->andWhere('type')->eq('story')->andWhere('deleted')->eq(0)->fetchPairs('id', 'id'); + $modules = (empty($moduleParam) or strpos(',all,unclosed,bymodule,', ",$type,") === false) ? array() : $this->dao->select('id')->from(TABLE_MODULE)->where('path')->like("%,$moduleParam,%")->andWhere('type')->eq('story')->andWhere('deleted')->eq(0)->fetchPairs(); if(strpos($branchParam, ',') !== false) list($productParam, $branchParam) = explode(',', $branchParam); $unclosedStatus = $this->lang->story->statusList; diff --git a/module/tree/model.php b/module/tree/model.php index edac4cc293..02c03c939f 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -943,13 +943,13 @@ class treeModel extends model if($linkObject == 'story') { - $t1Table = TABLE_PROJECTSTORY; - $t2Table = TABLE_STORY; + $table1 = TABLE_PROJECTSTORY; + $table2 = TABLE_STORY; } if($linkObject == 'case') { - $t1Table = TABLE_PROJECTCASE; - $t2Table = TABLE_CASE; + $table1 = TABLE_PROJECTCASE; + $table2 = TABLE_CASE; } if($linkObject) @@ -957,8 +957,8 @@ class treeModel extends model if(strpos(',story,case,', ",$linkObject,") === false) return array(); /* Get object paths of this execution. */ - $paths = $this->dao->select('DISTINCT t3.' . $field)->from($t1Table)->alias('t1') - ->leftJoin($t2Table)->alias('t2')->on('t1.' . $linkObject . ' = t2.id') + $paths = $this->dao->select('DISTINCT t3.' . $field)->from($table1)->alias('t1') + ->leftJoin($table2)->alias('t2')->on('t1.' . $linkObject . ' = t2.id') ->leftJoin(TABLE_MODULE)->alias('t3')->on('t2.module = t3.id') ->where('t1.project')->eq($executionID) ->andWhere('t3.deleted')->eq(0) diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 766c1b71da..0721db9cd5 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -154,8 +154,8 @@ if($viewType == 'doc' or $viewType == 'api')