* Only non-garbage collected builds can be added to a release.

This commit is contained in:
Eelco Dolstra 2009-10-26 10:46:57 +00:00
parent f984eed77b
commit 578e37d55c
2 changed files with 5 additions and 1 deletions

View file

@ -372,6 +372,10 @@ sub add_to_release : Chained('build') PathPart('add-to-release') Args(0) {
error($c, "This build is already a part of release `$releaseName'.")
if $release->releasemembers->find({build => $build->id});
registerRoot $build->outpath;
error($c, "This build is no longer available.") unless isValidPath $build->outpath;
$release->releasemembers->create({build => $build->id, description => $build->description});

View file

@ -206,7 +206,7 @@
</table>
[% IF c.user_exists %]
[% IF c.user_exists && available %]
<form action="[% c.uri_for('/build' build.id 'add-to-release') %]" method="post">
<p>Add to release: <input type="text" class="string" name="name" />
<button type="submit"><img src="/static/images/success.gif" />Apply</button></p>