Skip to content
Permalink
Browse files

[FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports jus…

…t once per t:buildHealth render.

(cherry picked from commit f463abb)

Conflicts:
	changelog.html
  • Loading branch information
jglick authored and olivergondza committed Dec 21, 2014
1 parent 03600e9 commit 4629122c5572be5bb1bad4183379a3374b308f6d
Showing with 3 additions and 2 deletions.
  1. +3 −2 core/src/main/resources/lib/hudson/buildHealth.jelly
@@ -31,8 +31,9 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<j:set var="buildHealth" value="${job.buildHealth}"/>
<j:set var="healthReports" value="${job.buildHealthReports}"/>
<j:new var="emptyHealthReport" className="hudson.model.HealthReport"/>
<j:set var="buildHealth" value="${empty(healthReports) ? emptyHealthReport : healthReports[0]}"/>
<j:if test="${td}"><j:set var="useTdElement" value="x"/></j:if>
<x:element name="${useTdElement!=null?'td':'div'}">
<x:attribute name="data">${buildHealth.score}</x:attribute>
@@ -74,7 +75,7 @@ THE SOFTWARE.
</tr>
</thead>
<tbody>
<j:forEach var="rpt" items="${job.buildHealthReports}">
<j:forEach var="rpt" items="${healthReports}">
<tr>
<td align="left">
<l:icon class="${rpt.iconClassName} icon-sm" />

0 comments on commit 4629122

Please sign in to comment.