diff --git a/module/branch/control.php b/module/branch/control.php index ae9090bde2..e0816d28ff 100644 --- a/module/branch/control.php +++ b/module/branch/control.php @@ -211,7 +211,7 @@ class branch extends control public function ajaxGetDropMenu($productID, $branch, $module, $method, $extra = '') { parse_str($extra, $output); - $isQaModule = (strpos(',project,execution,', ",{$this->app->tab},") !== false and strpos(',bug,', ",$method,") !== false and !empty($productID)) ? true : false; + $isQaModule = (strpos(',project,execution,', ",{$this->app->tab},") !== false and strpos(',bug,testcase,', ",$method,") !== false and !empty($productID)) ? true : false; $param = $isQaModule ? $extra : 0; $param = isset($output['projectID']) ? $output['projectID'] : $param; $branches = $this->branch->getPairs($productID, 'all', $param); diff --git a/module/execution/control.php b/module/execution/control.php index e88c933b03..637f63c38b 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1072,6 +1072,7 @@ class execution extends control * * @param int $executionID * @param int $productID + * @param int $branchID * @param string $type * @param int $moduleID * @param string $orderBy @@ -1081,7 +1082,7 @@ class execution extends control * @access public * @return void */ - public function testcase($executionID = 0, $productID = 0, $type = 'all', $moduleID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function testcase($executionID = 0, $productID = 0, $branchID = 0, $type = 'all', $moduleID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { $this->loadModel('testcase'); $this->loadModel('testtask'); @@ -1095,13 +1096,13 @@ class execution extends control if(count($products) == 1) $productID = key($products); $extra = $executionID; - $this->lang->modulePageNav = $this->product->select(array('0' => $this->lang->product->all) + $products, $productID, 'execution', 'testcase', $extra, 0, 0, '', false); + $this->lang->modulePageNav = $this->product->select(array('0' => $this->lang->product->all) + $products, $productID, 'execution', 'testcase', $extra, $branchID); /* Load pager. */ $this->app->loadClass('pager', $static = true); $pager = pager::init($recTotal, $recPerPage, $pageID); - $cases = $this->loadModel('testcase')->getExecutionCases($executionID, $productID, $moduleID, $orderBy, $pager, $type); + $cases = $this->loadModel('testcase')->getExecutionCases($executionID, $productID, $branchID, $moduleID, $orderBy, $pager, $type); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false); $cases = $this->testcase->appendData($cases, 'case'); @@ -1116,7 +1117,7 @@ class execution extends control } else { - $moduleTree = $this->tree->getTreeMenu($productID, 'case', 0, array('treeModel', 'createCaseLink'), array('executionID' => $executionID, 'productID' => $productID), 'all'); + $moduleTree = $this->tree->getTreeMenu($productID, 'case', 0, array('treeModel', 'createCaseLink'), array('executionID' => $executionID, 'productID' => $productID), $branchID); } $tree = $moduleID ? $this->tree->getByID($moduleID) : ''; @@ -1133,6 +1134,7 @@ class execution extends control $this->view->modules = $modules; $this->view->moduleID = $moduleID; $this->view->moduleName = $moduleID ? $tree->name : $this->lang->tree->all; + $this->view->branchID = $branchID; $this->display(); } diff --git a/module/execution/css/testcase.css b/module/execution/css/testcase.css index 3f05682eb7..485a750a3d 100644 --- a/module/execution/css/testcase.css +++ b/module/execution/css/testcase.css @@ -1,3 +1,4 @@ .c-id, .c-pri {width: 50px;} .c-result {width: 80px;} #pageNav #dropMenu .col-left {padding-bottom: 0px;} +#currentBranch + #dropMenu .col-left {padding-bottom: 30px;} diff --git a/module/execution/view/testcase.html.php b/module/execution/view/testcase.html.php index b64a7ffdf7..cf13103010 100644 --- a/module/execution/view/testcase.html.php +++ b/module/execution/view/testcase.html.php @@ -6,14 +6,14 @@ echo $moduleName; if(!empty($moduleID)) { - $removeLink = $this->createLink('execution', 'testcase', "executionID=$executionID&productID=$productID&type=all&moduleID=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}"); + $removeLink = $this->createLink('execution', 'testcase', "executionID=$executionID&productID=$productID&branchID=$branchID&type=all&moduleID=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}"); echo html::a($removeLink, "", '', "class='text-muted' data-app='{$this->app->tab}'"); } ?>