* [bug#59747] Query all branch builds when select main branch when create or edit bug.

This commit is contained in:
xieqiyu
2025-02-26 13:09:56 +08:00
committed by 王于听
parent e0dc7b932d
commit b4d159915f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -400,7 +400,7 @@ function loadProductBuilds(productID, type = 'normal', buildBox = 'all')
{
if(buildBox == 'all' || buildBox == 'openedBuild')
{
const link = $.createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild&build=&branch=' + branch + '&type=' + type);
const link = $.createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild&build=&branch=' + (branch == 0 ? 'all' : branch) + '&type=' + type);
$.getJSON(link, function(data)
{
let buildID = $('[name^="openedBuild"]').val();
@@ -415,7 +415,7 @@ function loadProductBuilds(productID, type = 'normal', buildBox = 'all')
{
if(buildBox == 'all' || buildBox == 'openedBuild')
{
const openedLink = $.createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild&build=' + bug.openedBuild + '&branch=' + branch + '&type=' + type);
const openedLink = $.createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild&build=' + bug.openedBuild + '&branch=' + (branch == 0 ? 'all' : branch) + '&type=' + type);
$.getJSON(openedLink, function(data)
{
let buildID = $('[name^="openedBuild"]').val().toString();
+2 -2
View File
@@ -1007,7 +1007,7 @@ class bugZen extends bug
}
else
{
$builds = $this->build->getBuildPairs(array($productID), $branch, 'noempty,noterminate,nodone,withbranch,noreleased,nowaitreleased,nofail');
$builds = $this->build->getBuildPairs(array($productID), empty($branch) ? 'all' : $branch, 'noempty,noterminate,nodone,withbranch,noreleased,nowaitreleased,nofail');
}
$builds = $this->build->addReleaseLabelForBuilds($productID, $builds);
@@ -1245,7 +1245,7 @@ class bugZen extends bug
}
else
{
$openedBuilds = $this->loadModel('build')->getBuildPairs(array($bug->product), $bug->branch, 'noempty,noterminate,nodone,withbranch,noreleased,nofail');
$openedBuilds = $this->loadModel('build')->getBuildPairs(array($bug->product), empty($bug->branch) ? 'all' : $bug->branch, 'noempty,noterminate,nodone,withbranch,noreleased,nofail');
$assignedToList = $this->bug->getProductMemberPairs($bug->product, (string)$bug->branch);
$assignedToList = array_filter($assignedToList);
if(empty($assignedToList)) $assignedToList = $this->user->getPairs('devfirst|noclosed');