Interface JiraClientSvc
-
- All Known Implementing Classes:
JiraClientSvcImpl
public interface JiraClientSvcService to perform JIRA operations. Also able to get a JiraClient directly to do custom operations in your ownJiraOperationExtension- Author:
- dalvizu
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCommentToTicket(String jiraIssueKey, String comment)Add a comment to a ticketvoidaddFixVersion(String jiraIssueKey, String newFixVersion)Add a Fix Version to a field, if it doesn't already exist.voidaddLabelToField(String jiraIssueKey, String jiraFieldName, String fieldContent)Adds a label to a ticket's field of the label type.voidaddLabelToTicket(String jiraIssueKey, String labelToAdd)Add a label to a ticketvoidchangeWorkflowOfTicket(String jiraIssueKey, String transitionName)Apply the transition to a ticketObjectgetFieldValue(String jiraTicket, String jiraFieldId)Map<String,String>getJiraFields(String issueKey)Get a map of fieldIds to fieldName for the given issue keynet.rcarz.jiraclient.JiraClientnewJiraClient()Create a new JiraClient from config, if you want to do some really custom JIRA operations using the rcarz client.voidupdateMultiSelectField(String jiraIssueKey, String jiraFieldName, String... values)Update a ticket's field with a multi-select value.voidupdateStringField(String jiraTicketNumber, String fieldName, String fieldContent)Update ticket ticket's field with a string value
-
-
-
Method Detail
-
newJiraClient
net.rcarz.jiraclient.JiraClient newJiraClient()
Create a new JiraClient from config, if you want to do some really custom JIRA operations using the rcarz client.- Returns:
- a JiraClient configure with global config
-
addCommentToTicket
void addCommentToTicket(String jiraIssueKey, String comment) throws net.rcarz.jiraclient.JiraException
Add a comment to a ticket- Parameters:
jiraIssueKey- - the issue key (ex: JENKINS-101)comment- - the comment to add. Can use JIRA markup- Throws:
net.rcarz.jiraclient.JiraException
-
addLabelToTicket
void addLabelToTicket(String jiraIssueKey, String labelToAdd) throws net.rcarz.jiraclient.JiraException
Add a label to a ticket- Parameters:
jiraIssueKey- - the issue key (ex: JENKINS-101)labelToAdd- - the label to add- Throws:
net.rcarz.jiraclient.JiraException
-
changeWorkflowOfTicket
void changeWorkflowOfTicket(String jiraIssueKey, String transitionName) throws net.rcarz.jiraclient.JiraException
Apply the transition to a ticket- Parameters:
jiraIssueKey- - the issue key (ex: JENKINS-101)transitionName- - the name of the transition- Throws:
net.rcarz.jiraclient.JiraException
-
updateStringField
void updateStringField(String jiraTicketNumber, String fieldName, String fieldContent) throws net.rcarz.jiraclient.JiraException
Update ticket ticket's field with a string value- Parameters:
jiraTicketNumber-fieldName-fieldContent-- Throws:
net.rcarz.jiraclient.JiraException
-
updateMultiSelectField
void updateMultiSelectField(String jiraIssueKey, String jiraFieldName, String... values) throws net.rcarz.jiraclient.JiraException
Update a ticket's field with a multi-select value.- Parameters:
jiraIssueKey-jiraFieldName-values-- Throws:
net.rcarz.jiraclient.JiraException
-
addLabelToField
void addLabelToField(String jiraIssueKey, String jiraFieldName, String fieldContent) throws net.rcarz.jiraclient.JiraException
Adds a label to a ticket's field of the label type.- Parameters:
jiraIssueKey-jiraFieldName-fieldContent-- Throws:
net.rcarz.jiraclient.JiraException- if issue cannot be accessed or field cannot be accessed or updated
-
addFixVersion
void addFixVersion(String jiraIssueKey, String newFixVersion) throws net.rcarz.jiraclient.JiraException
Add a Fix Version to a field, if it doesn't already exist.- Parameters:
jiraIssueKey-newFixVersion-- Throws:
net.rcarz.jiraclient.JiraException- if the fix version or issue does not exist, or if there was a problem getting the issue
-
getJiraFields
Map<String,String> getJiraFields(String issueKey) throws net.rcarz.jiraclient.JiraException
Get a map of fieldIds to fieldName for the given issue key- Parameters:
issueKey-- Returns:
- a map of fieldIds to their fieldNames
- Throws:
net.rcarz.jiraclient.JiraException
-
-