Fix Changes section on build page. Now shows the changes of the first evaluation a build was part of compared to the previous one. Also separated previous builds from the changes section, as that was confusing sometimes.
This commit is contained in:
		@@ -107,6 +107,11 @@ sub build_GET {
 | 
				
			|||||||
        entity => $build
 | 
					        entity => $build
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    my ($eval2) = $c->stash->{eval}->jobset->jobsetevals->search(
 | 
				
			||||||
 | 
					       { hasnewbuilds => 1, id => { '<', $c->stash->{eval}->id } },
 | 
				
			||||||
 | 
					       { order_by => "id DESC", rows => 1 });
 | 
				
			||||||
 | 
					    $c->stash->{otherEval} = $eval2 if defined $eval2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # If this is an aggregate build, get its constituents.
 | 
					    # If this is an aggregate build, get its constituents.
 | 
				
			||||||
    $c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})];
 | 
					    $c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -224,8 +224,13 @@
 | 
				
			|||||||
        [% INCLUDE renderBuildSteps type="Failed" %]
 | 
					        [% INCLUDE renderBuildSteps type="Failed" %]
 | 
				
			||||||
      [% END %]
 | 
					      [% END %]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      [% IF prevSuccessfulBuild %]
 | 
					      [% IF otherEval %]
 | 
				
			||||||
        <h3>Changes</h3>
 | 
					        <h3>Changes</h3>
 | 
				
			||||||
 | 
					        [% INCLUDE renderInputDiff inputs2=eval.jobsetevalinputs inputs1=otherEval.jobsetevalinputs %]
 | 
				
			||||||
 | 
					      [% END %]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      [% IF prevSuccessfulBuild %]
 | 
				
			||||||
 | 
					        <h3>Previous builds</h3>
 | 
				
			||||||
        <table class="table table-striped table-condensed">
 | 
					        <table class="table table-striped table-condensed">
 | 
				
			||||||
          <thead>
 | 
					          <thead>
 | 
				
			||||||
            <th>Last successful build [% INCLUDE renderDateTime timestamp = prevSuccessfulBuild.timestamp %]</th>
 | 
					            <th>Last successful build [% INCLUDE renderDateTime timestamp = prevSuccessfulBuild.timestamp %]</th>
 | 
				
			||||||
@@ -250,7 +255,6 @@
 | 
				
			|||||||
            [% IF prevSuccessfulBuild && firstBrokenBuild && firstBrokenBuild.id != build.id %]
 | 
					            [% IF prevSuccessfulBuild && firstBrokenBuild && firstBrokenBuild.id != build.id %]
 | 
				
			||||||
              <td>[% INCLUDE renderInputDiff inputs1=prevSuccessfulBuild.inputs inputs2=firstBrokenBuild.inputs %]</td>
 | 
					              <td>[% INCLUDE renderInputDiff inputs1=prevSuccessfulBuild.inputs inputs2=firstBrokenBuild.inputs %]</td>
 | 
				
			||||||
            [% END %]
 | 
					            [% END %]
 | 
				
			||||||
            <td>[% INCLUDE renderInputDiff inputs1=prevSuccessfulBuild.inputs inputs2=build.inputs %]</td>
 | 
					 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
        </table>
 | 
					        </table>
 | 
				
			||||||
      [% END %]
 | 
					      [% END %]
 | 
				
			||||||
@@ -380,11 +384,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      [% INCLUDE renderInputs inputs=build.inputs %]
 | 
					      [% INCLUDE renderInputs inputs=build.inputs %]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      [% IF prevBuild %]
 | 
					 | 
				
			||||||
        <h3>Changes since previous [% INCLUDE renderBuildLink build=prevBuild %]</h3>
 | 
					 | 
				
			||||||
        [% INCLUDE renderInputDiff inputs2=build.inputs inputs1=prevBuild.inputs %]
 | 
					 | 
				
			||||||
      [% END %]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    [% ELSIF eval %]
 | 
					    [% ELSIF eval %]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      [% INCLUDE renderInputs inputs=eval.jobsetevalinputs %]
 | 
					      [% INCLUDE renderInputs inputs=eval.jobsetevalinputs %]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user