* Fix bug #17006,16785.

This commit is contained in:
tianshujie
2021-12-02 10:11:18 +08:00
parent d99bd57aa6
commit d33b9ae7e6
3 changed files with 9 additions and 7 deletions
+7 -5
View File
@@ -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');
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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>';