public DsTestFailureUi initFromOccurrence()

in tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/ui/DsTestFailureUi.java [92:140]


    public DsTestFailureUi initFromOccurrence(@Nonnull final TestCompactedMult failure,
        @Nonnull final ITeamcityIgnited tcIgn,
        @Nullable final String projectId,
        @Nullable final String branchName,
        @Nullable final String baseBranchName,
        Integer baseBranchId,
        @Nullable Integer curBranchId,
        @Nullable Map<Integer, Integer> requireParameters) {
        success = !failure.isFailedButNotMuted();

        investigated = failure.isInvestigated();
        curFailures = failure.failuresCount();
        durationPrintable = millisToDurationPrintable(failure.getAvgDurationMs());

        initFrom(failure, tcIgn, baseBranchId);

        failure.getInvocationsStream()
            .map(ITest::getDetailsText)
            .filter(Objects::nonNull)
            .forEach(details -> {
                //todo check integration with JIRA
                if (webIssueUrl == null)
                    checkAndFillByPrefix(details, "https://issues.apache.org/jira/browse/");

                if (webIssueUrl == null)
                    checkAndFillByPrefix(details, "http://issues.apache.org/jira/browse/");

                for (String s : details.split("\n")) {
                    if (LogMsgToWarn.needWarn(s))
                        warnings.add(s);
                }
            });

        failure.getInvocationsStream()
            .map(ITest::getTestId)
            .filter(Objects::nonNull)
            .forEach(testNameId -> {
                if (webUrl == null)
                    webUrl = buildTestWebLink(tcIgn, testNameId, projectId, branchName);

                if (webUrlBaseBranch == null)
                    webUrlBaseBranch = buildTestWebLink(tcIgn, testNameId, projectId, baseBranchName);
            });


        initStat(failure, tcIgn, baseBranchId, curBranchId, requireParameters);

        return this;
    }