Class JiraService

java.lang.Object
com.northconcepts.datapipeline.jira.client.JiraService

public class JiraService extends Object
Creates, updates, searches, transitions, comments on and deletes Jira issues through JiraClient, returning JSON responses as records.
  • Constructor Details

    • JiraService

      public JiraService(String domain, String username, String apiKey)
      Creates a service for the Jira site at the domain base URL; call close() when done.
  • Method Details

    • close

      public void close()
    • createIssue

      public Record createIssue(JiraIssue jiraIssue)
    • createIssue

      public Record createIssue(String projectKey, String summary, int issueType)
    • createIssue

      public Record createIssue(String projectKey, String summary, int issueType, Map<String,String> optionalFields)
      Creates an issue of the given type ID in the project with the given key; a parent entry in optionalFields sets the parent issue's key and the other entries are set as issue fields.
    • updateIssue

      public void updateIssue(String issueIdOrKey, JiraIssue jiraIssue)
    • searchIssue

      public Record searchIssue(JiraSearch search)
      Runs the search and returns one page of results; pass its nextPageToken to JiraSearch.setNextPageToken(String) for the next page.
    • getIssueTransitions

      public Record getIssueTransitions(String issueId)
      Returns the issue's transitions as a record whose field names are transition IDs and whose values are transition names.
    • transitionIssue

      public void transitionIssue(String issueId, int transitionId)
    • getIssueStatus

      public Record getIssueStatus(String... issueIds)
      Returns a record mapping each issue ID to its status name, or to Jira's error response if the issue is not found; returns null if issueIds is null.
    • deleteIssue

      public void deleteIssue(String issueId)
    • getIssueComments

      public Record getIssueComments(String issueId)
      Returns a record mapping each comment ID to a record with the comment's author display name, body, created and updated values.
    • addIssueComment

      public Record addIssueComment(String issueId, String comment)