diff --git a/src/main/java/hudson/tasks/test/AbstractTestResultAction.java b/src/main/java/hudson/tasks/test/AbstractTestResultAction.java index f096e1804..b9b595832 100644 --- a/src/main/java/hudson/tasks/test/AbstractTestResultAction.java +++ b/src/main/java/hudson/tasks/test/AbstractTestResultAction.java @@ -222,7 +222,7 @@ private U getPreviousResult(Class type, loadedBuilds = null; } while(true) { - b = loadedBuilds == null || loadedBuilds.contains(b.number - /* assuming there are no gaps */1) ? b.getPreviousBuild() : null; + b = loadedBuilds == null ? b.getPreviousBuild() : ((LazyBuildMixIn.LazyLoadingJob)b.getParent()).getLazyBuildMixIn().getNearestOldBuild(b.number - 1); if(b==null) return null; U r = b.getAction(type);