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
https://ecosystem.atlassian.net/wiki/display/JRJC/Tutorial
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i got mail syaing this question has answered but here it not showing :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
don't forget to accept as answer if something helped here so other people can choose right answer!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.