Tabnine Logo
IssueRestClient.addComment
Code IndexAdd Tabnine to your IDE (free)

How to use
addComment
method
in
com.atlassian.jira.rest.client.api.IssueRestClient

Best Java code snippets using com.atlassian.jira.rest.client.api.IssueRestClient.addComment (Showing top 2 results out of 315)

origin: jenkinsci/jira-plugin

public void addComment(String issueId, String commentBody,
                   String groupVisibility, String roleVisibility) {
  final URIBuilder builder = new URIBuilder(uri)
      .setPath(String.format("%s/issue/%s/comment", baseApiPath, issueId));
  final Comment comment;
  if (StringUtils.isNotBlank(groupVisibility)) {
    comment = Comment.createWithGroupLevel(commentBody, groupVisibility);
  } else if (StringUtils.isNotBlank(roleVisibility)) {
    comment = Comment.createWithRoleLevel(commentBody, roleVisibility);
  } else {
    comment = Comment.valueOf(commentBody);
  }
 try {
   jiraRestClient.getIssueClient().addComment(builder.build(), comment).get(timeout, TimeUnit.SECONDS);
 } catch (Exception e) {
   LOGGER.log(WARNING, "jira rest client add comment error. cause: " + e.getMessage(), e);
 }
}
origin: org.jboss.set/jboss-aphrodite-jira

private void postComment(Issue issue, Comment comment) throws NotFoundException {
  if (comment.isPrivate())
    Utils.logWarnMessage(LOG, "Private comments are not currently supported by " + getClass().getName());
  com.atlassian.jira.rest.client.api.domain.Issue jiraIssue = getIssue(issue);
  com.atlassian.jira.rest.client.api.domain.Comment c =
      com.atlassian.jira.rest.client.api.domain.Comment.valueOf(comment.getBody());
  restClient.getIssueClient().addComment(jiraIssue.getCommentsUri(), c).claim();
}
com.atlassian.jira.rest.client.apiIssueRestClientaddComment

Javadoc

Adds a comment to JIRA (adding it to selected issue)

Popular methods of IssueRestClient

  • getIssue
    Retrieves issue with selected issue key, with specified additional expandos.
  • createIssue
    Creates new issue.
  • getTransitions
    Retrieves complete information (if the caller has permission) about transitions available for the se
  • transition
    Performs selected transition on selected issue.
  • updateIssue
    Update an existing issue.
  • getCreateIssueMetadata
    Retrieves CreateIssueMetadata with specified filters.
  • linkIssue
    Creates link between two issues and adds a comment (optional) to the source issues.

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JTable (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now