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
Good morning All, Our goal is to get you into the habit of while enjoying your favorite morning drink you are checking the NOVA "space" for topics and comments. Your input is really needed and...
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!
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