The URI parameter "compare=…" can denote either an arbitrary evaluation ID, or the name of a jobset in the same project. In the latter case, the comparison is made against the latest completed evaluation of the specified jobset.
DE2DNCOIEVRA6OOSOSXI2USRPOWL4SC6XPCJFOUM54BS2ESCEWOAC WZZOOYCHQJJ6BWQPJFXULOBVSLZXPMOKM2YNA7TPEXUINLXFVI5AC U4TD3AIQXBJFFUORTMIC4IHZTVBORRKL2TZ2FSP4G665ECZOEMNAC 3HZY24CX4U2TO74HOY4YX3LBJIYF4DLXHCIY7J2RASAC4COMSMZAC L7NUCXKSELV2XQBSETAN2KSXN5ONX3ESJDHZL6737LMK4KPGQANQC E5DMQRPO5BQ6KNA3C34U5JQQ5ZAZOJE2HTWM3JUVIG42LAVHPHFQC 75XUS62YF7OK4S45RCZ5OOASXEBIEDNDBYEEMOCBDHVXV4GA3NLQC IK53RV4VGOHLCZGQCCIKPB45M3C7M7YMNBOJFBGZJ4LWIZNU4QNQC my ($eval2) = $eval->jobset->jobsetevals->search({ hasnewbuilds => 1, id => { '<', $eval->id } },{ order_by => "id DESC", rows => 1 });
my $compare = $c->req->params->{compare};my $eval2;# Allow comparing this evaluation against the previous evaluation# (default), an arbitrary evaluation, or the latest completed# evaluation of another jobset.if (defined $compare && $compare =~ /^\d+$/) {$eval2 = $c->model('DB::JobsetEvals')->find($compare)or notFound($c, "Evaluation $compare doesn't exist.");} elsif (defined $compare && $compare =~ /^($jobNameRE)$/) {my $j = $c->stash->{project}->jobsets->find({name => $compare})or notFound($c, "Jobset $compare doesn't exist.");($eval2) = $j->jobsetevals->search({ hasnewbuilds => 1 },{ order_by => "id DESC", rows => 1, where => \ "not exists (select 1 from JobsetEvalMembers m join Builds b on m.build = b.id where m.eval = me.id and b.finished = 0)"});} else {($eval2) = $eval->jobset->jobsetevals->search({ hasnewbuilds => 1, id => { '<', $eval->id } },{ order_by => "id DESC", rows => 1 });}
<!-- <p>Info on evaluation [% eval.id %]...<p> -->
[%- IF otherEval -%]<p>Comparisons are relative to [% INCLUDE renderFullJobsetNameproject=otherEval.jobset.project.name jobset=otherEval.jobset.name %]evaluation <a href="[%c.uri_for(c.controller('JobsetEval').action_for('view'),[otherEval.id]) %]">[% otherEval.id %]</a>.</p>[%- END -%]