Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add issues to Epic using jira-rest-java-client-api

Raghu Prathap
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 15, 2019

 

IssueInputBuilder iib = new IssueInputBuilder();

iib.setProjectKey(ticket.getProjectKey());
iib.setSummary(ticket.getSummary());
Iterator<IssueType> issueTypes = restClient.getMetadataClient().getIssueTypes().get().iterator();
IssueType issueTypeTosend = null;
while (issueTypes.hasNext()) {
IssueType issueType = issueTypes.next();
if (issueType.getName().equalsIgnoreCase(ticket.getIssueType())) {
issueTypeTosend = issueType;
}
}
iib.setIssueType(issueTypeTosend);
iib.setDescription(ticket.getDescription());


IssueInput issue = iib.build();
issueObj = issueClient.createIssue(issue).claim();

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events