B:BD[
3.119] → [
2.631:803]
$c->stash->{job_} = $c->model('DB::Jobs')->search({project => $projectName, jobset => $jobsetName, name => $jobName});
$c->stash->{job} = $c->stash->{job_}->single
if (!$c->stash->{jobset}) {
my $rename = $c->model('DB::JobsetRenames')->find({ project => $projectName, from_ => $jobsetName });
notFound($c, "Jobset ‘$jobsetName’ doesn't exist.") unless defined $rename;
# Return a permanent redirect to the new jobset name.
my @captures = @{$c->req->captures};
$captures[1] = $rename->to_;
$c->res->redirect($c->uri_for($c->action, \@captures, $c->req->params), 301);
$c->detach;
}
$c->stash->{job} = $c->stash->{jobset}->jobs->find({ name => $jobName })