This commit is contained in:
zhouxudong
2022-01-13 10:39:56 +08:00
parent b006972821
commit 0b86002428
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -421,6 +421,7 @@ function loadProjectBuilds(projectID)
$('#openedBuild_chosen').remove();
$('#openedBuild').next('.picker').remove();
$("#openedBuild").chosen();
notice();
})
}
else
@@ -617,13 +618,13 @@ function notice()
if($('#openedBuild').find('option').length <= 1)
{
var html = '';
if($('#execution').length == 0 || $('#execution').val() == 0)
if(($('#execution').length == 0 || $('#execution').val() == 0) && ($('#project').length == 0 || $('#project').val() == 0))
{
var branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
var link = createLink('release', 'create', 'productID=' + $('#product').val() + '&branch=' + branch);
if(config.onlybody != 'yes') link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';
html += '<a href="' + link + '" data-toggle="modal" data-type="iframe" style="padding-right:5px">' + createBuild + '</a> ';
html += '<a href="' + link + '" data-toggle="modal" data-type="iframe" style="padding-right:5px">' + createRelease + '</a> ';
html += '<a href="javascript:loadProductBuilds(' + $('#product').val() + ')">' + refresh + '</a>';
}
else
+2 -1
View File
@@ -62,7 +62,8 @@ class build extends control
elseif($this->app->tab == 'qa')
{
$execution = $this->execution->getByID($executionID);
$executions = $this->execution->getPairs($execution->project);
$projectID = $execution ? $execution->project : 0;
$executions = $this->execution->getPairs($projectID);
}
$executionList = empty($executions) ? array() : $this->execution->getByIdList(array_keys($executions));