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.
  • Loading branch information
jglick committed Oct 9, 2014
1 parent 9c96f3d commit f463abb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Build health computed repeatedly for a single Weather column cell.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-25074">issue 25074</a>)
<li class=rfe>
Missing workspace page should use 404 status code.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10450">issue 10450</a>)
Expand Down
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 f463abb

Please sign in to comment.