Merge pull request #757 from grahamc/fixup-migration-p2
schema/Builds: use jobset_id instead of jobset name matches
This commit is contained in:
commit
16ecd4f59d
|
@ -172,7 +172,7 @@ sub get_builds : Chained('job') PathPart('') CaptureArgs(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{allBuilds} = $c->stash->{job}->builds;
|
$c->stash->{allBuilds} = $c->stash->{job}->builds;
|
||||||
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJob')
|
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJob')
|
||||||
->search({}, {bind => [$c->stash->{jobset}->name, $c->stash->{job}->name]});
|
->search({}, {bind => [$c->stash->{jobset}->id, $c->stash->{job}->name]});
|
||||||
$c->stash->{channelBaseName} =
|
$c->stash->{channelBaseName} =
|
||||||
$c->stash->{project}->name . "-" . $c->stash->{jobset}->name . "-" . $c->stash->{job}->name;
|
$c->stash->{project}->name . "-" . $c->stash->{jobset}->name . "-" . $c->stash->{job}->name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ sub get_builds : Chained('jobsetChain') PathPart('') CaptureArgs(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{allBuilds} = $c->stash->{jobset}->builds;
|
$c->stash->{allBuilds} = $c->stash->{jobset}->builds;
|
||||||
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJobset')
|
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJobset')
|
||||||
->search({}, {bind => [$c->stash->{jobset}->name]});
|
->search({}, {bind => [$c->stash->{jobset}->id]});
|
||||||
$c->stash->{channelBaseName} =
|
$c->stash->{channelBaseName} =
|
||||||
$c->stash->{project}->name . "-" . $c->stash->{jobset}->name;
|
$c->stash->{project}->name . "-" . $c->stash->{jobset}->name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -622,8 +622,8 @@ QUERY
|
||||||
|
|
||||||
makeQueries('', "");
|
makeQueries('', "");
|
||||||
makeQueries('ForProject', "and project = ?");
|
makeQueries('ForProject', "and project = ?");
|
||||||
makeQueries('ForJobset', "and jobset_id = (select id from jobsets j where j.name = ?)");
|
makeQueries('ForJobset', "and jobset_id = ?");
|
||||||
makeQueries('ForJob', "and jobset_id = (select id from jobsets j where j.name = ?) and job = ?");
|
makeQueries('ForJob', "and jobset_id = ? and job = ?");
|
||||||
|
|
||||||
|
|
||||||
my %hint = (
|
my %hint = (
|
||||||
|
|
Loading…
Reference in a new issue