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
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
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