Hi All,
I am writing jira event listener in 6.0 and in issueUpdated event I want to connect to another JIRA instance using REST API or (JRJC),
Please let me know starting from scratch (POM.xml dependency to connect JRJC) because many ways I tried and none of them working at runtime (Exception, null pointer exception, failed to load plugin etc...).
Thanks in advance
Regards
Onkar Ahire
Community moderators have prevented the ability to post new answers.
There's two parts to this - the plugin structure and the data connection
First, https://developer.atlassian.com/display/JIRADEV/JIRA+Plugin+Guide is a very good start for writing the listener. If you follow the guides here, you should be able to create a listener that catches the events you need and then puts a simple "hello world, here's the data on the issue that's just changed" message out.
Once you've got that, then you can think about the steps you need to create REST calls from that data. Just because you are making the calls to one Jira from another Jira, doesn't mean you need to do anything different. The target Jira has a REST interface for you to use (see https://developer.atlassian.com/display/JIRADEV/JIRA+REST+APIs ) and it really doesn't care that the system making the calls happens to be another Jira.
Hi Nic,
I have already familier with JIRA development you refering in first steps,
I am getting AsynchronousJiraRestClientFactory class not found exception at issueUpdated event, I tried to add many dependencies related to JRJC succeed compile time at IDE(Eclipse) but fails at runtime, I am using JIRA 6.0
Please let me know where I goes wrong, Is it the right path currently am I?
Here is java code.
public void issueUpdated(IssueEvent event) { super.issueUpdated(event); try { final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory(); URI jiraServerUri = URI.create("http://localhost:8088/jira"); BasicHttpAuthenticationHandler b_auth = new BasicHttpAuthenticationHandler("admin","admin"); final JiraRestClient restClient = factory.create(jiraServerUri, b_auth); Issue issue=restClient.getIssueClient().getIssue("ATN-7").claim(); System.out.println(issue.getSummary()); } catch(Exception e) { e.printStackTrace(); } }
pom.xml dependency for JRJC
<dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-rest-java-client-core</artifactId> <version>2.0.0-m19</version> </dependency>
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.