cc.xml reports incorrect "lastBuildLabel" and "lastBuildTime"

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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()

      { RunT r = getLastBuild(); while(r!=null && r.isBuilding()) r=r.getPreviousBuild(); return r; }

      to Job and use that instead of lastBuild in cc.xml.jelly:
      <j:set var="lb" value="${p.lastBuild}"/>

            Assignee:
            Unassigned
            Reporter:
            rfaber
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: