private boolean isApplicable()

in src/main/java/jetbrains/buildServer/investigationsAutoAssigner/processing/BuildProblemsFilter.java [80:109]


  private boolean isApplicable(@NotNull final SProject project,
                               @NotNull final SBuild sBuild,
                               @NotNull final BuildProblem problem) {
    String reason = null;
    String buildProblemType = problem.getBuildProblemData().getType();

    if (problem.isMuted()) {
      reason = "is muted";
    } else if (!myBuildProblemUtils.isNew(problem)) {
      reason = "occurs not for the first time";
    } else if (myInvestigationsManager.checkUnderInvestigation(project, sBuild, problem)) {
      reason = "is already under an investigation";
    } else if (BuildProblemTypes.TC_FAILED_TESTS_TYPE.equals(problem.getBuildProblemData().getType())) {
      reason = "has unsupported failed tests build problem type";
    } else if (myCustomParameters.getBuildProblemTypesToIgnore(sBuild).contains(buildProblemType) || IGNORABLE_BUILD_PROBLEMS.contains(buildProblemType)) {
      reason = "is among build problem types to ignore";
    }

    boolean isApplicable = reason == null;
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug(String.format("Build problem id:%s:%s is %s.%s",
                                 sBuild.getBuildId(),
                                 problem.getTypeDescription(),
                                 (isApplicable ? "applicable" : "not applicable"),
                                 (isApplicable ? "" : String.format(" Reason: this build problem %s.", reason))
      ));
    }

    return isApplicable;
  }