From 0b860024285a44acd97d6a7842236e8561eee8bf Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 13 Jan 2022 10:39:56 +0800 Subject: [PATCH] *Fix bug #17257. --- module/bug/js/common.js | 5 +++-- module/build/control.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/module/bug/js/common.js b/module/bug/js/common.js index e3738fd920..b1bdde1edd 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -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 += '' + createBuild + ' '; + html += '' + createRelease + ' '; html += '' + refresh + ''; } else diff --git a/module/build/control.php b/module/build/control.php index 4433ef29cf..8eb3a41655 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -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));