diff --git a/module/product/model.php b/module/product/model.php index cdd297a104..40000db08e 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -530,11 +530,13 @@ class productModel extends model $output .= '
'; $output .= ""; - $notNormalProduct = (isset($currentProduct->type) and $currentProduct->type != 'normal'); - $isTrackMethod = ($currentModule == 'story' and $currentMethod == 'track'); - $isTreeBrowseMethod = ($currentModule == 'tree' and $currentMethod == 'browse'); - $isShowBranchMethod = (strpos($this->config->product->showBranchMethod, $currentMethod) !== false and $currentModule == 'product') || $isTrackMethod || $isTreeBrowseMethod; - if($notNormalProduct and strpos(',testsuite,testreport,', ',' . $currentModule . ',') === false and ($this->app->tab == 'qa' or $isShowBranchMethod)) + $notNormalProduct = (isset($currentProduct->type) and $currentProduct->type != 'normal'); + $isTrackMethod = ($currentModule == 'story' and $currentMethod == 'track'); + $isTreeBrowseMethod = ($currentModule == 'tree' and $currentMethod == 'browse'); + $isTesttaskCreateMethod = ($currentModule == 'testtask' and $currentMethod == 'create'); + $isTesttaskEditMethod = ($currentModule == 'testtask' and $currentMethod == 'edit'); + $isShowBranchMethod = (strpos($this->config->product->showBranchMethod, $currentMethod) !== false and $currentModule == 'product') || $isTrackMethod || $isTreeBrowseMethod; + if($notNormalProduct and strpos(',testsuite,testreport,', ',' . $currentModule . ',') === false and (($this->app->tab == 'qa' and !$isTesttaskCreateMethod and !$isTesttaskEditMethod) or $isShowBranchMethod)) { $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]); $branches = $this->loadModel('branch')->getPairs($productID, 'all'); diff --git a/module/testtask/control.php b/module/testtask/control.php index 09ae77ad0e..f6f1581325 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -252,7 +252,7 @@ class testtask extends control /* Create testtask from testtask of test.*/ $productID = $productID ? $productID : key($this->products); - $executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID); + $executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, '', 'id_desc', $projectID); $builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 'all', 'notrunk', true); $testreports = $this->testtask->getTestReportPairsByBuild($build); diff --git a/module/testtask/js/create.js b/module/testtask/js/create.js index 5c712f34ac..e860542eee 100755 --- a/module/testtask/js/create.js +++ b/module/testtask/js/create.js @@ -23,7 +23,7 @@ function loadProductRelated() */ function loadExecutions(productID) { - link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID); + link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID + '&branch='); $.get(link, function(data) { if(!data) data = '';