[Issue 1734] New - cc.xml reports incorrect "lastBuildLabel" and "lastBuildTime"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Issue 1734] New - cc.xml reports incorrect "lastBuildLabel" and "lastBuildTime"

rfaber-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1734
                 Issue #|1734
                 Summary|cc.xml reports incorrect "lastBuildLabel" and "lastBui
                        |ldTime"
               Component|hudson
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P4
            Subcomponent|www
             Assigned to|issues@hudson
             Reported by|rfaber






------- Additional comments from [hidden email] Wed May 21 20:49:03 +0000 2008 -------
To reproduce: open <a href="http://server:port/cc.xml">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}"/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 1734] cc.xml reports incorrect "lastBuildLabel" and "lastBuildTime"

rfaber-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1734



User rfaber changed the following:

                What    |Old value                 |New value
================================================================================
     Attachment is patch|                          |Created an attachment (id=
                        |                          |265)
Fix

--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Thu May 22 17:54:46 +0000 2008 -------
Created an attachment (id=265)
Fix


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 1734] cc.xml reports incorrect "lastBuildLabel" and "lastBuildTime"

scm_issue_link
In reply to this post by rfaber-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1734



User scm_issue_link changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Thu May 22 21:21:14 +0000 2008 -------
Code changed in hudson
User: : kohsuke
Path:
 trunk/hudson/main/core/src/main/java/hudson/model/Job.java
 trunk/hudson/main/core/src/main/resources/hudson/model/View/cc.xml.jelly
http://fisheye4.cenqua.com/changelog/hudson/?cs=9592
Log:
[FIXED HUDSON-1734] applied a patch from [hidden email]. In 1.219


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 1734] cc.xml reports incorrect "lastBuildLabel" and "lastBuildTime"

scm_issue_link
In reply to this post by rfaber-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1734






------- Additional comments from [hidden email] Thu May 22 21:23:21 +0000 2008 -------
Code changed in hudson
User: : kohsuke
Path:
 trunk/www/changelog.html
http://fisheye4.cenqua.com/changelog/hudson/?cs=9593
Log:
noting HUDSON-1734 fix.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]