Let Builds.timestamp refer to the time the build was added

Previously, for scheduled builds, "timestamp" contained the time the
build was added to the queue, while for finished builds, it was the
time the build finished.  Now it's always the former.
This commit is contained in:
Eelco Dolstra
2013-05-23 10:45:49 -04:00
parent e09622eb29
commit 57b2bb0674
15 changed files with 31 additions and 30 deletions

View File

@ -66,7 +66,7 @@ sub all : Chained('get_builds') PathPart {
$c->stash->{builds} = [ $c->stash->{allBuilds}->search(
{ finished => 1 },
{ order_by => "timestamp DESC"
{ order_by => "stoptime DESC"
, columns => [@buildListColumns]
, rows => $resultsPerPage
, page => $page }) ];
@ -97,7 +97,7 @@ sub latest : Chained('get_builds') PathPart('latest') {
my ($self, $c, @rest) = @_;
my ($latest) = $c->stash->{allBuilds}->search(
{finished => 1, buildstatus => 0}, {order_by => ["isCurrent DESC", "timestamp DESC"]});
{finished => 1, buildstatus => 0}, {order_by => ["id DESC"]});
notFound($c, "There is no successful build to redirect to.") unless defined $latest;
@ -112,7 +112,7 @@ sub latest_for : Chained('get_builds') PathPart('latest-for') {
notFound($c, "You need to specify a platform type in the URL.") unless defined $system;
my ($latest) = $c->stash->{allBuilds}->search(
{finished => 1, buildstatus => 0, system => $system}, {order_by => ["isCurrent DESC", "timestamp DESC"]});
{finished => 1, buildstatus => 0, system => $system}, {order_by => ["id DESC"]});
notFound($c, "There is no successful build for platform `$system' to redirect to.") unless defined $latest;