in src/main/java/jetbrains/buildServer/investigationsAutoAssigner/FailedTestAndBuildProblemsDispatcher.java [218:239]
private void putIntoDelayAssignments(@NotNull final FailedBuildInfo currentFailedBuildInfo) {
@Nullable
SBuildType buildType = currentFailedBuildInfo.getBuild().getBuildType();
if (buildType == null) {
return;
}
Long previouslyAddedBuildId = myDelayedAssignments.get(buildType.getInternalId());
SBuild previouslyAddedBuild = previouslyAddedBuildId == null ? null : myBuildsManager.findBuildInstanceById(previouslyAddedBuildId);
if (previouslyAddedBuild == null) {
myDelayedAssignments.put(buildType.getInternalId(), currentFailedBuildInfo.getBuildId());
return;
}
BuildPromotion currentBuildPromotion = currentFailedBuildInfo.getBuild().getBuildPromotion();
BuildPromotion previouslyAddedPromotion = previouslyAddedBuild.getBuildPromotion();
if (currentBuildPromotion.isLaterThan(previouslyAddedPromotion)) {
processOlderAndDelayNew(buildType, new FailedBuildInfo(previouslyAddedBuild), currentFailedBuildInfo);
} else {
processOlderAndDelayNew(buildType, currentFailedBuildInfo, new FailedBuildInfo(previouslyAddedBuild));
}
}