This commit is contained in:
王怡栋
2022-11-15 10:00:46 +08:00
parent acff04675a
commit 236ae00f18
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -372,7 +372,7 @@ class projectrelease extends control
$builds = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->in($release->build)->fetchAll('id');
foreach($builds as $build)
{
if(empty($build->execution)) $this->build->delete(TABLE_BUILD, $build->id);
if(empty($build->execution) and empty($build->builds) and $build->createdDate == $release->createdDate) $this->build->delete(TABLE_BUILD, $build->id);
}
$message = $this->executeHooks($releaseID);
@@ -390,7 +390,6 @@ class projectrelease extends control
{
$response['result'] = 'success';
$response['message'] = '';
$this->dao->update(TABLE_BUILD)->set('deleted')->eq(1)->where('id')->in($release->build)->andWhere('name')->eq($release->name)->exec();
}
return $this->send($response);
}
+1 -1
View File
@@ -38,7 +38,7 @@
<td>
<div class='input-group'>
<?php echo html::select('product', $products, $product->id, "onchange='loadBranches(this.value)' class='form-control chosen'");?>
<?php if($product->type != 'normal') echo html::select('branch', $branches, $branch, "class='form-control chosen control-branch'");?>
<?php if($product->type != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBuilds()' class='form-control chosen control-branch'");?>
</div>
</td>
<td></td>