* 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

@ -373,6 +373,10 @@ sub add_to_release : Chained('build') PathPart('add-to-release') Args(0) {
error($c, "This build is already a part of release `$releaseName'.") error($c, "This build is already a part of release `$releaseName'.")
if $release->releasemembers->find({build => $build->id}); 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}); $release->releasemembers->create({build => $build->id, description => $build->description});
$c->flash->{buildMsg} = "Build added to project <tt>$releaseName</tt>."; $c->flash->{buildMsg} = "Build added to project <tt>$releaseName</tt>.";

View file

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