8
votes

I want to be able to get a list of issues given a:

Project Name and Release Version

this seems like a basic JIRA soap API 101 request

It seems, looking at the documentation:

http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/index.html?com/atlassian/jira/rpc/soap/JiraSoapService.html

you can get issues by:

  1. Filter
  2. SearchTerms
  3. SearchTerms and Project

but not the above. Is this a complete oversight or i am missing something

i would expect to see something like this:

RemoteIssue[] issues = _soapService.getIssues(string project_, string version_)

any help?


UPDATE: I see that JIRA 4.0 is out but i can't find any documentation if the API has changed to support this request above. Can anyone find this link to answer that questions.

8

8 Answers

6
votes

It's not possible with the current JIRA API. They probably will make it in JIRA 4.0.

In JIRA Client we solved this problem by requesting IssueNavigator.jspa (Find Issues tab) with search conditions in URL and requesting RSS output; then parsing the RSS.

I've explained some of the intricacies of dealing with JIRA remotely, including searching, in this webinar: http://blogs.atlassian.com/news/2008/11/killer_jira_cli.html

Hope this helps

6
votes

In JIRA 4 you can use the JIRA Query Language with the SOAP method getIssuesFromJqlSearch.

4
votes

Not being able to upgrade to Jira 4 anytime soon and with a similar requirement, I retrieved issues by search term and project, kludging a "search term" that seems to work as a wildcard: "- 0 1 2 3 4 5 6 7 8 9". As all generated Issue keys are of the form XXX-YYY where Y is a digit, that should find all issues, albeit probably not efficiently for big projects. You'd then have to iterate through the result checking version numbers.

Not pretty - and I haven't tested this thoroughly yet - but it seems to work.

Thor

1
votes

It is possible to write a JIRA plug-in to expose the desired methods via SOAP with the RPC Endpoint Plugin Module.

1
votes

I believe you can make a filter which has the traits you want - like project name and release version - then use the soap API to get the list based on that filter, passing it the project name and release version you want. I don't have an example of this off-hand, but I know it is what our app does. The downside is you have to create a filter by hand first, then hard-code its ID somewhere and assume it exists, but if you are willing to be that "ugly". it should work for you.

-Carl

0
votes

There is some comments on the Atlassian JIRA regarding the new methods delivered in JIRA 4.0 http://jira.atlassian.com/browse/JRA-17509

Another issue indicates that the SOAP api is not very high in the priority list. under JRA-7614, and Atlassian is advising to make the modifications yourself.

I also need a more elaborated SOAP API (such as issue linking, ...). Anyone who wants to contribute / help in getting it done, so we can avoid doing 'HTML Screen Scraping' ... (@sereda, thanks for the video btw)

Francis

0
votes

As for the TimeTracking (sorry, wanted to add a comment to seredas answer, but seems I don't have enough reputation)

We have Jira 4.1.2 running and this works (python2.6 using suds):

>>> client.service.getWorklogs(auth,"PROJ-650")
[(RemoteWorklogImpl){
   author = "philipp"
   comment = None
   created = 2010-07-21 12:46:34
   groupLevel = None
   id = "12651"
   roleLevelId = None
   startDate = 2010-07-21 12:46:00
   timeSpent = "10 minutes"
   timeSpentInSeconds = 600
   updateAuthor = "philipp"
   updated = 2010-07-21 12:46:34
 }]
0
votes

While experimenting with different options we found a following solution for getting project tickets out of Jira:

soapService.getIssuesFromJqlSearch(token, jql, pageSize);

where jql is something like this

issueKey > ":keyOfTheLastIssueReceived" and project = ":projectCode" order by issueKey

you need ordering by issueKey because this method returns only "pageSize" of issues and filtering by issueKey to advance to the next "page" (starting right where the previous "page" ended)

I think you will be able to get what you want by adding a fixVersion = ":requiredVersion" to the jql.