* Fix bug #21970.
This commit is contained in:
@@ -82,13 +82,22 @@ class release extends control
|
||||
foreach($releasedBuilds as $build) unset($builds[$build]);
|
||||
unset($builds['trunk']);
|
||||
|
||||
/* Get the builds of the linked stories or bugs. */
|
||||
$notEmptyBuilds = array();
|
||||
$buildList = $this->build->getByList(array_keys($builds));
|
||||
foreach($buildList as $build)
|
||||
{
|
||||
if(!empty($build->stories) or !empty($build->bugs)) $notEmptyBuilds[$build->id] = $build->id;
|
||||
}
|
||||
|
||||
$this->commonAction($productID, $branch);
|
||||
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->create;
|
||||
$this->view->position[] = $this->lang->release->create;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
$this->view->lastRelease = $this->release->getLast($productID, $branch);
|
||||
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->create;
|
||||
$this->view->position[] = $this->lang->release->create;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
$this->view->lastRelease = $this->release->getLast($productID, $branch);
|
||||
$this->view->notEmptyBuilds = $notEmptyBuilds;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ $('#submit').click(function()
|
||||
var name = $('#name').val();
|
||||
var date = $('#date').val();
|
||||
var build = $('#build').val();
|
||||
if(name && build && dateFormat.test(date))
|
||||
if(name && build && typeof(notEmptyBuilds[build]) != 'undefined' && dateFormat.test(date))
|
||||
{
|
||||
var result = confirm(confirmLink) ? true : false;
|
||||
$('#sync').val(result);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('confirmLink', $lang->release->confirmLink);?>
|
||||
<?php js::set('notEmptyBuilds', $notEmptyBuilds);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
|
||||
Reference in New Issue
Block a user