diff --git a/src/Hydra/lib/Hydra/Controller/Root.pm b/src/Hydra/lib/Hydra/Controller/Root.pm
index 55c63dd3..159dc770 100644
--- a/src/Hydra/lib/Hydra/Controller/Root.pm
+++ b/src/Hydra/lib/Hydra/Controller/Root.pm
@@ -228,6 +228,10 @@ sub getRelease {
my @jobs = ();
my $status = 0; # = okay
+
+ # The timestamp of the release is the highest timestamp of all
+ # constitutent builds.
+ my $timestamp = 0;
foreach my $job (@{$c->stash->{jobs}}) {
my $thisBuild;
@@ -254,6 +258,9 @@ sub getRelease {
}
}
+ $timestamp = $thisBuild->timestamp
+ if defined $thisBuild && $thisBuild->timestamp > $timestamp;
+
push @jobs, { build => $thisBuild, job => $job };
}
@@ -262,6 +269,7 @@ sub getRelease {
, releasename => $primaryBuild->get_column('releasename')
, jobs => [@jobs]
, status => $status
+ , timestamp => $timestamp
};
}
diff --git a/src/Hydra/root/releases.tt b/src/Hydra/root/releases.tt
index 24a3c07e..a0b88c4b 100644
--- a/src/Hydra/root/releases.tt
+++ b/src/Hydra/root/releases.tt
@@ -12,6 +12,7 @@
|
# |
Release |
+ Date |
[% FOREACH job IN jobs %]
[% PROCESS renderReleaseJobName %] |
[% END %]
@@ -39,6 +40,7 @@
No name
[% END %]
+ [% INCLUDE renderDateTime timestamp=release.timestamp %] |
[% FOREACH job IN release.jobs %]
[% IF job.build %]
diff --git a/src/Hydra/sql/hydra.sql b/src/Hydra/sql/hydra.sql
index 94e23a24..f4cad801 100644
--- a/src/Hydra/sql/hydra.sql
+++ b/src/Hydra/sql/hydra.sql
@@ -297,11 +297,11 @@ create trigger cascadeUserDelete
-- consists of, namely: a release consists of a build of some
-- "primary" job, plus all builds of the other jobs named in
-- ReleaseSetJobs that have that build as an input. If there are
--- multiple builds matching a ReleaseSetJob, then we take the *oldest*
--- successful build (for release stability), or the *newest*
--- unsuccessful build if there is no succesful build. A release is
--- itself considered successful if all builds (except those for jobs
--- that have mayFail set) are successful.
+-- multiple builds matching a ReleaseSetJob, then we take the oldest
+-- successful build, or the oldest unsuccessful build if there is no
+-- successful build. A release is itself considered successful if all
+-- builds (except those for jobs that have mayFail set) are
+-- successful.
--
-- Note that individual releases aren't separately stored in the
-- database, so they're really just a dynamic view on the universe of
|