Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

In C#, how do I get a list of all of the Issues in a given version?

Mark H April 20, 2016

I've been trying to find the clean way to get all of the Issues in a given version from a C# utility we have. I've tried using the Atlassian SDK, as well as the REST API directly. The only successful way I have found, is to get every Issue in a project, then filter it on the client for the version. This is very inefficient. It seems like there should be a way to get only the issues in a given version through the API. 

The REST API, documented here, https://docs.atlassian.com/jira/REST/latest/#api/2/version, lists many options for the version related calls. There is an option "GET /rest/api/2/version/{id}/relatedIssueCounts" described as "get version releated issues. Alas, it only seems to yield counts (statistical information). I don't get the Issue IDs, just the number of Issues. 

I have also tried using jql. I have tried the following, along with many permutations:


curl -D- -u username:passwd -X GET -H "Content-Type: application/json" http://jira/rest/api/2/search?jql=fixVersions=10704

note: not C#, but I am using curl to find the right URL.

With the above, I get the following error:
{"errorMessages":["Field 'fixVersions' does not exist or you do not have permission to view it."],"errors":{}} 

 

What is the right way to do this? Again, I don't want to pull down every single issue in the project, and then filter locally. This makes the calling program too slow. There has got to be an easier way. 



 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Vasiliy Zverev
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.
April 29, 2016

There is not such field fixVersions, only fixVersion.

change jql=fixVersions=10704 to jql=fixVersion=10704

TAGS
AUG Leaders

Atlassian Community Events