public void muteIssue()

in tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/board/BoardService.java [412:451]


    public void muteIssue(
        int tcSrvId,
        int nameId,
        String branch,
        String trackedBranch,
        String issueType,
        String jiraTicket,
        String comment,
        String userName,
        String webUrl) {

        if (branch == null || trackedBranch == null || issueType == null|| jiraTicket == null||
                comment == null || userName == null || webUrl == null ||
                userName.isEmpty() ||
                jiraTicket.length() > 100 || comment.length() > 500 ||
                userName.length() > 100 || webUrl.length() > 250
        )
            throw new IllegalArgumentException(String.format("branch: %s, trackedBranch: %s, issueType: %s, jiraTicket: %s, " +
                "comment: %s, userName: %s, webUrl: %s, ",
                String.valueOf(branch), String.valueOf(trackedBranch), String.valueOf(issueType), String.valueOf(jiraTicket),
                String.valueOf(comment), String.valueOf(userName), String.valueOf(webUrl)));

        Integer branchId = compactor.getStringIdIfPresent(branch);

        if (branchId <= 0)
            throw new IllegalArgumentException("There is no id in the stringsCache for string: \"" + branch + "\"");

        MutedIssueKey issueKey = new MutedIssueKey(tcSrvId, nameId, branchId, IssueType.valueOf(issueType));

        if (mutedIssuesDao.getMutedIssue(issueKey) == null) {
            Integer trackedBranchId = compactor.getStringIdIfPresent(trackedBranch);

            if (trackedBranchId <= 0)
                throw new IllegalArgumentException("There is no id in the stringsCache for string: \"" + trackedBranch + "\"");

            MutedIssueInfo issueInfo = new MutedIssueInfo(trackedBranchId, userName, jiraTicket, comment, webUrl);

            mutedIssuesDao.putIssue(issueKey, issueInfo);
        }
    }