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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user