How I can import a query result for a issue about bug using my java application?

Julio Nordael May 20, 2012

I would like use my own java application to perform a searching on jira issue database and collect the returned informations about bugs opened for a especific project and put it into an object like "Issues" or something. I can do such thing? Anyone could help me?

3 answers

1 vote
CEDRIC ZABEL
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2012

Are you going to be searching a remote Jira application? If so, you can use Jira’s remote APIs to do this. https://developer.atlassian.com/display/JIRADEV/JIRA+Remote+API+Reference You could even do it over simple HTTP by getting back your resuts in XML format and parsing that. http://confluence.atlassian.com/display/JIRA/Displaying+Search+Results+in+XML

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2012

As Cedric says, you could use either SOAP or REST to do the same. SOAP has a restriction that it cannot give you the issue links, you need to get it either via REST or use the XML results as explained in Cedric's link above.

Julio Nordael May 23, 2012

Right! Only remarking what I need, I want to construct a java application that checks the issues repository online of Jira with a query, searching for a especific set of issues opened and get this resulting set as a list of issues. I don't want to be forced to download any Jira plugins, but just java classes or packages that enables me to do this. Seems now I left clear what I need.

The REST api will help me in this task? Where I can download the Library?

0 votes
parthiban subramaniam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 23, 2012

Lets start again.

You are building a java app that resides outside of JIRA and needs to talk to JIRA and get a list of issue from a project or multiple project.

To do this you have few choices

1, Talk to JIRA via SOAP

https://developer.atlassian.com/display/JIRADEV/Creating+a+JIRA+SOAP+Client

Above page all the information you need to build a SOAP client for JIRA download the dependency api's where required.

2, REST

https://developer.atlassian.com/display/JIRADEV/JIRA+REST+APIs

Has all the information related to REST api in JIRA

If you are intrested only in querying your JIRA for issues have a look at here

https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Query+issues

No need of any classes to be downloded and added as dependency in your app, all you need is ability to parse and convert JSON strings in to objects.

3, I wont not advice this and your JIRA team might say NO NO for this.

there is nothing in the world stopping you from directly querying the database that JIRA talks to all you need is the connection details ofcourse.

http://confluence.atlassian.com/display/JIRA041/Database+Schema#

has the schema information

have fun coding

Julio Nordael May 27, 2012

I have a doubt: I need be logged on the Jira to talk to it via REST or SOAP or I can do it anonymously? I ask this because I have not a Jira account and I don't want need to do one to my application work.

CEDRIC ZABEL
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2012

That depends on whether the remote Jira application allows anonymous searches. If you need to log in to search with the web interface, you’ll need to log in for REST or SOAP or getting the results in XML format.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2012
Julio Nordael May 21, 2012

So, I need to dowloand the Jira plugin to develop my search engine? I would like avoid to download this plugin and use only the package of classes of Jira. I can't do this?

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2012

The above documentation is for JIRA classes and not for any plugin. Are you looking to write a remote Java app or a JIRA plugin?

Julio Nordael May 21, 2012

I intend to automate part of my application so I am looking to write a remote Java application using the classes of Jira to create my search engine. Does not interest to me download the Jira application for this purpose, because the search will be always the same.

Suggest an answer

Log in or Sign up to answer