* Fix bug #30341.
This commit is contained in:
@@ -250,7 +250,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, '', 'id_desc', $projectID, 'stagefilter');
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk');
|
||||
$builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk,withexecution', $projectID, 'project');
|
||||
|
||||
$execution = $this->loadModel('execution')->getByID($executionID);
|
||||
if(!empty($execution) and $execution->type == 'kanban') $this->lang->testtask->execution = str_replace($this->lang->execution->common, $this->lang->kanban->common, $this->lang->testtask->execution);
|
||||
@@ -816,13 +816,18 @@ class testtask extends control
|
||||
$executions[$executionID] = $project->name . "({$this->lang->project->disableExecution})";
|
||||
}
|
||||
}
|
||||
$builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,notrunk,withexecution', $executionID, 'execution');
|
||||
}
|
||||
else
|
||||
{
|
||||
$builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,notrunk,withexecution', $task->project, 'project');
|
||||
}
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->edit;
|
||||
$this->view->task = $task;
|
||||
$this->view->project = $this->project->getByID($projectID);
|
||||
$this->view->executions = $executions;
|
||||
$this->view->builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,notrunk', $executionID, 'execution');
|
||||
$this->view->builds = empty($productID) ? array() : $builds;
|
||||
$this->view->testreports = $this->loadModel('testreport')->getPairs($task->product, $task->testreport);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', $task->owner);
|
||||
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');
|
||||
@@ -1501,6 +1506,7 @@ class testtask extends control
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted|noclosed');
|
||||
$this->view->productID = $productID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -100,10 +100,9 @@ function loadExecutionBuilds(executionID, selected)
|
||||
|
||||
if(!selectedBuild) selectedBuild = 0;
|
||||
var link = createLink('build', 'ajaxGetExecutionBuilds', 'executionID=' + executionID + '&productID=' + $('#product').val() + '&varName=testTaskBuild&build=' + selectedBuild);
|
||||
if(executionID == 0) link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + $('#product').val() + '&varName=resolvedBuild&build=' + selectedBuild);
|
||||
if(executionID == 0) link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + $('#product').val() + '&varName=build&build=' + selectedBuild + '&branch=&index=&needCreate=&type=noempty,notrunk,withexecution');
|
||||
$('#buildBox').load(link, function()
|
||||
{
|
||||
$('#resolvedBuild').attr('id', 'build').attr('name', 'build').find('option[value=trunk]').remove();
|
||||
if(selected) $('#build').val(selected);
|
||||
$('#build').chosen();
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ function loadProductRelated()
|
||||
{
|
||||
loadExecutions($('#product').val());
|
||||
loadTestReports($('#product').val());
|
||||
loadExecutionRelated($('#execution').val())
|
||||
loadExecutionBuilds($('#execution').val())
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('projectID', $task->project);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
|
||||
@@ -107,4 +107,5 @@ $(function()
|
||||
$('#subNavbar li[data-id="case"]').addClass('active');
|
||||
})
|
||||
</script>
|
||||
<?php js::set('projectID', $projectID);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user