Class JiraService
java.lang.Object
com.northconcepts.datapipeline.jira.client.JiraService
Creates, updates, searches, transitions, comments on and deletes Jira issues through
JiraClient, returning JSON
responses as records.-
Constructor Summary
ConstructorsConstructorDescriptionJiraService(String domain, String username, String apiKey) Creates a service for the Jira site at thedomainbase URL; callclose()when done. -
Method Summary
Modifier and TypeMethodDescriptionaddIssueComment(String issueId, String comment) voidclose()createIssue(JiraIssue jiraIssue) createIssue(String projectKey, String summary, int issueType) Creates an issue of the given type ID in the project with the given key; aparententry inoptionalFieldssets the parent issue's key and the other entries are set as issue fields.voiddeleteIssue(String issueId) 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.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 ifissueIdsis null.getIssueTransitions(String issueId) Returns the issue's transitions as a record whose field names are transition IDs and whose values are transition names.searchIssue(JiraSearch search) Runs the search and returns one page of results; pass itsnextPageTokentoJiraSearch.setNextPageToken(String)for the next page.voidtransitionIssue(String issueId, int transitionId) voidupdateIssue(String issueIdOrKey, JiraIssue jiraIssue)
-
Constructor Details
-
JiraService
Creates a service for the Jira site at thedomainbase URL; callclose()when done.
-
-
Method Details
-
close
public void close() -
createIssue
-
createIssue
-
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; aparententry inoptionalFieldssets the parent issue's key and the other entries are set as issue fields. -
updateIssue
-
searchIssue
Runs the search and returns one page of results; pass itsnextPageTokentoJiraSearch.setNextPageToken(String)for the next page. -
getIssueTransitions
Returns the issue's transitions as a record whose field names are transition IDs and whose values are transition names. -
transitionIssue
-
getIssueStatus
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 ifissueIdsis null. -
deleteIssue
-
getIssueComments
Returns a record mapping each comment ID to a record with the comment's author display name, body, created and updated values. -
addIssueComment
-