This commit is contained in:
tianshujie
2022-04-25 10:50:46 +08:00
parent 42676bf558
commit 873fabb024
3 changed files with 17 additions and 7 deletions
+15 -6
View File
@@ -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();
}
+1 -1
View File
@@ -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);
+1
View File
@@ -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'>