From eca7510c036ece2d8d5f8aeb3a71d6df85f1d5bc Mon Sep 17 00:00:00 2001 From: Ilya <6630990+il--ya@users.noreply.github.com> Date: Thu, 22 Aug 2019 10:14:40 +0100 Subject: [PATCH] Fix chart with deleted builds [JENKINS-25340] [JENKINS-52711] --- src/main/java/hudson/tasks/test/AbstractTestResultAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);