Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 4629122
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/main/resources/lib/hudson/buildHealth.jelly
Expand Up @@ -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>
Expand Down Expand Up @@ -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" />
Expand Down

0 comments on commit 4629122

Please sign in to comment.