* Fix Bug #30616
This commit is contained in:
@@ -25,6 +25,7 @@ $().ready(function()
|
||||
{
|
||||
var projectID = $('#project').val();
|
||||
var executionID = $('#execution').val();
|
||||
|
||||
if($(this).val() == 'no')
|
||||
{
|
||||
$('#execution').closest('tr').show();
|
||||
@@ -35,7 +36,16 @@ $().ready(function()
|
||||
{
|
||||
$('#execution').closest('tr').hide();
|
||||
$('#buildBox').closest('tr').show();
|
||||
|
||||
$.ajaxSettings.async = false;
|
||||
loadProducts(projectID);
|
||||
var productID = $('#product').val();
|
||||
$.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=all&index=&needCreate=&type=noempty,notrunk,separate,singled&extra=multiple'), function(data)
|
||||
{
|
||||
if(data) $('#buildBox').html(data);
|
||||
$('#builds').attr('data-placeholder', multipleSelect).chosen();
|
||||
});
|
||||
$.ajaxSettings.async = true;
|
||||
}
|
||||
});
|
||||
$('#product').change();
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<td><?php if($disabled) echo $lang->build->notice->changeProduct;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class='<?php if((!empty($product) and $product->type == 'normal') or empty($product)) echo 'hidden'?>'>
|
||||
<tr class='<?php if((!empty($product) and $product->type == 'normal') or empty($product) or empty($build->execution)) echo 'hidden'?>'>
|
||||
<?php
|
||||
if(empty($product)) $product = new stdclass();
|
||||
$productType = zget($product, 'type', 'normal');
|
||||
|
||||
@@ -147,7 +147,6 @@ class projectrelease extends control
|
||||
$builds = $this->build->getBuildPairs($this->view->product->id, 'all', 'notrunk|withbranch|hasproject', $projectID, 'project', '', false);
|
||||
$releasedBuilds = $this->projectrelease->getReleasedBuilds($projectID);
|
||||
foreach($releasedBuilds as $build) unset($builds[$build]);
|
||||
|
||||
$this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->release->create;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->builds = $builds;
|
||||
|
||||
@@ -235,6 +235,7 @@ class releaseModel extends model
|
||||
$linkedBuilds = array_merge($linkedBuilds, explode(',', $build->builds));
|
||||
}
|
||||
if($linkedBuilds) $builds += $this->dao->select('id,project,branch,builds,stories,bugs')->from(TABLE_BUILD)->where('id')->in($linkedBuilds)->fetchAll('id');
|
||||
$branches = array();
|
||||
foreach($builds as $build)
|
||||
{
|
||||
foreach(explode(',', $build->branch) as $buildBranch)
|
||||
@@ -339,10 +340,14 @@ class releaseModel extends model
|
||||
/* update release project and branch */
|
||||
if($release->build)
|
||||
{
|
||||
$builds = $this->dao->select('project, branch')->from(TABLE_BUILD)->where('id')->in($release->build)->fetchAll();
|
||||
$builds = $this->dao->select('project, branch')->from(TABLE_BUILD)->where('id')->in($release->build)->fetchAll();
|
||||
$branches = array();
|
||||
foreach($builds as $build)
|
||||
{
|
||||
$branches[$build->branch] = $build->branch;
|
||||
foreach(explode(',', $build->branch) as $buildBranch)
|
||||
{
|
||||
if(!isset($branches[$buildBranch])) $branches[$buildBranch] = $buildBranch;
|
||||
}
|
||||
$projects[$build->project] = $build->project;
|
||||
}
|
||||
$release->build = ',' . trim($release->build, ',') . ',';
|
||||
|
||||
Reference in New Issue
Block a user