diff --git a/src/lib/Hydra/Controller/View.pm b/src/lib/Hydra/Controller/View.pm index ca3dd2f0..5857bd75 100644 --- a/src/lib/Hydra/Controller/View.pm +++ b/src/lib/Hydra/Controller/View.pm @@ -162,6 +162,10 @@ sub result : Chained('view') PathPart('') { my $result = getViewResult($primaryBuild, $c->stash->{jobs}); $c->stash->{result} = $result; + my %jobNames; + $jobNames{$_->{job}->job}++ foreach @{$result->{jobs}}; + $c->stash->{jobNames} = \%jobNames; + if (scalar @args == 1 && $args[0] eq "release") { requireProjectOwner($c, $c->stash->{project}); diff --git a/src/root/view-result.tt b/src/root/view-result.tt index 413aa771..53f5a9e1 100644 --- a/src/root/view-result.tt +++ b/src/root/view-result.tt @@ -27,7 +27,9 @@ [% IF j.build.resultInfo.buildstatus == 0 %] [% IF j.build.buildproducts %] - [% INCLUDE renderProductList build=j.build latestRoot=['/view' project.name view.name 'latest' "${j.job.job}-${j.build.system}"] %] + [% p = jobNames.${j.job.job} > 1 ? "-${j.build.system}" : ""; + INCLUDE renderProductList build=j.build latestRoot=['/view' project.name view.name 'latest' "${j.job.job}${p}"] + %] [% ELSE %]
Succeeded.
[% END %]