Add a /eval action to /build to go from a build to the latest finished eval

[?]
Aug 12, 2013, 11:43 PM
Y3UI4OJI64EC443KMP6CJPTMQDPHHJOBWGLUW2YVVGSRHCQZYYXQC

Dependencies

  • [2] HZWUT4YN Allow users to reproduce builds on their own systems
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] ND75XNSQ Allow showing all evaluations that contain a given build

Change contents

  • edit in src/lib/Hydra/Controller/Build.pm at line 618
    [5.588]
    [2.0]
    }
    # Redirect to the latest finished evaluation that contains this build.
    sub eval : Chained('buildChain') PathPart('eval') {
    my ($self, $c, @rest) = @_;
    my $eval = $c->stash->{build}->jobsetevals->find(
    { hasnewbuilds => 1 },
    { order_by => "id DESC", rows => 1
    , "not exists (select 1 from jobsetevalmembers m2 join builds b2 on me.eval = m2.eval and m2.build = b2.id and b2.finished = 0)"
    });
    notFound($c, "There is no finished evaluation containing this build.") unless defined $eval;
    $c->res->redirect($c->uri_for($c->controller('JobsetEval')->action_for("view"), [$eval->id], @rest, $c->req->params));