Can we create jira issues using JRJC API ? If yes, how do we create it?


3 answers

1 accepted

1 vote
Answer accepted

you can try with this code

/populate issue fields
com.atlassian.jira.rest.client.domain.input.IssueInputBuilder issueBuilder = new IssueInputBuilder("ProjectKey", "IssueType");
issueBuilder.setDescription("issue description");
issueBuilder.setSummary("issue summary");

//create the client
BasicHttpAuthenticationHandler myAuthenticationHandler = new BasicHttpAuthenticationHandler("jira.username", "jira.password");
JerseyJiraRestClientFactory factory = new JerseyJiraRestClientFactory();
URI jiraServerUri = new URI("http//jira.yourdomain.com");
JiraRestClient restClient = factory.create(jiraServerUri, myAuthenticationHandler);

//create the issue
NullProgressMonitor pm = new NullProgressMonitor();
com.atlassian.jira.rest.client.domain.input.IssueInput issueInput = issueBuilder.build();
BasicIssue bIssue = restClient.getIssueClient().createIssue(issueInput, pm);

//get the newly created issue
com.atlassian.jira.rest.client.domain.Issue jIssue = restClient.getIssueClient().getIssue(bIssue.getKey(), pm);

check this for your refernce


another sample code can get here


Thankyou very much Prasad. I have seen this code earlier,i'm using this in my maven project but unable to get NullProgressMonitor class, my version is j-r-j-c 2.0.0-m2 . Can you please provide me pom.xml ?


Thanks prasad done with my task i have seen jrjc tutorial (second one).

don't forget to accept as answer if something helped here so other people can choose right answer!!

i got mail syaing this question has answered but here it not showing :(

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in United States

From Atlassian: Confluence Security Advisory - 2019-03-20

Atlassian released a security advisory on 3/20/2019.  The full advisory is here:  https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html In a nutshe...

22 views 0 1
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you