To reproduce: open http://server:port/cc.xml and note the value of the
lastBuildLabel and lastBuildTime elements. Start a new build of a project and
immediately reload the cc.xml url (before the build is done). Notice that the
lastBuildLabel and lastBuildTime has been incremented, but lastBuildStatus
reports the status of the last complete build.
The correct behavior would be to have lastBuildLabel, lastBuildTime and
lastBuildStatus report the state of the latest /completed/ build.
The current behavior causes CCTray to show a message reporting a successful
build when Hudson starts building, and not giving any report when Hudson
finishes building.
A simple fix is to add
public RunT getLastCompletedBuild()
to Job and use that instead of lastBuild in cc.xml.jelly:
<j:set var="lb" value="${p.lastBuild}"/>