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
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Heya, Hipchat friends! We’re so happy you’re checking out Stride. Whether you know it or not, you have been instrumental in making Stride come to life. Every feature, design, and functionality...
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