How to efficiently retrieve released fix versions for a specific project ID in JIRA?

abhishek_y October 17, 2024

I'm currently using the JIRA API with JQL to obtain the released fix versions for a given project ID. However, this approach is time-consuming as it returns the entire document, and I need to filter out only the fix version names.

Is there a more efficient method to directly retrieve the list of released fix versions for a project?I'm interested in exploring alternatives that can improve performance and reduce the amount of unnecessary data returned.

 

6 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
3 votes
Answer accepted
Matthias Gaiser _K15t_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2024

Hi @abhishek_y

I think you're almost there with the call you're using. If you modify it a little and add the fields  query parameter with the value of fixVersions, you get a list of issues with only the fixVersion field (and some central ones like issue id and key):

https://yourdomain.atlassian.net/rest/api/2/search?jql=project%3D%22ProjectName%22%20AND%20fixVersion%20in%20releasedVersions%28%29&fields=fixVersions

You can find more details in the REST API documentation. Here's also an example query on Atlassian's public issue tracker.

Cheers,
Matthias.

abhishek_y October 17, 2024

Hi @Matthias Gaiser _K15t_ this reduces the time to almost one third just found this solution this morning, but still thank you for your help.
But is there any other way in which we don't have to use JQL query maybe it'll make the response time lower?

1 vote
Michael Mohr
Contributor
October 17, 2024

You can use paginated https://docs.atlassian.com/software/jira/docs/api/REST/9.12.7/#api/2/project-getProjectVersionsPaginated or unpaginated https://docs.atlassian.com/software/jira/docs/api/REST/9.12.7/#api/2/project-getProjectVersions REST Api call to get all versions of a project. You can then loop of the returned versions and filter out the release ones.

Hope this helps.

0 votes
Petru Simion _Simitech Ltd__
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.
November 4, 2024

Our company developed CIFJ - Versions Dashboard for Jira, which allows you to search versions across your organisation.

https://marketplace.atlassian.com/apps/1235582/cifj-versions-dashboard?hosting=cloud&tab=overview

You can filter by Project and other criteria, including Released.

You can visualize the result in a table or export to CSV.

0 votes
TG Link Hub October 24, 2024

 To efficiently retrieve released fix versions for a specific project ID in JIRA, use JIRA Query Language (JQL) to filter issues by the project and released versions. You can also access the project’s "Releases" section, which provides a list of all released fix versions directly. Additionally, consider using the JIRA REST API for programmatic access to version data if automation is needed. These methods will help you quickly find the relevant information.

0 votes
Henri Seymour _Easy Agile_
Atlassian Partner
October 20, 2024

@Hi @abhishek_y 

Are you looking to get issues in released versions or just the list of versions? 

If you only want the versions, the API /project/{projectIdOrKey}/version accepts a query param status=released. 

Henri, Support Engineer @ Easy Agile 

0 votes
Vishal Biyani
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.
October 17, 2024

@abhishek_y 

are you using below end point or any other end point in conjunction with this call like (relatedIssueCounts)?


"https://your-domain.atlassian.net/rest/api/3/project/{projectIdOrKey}/versions"

TAGS
AUG Leaders

Atlassian Community Events