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.
Community moderators have prevented the ability to post new answers.
There is not such field fixVersions, only fixVersion.
change jql=fixVersions=10704 to jql=fixVersion=10704
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.