* Fix bug #17006,16785.
This commit is contained in:
@@ -530,11 +530,13 @@ class productModel extends model
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div>";
|
||||
|
||||
$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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 = '<select id="execution" name="execution" class="form-control"></select>';
|
||||
|
||||
Reference in New Issue
Block a user