diff --git a/src/lib/Hydra/Controller/Release.pm b/src/lib/Hydra/Controller/Release.pm index c4fe0798..ba9f0e80 100644 --- a/src/lib/Hydra/Controller/Release.pm +++ b/src/lib/Hydra/Controller/Release.pm @@ -35,6 +35,14 @@ sub updateRelease { { name => $releaseName , description => trim $c->request->params->{description} }); + + $release->releasemembers->delete_all; + foreach my $param (keys %{$c->request->params}) { + next unless $param =~ /^member-(\d+)-description$/; + my $buildId = $1; + my $description = trim $c->request->params->{"member-$buildId-description"}; + $release->releasemembers->create({ build => $buildId, description => $description }); + } } @@ -50,7 +58,7 @@ sub submit : Chained('release') PathPart('submit') Args(0) { requireProjectOwner($c, $c->stash->{project}); - if ($c->request->params->{action} eq "delete") { + if (($c->request->params->{action} || "") eq "delete") { txn_do($c->model('DB')->schema, sub { $c->stash->{release}->delete; }); diff --git a/src/root/edit-release.tt b/src/root/edit-release.tt index b1f3eb75..63e29b51 100644 --- a/src/root/edit-release.tt +++ b/src/root/edit-release.tt @@ -19,10 +19,27 @@
Note: to add a build to this release, go to the build’s + information page and click on “Add to release”.
-Note: to add a build to this release, you can also go to - the build’s information page and click on “Add to release”.
+ [% FOREACH m IN release.releasemembers %] + +Label: | +m.description) %] /> | +
---|
diff --git a/src/root/static/css/hydra.css b/src/root/static/css/hydra.css index 1fff771e..9d5c10db 100644 --- a/src/root/static/css/hydra.css +++ b/src/root/static/css/hydra.css @@ -139,6 +139,10 @@ input.shortString { width: 7em; } +input.longString { + width: 40em; +} + select { background-color: #fffff0; }