[FIXED HUDSON-1734] applied a patch from rfaber@dev.java.net. In 1.219

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9592 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-05-22 21:18:18 +00:00
1 parent 7a5b6dea88
commit d9840234a7
2 files changed
+12 -1

No files matched your search

+11
View File
@@ -610,6 +610,17 @@ public abstract class Job<JobT extends Job<JobT,RunT>, RunT extends Run<JobT,Run
r=r.getPreviousBuild();
return r;
}
/**
* Returns the last completed build, if any. Otherwise null.
*/
@Exported @QuickSilver
public RunT getLastCompletedBuild() {
RunT r = getLastBuild();
while(r!=null && r.isBuilding())
r=r.getPreviousBuild();
return r;
}
/**
* Used as the color of the status ball for the project.