Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

How to bulk get the versions of all projects?

xinan liu
Contributor
September 27, 2015

As the title says. I want to get all versions of all projects in JIRA.

How can I do that?

Thanks very much!

4 answers

1 vote
Bob Swift
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.
September 28, 2015

Use JIRA Command Line Interface (CLI) and get a CSV file with them all listed:

--action runFromProjectList --common "--action getVersionList --project @project@ --file versionList.csv --append --outputFormat 999"
1 vote
AndrewB
Contributor
September 28, 2015

Using the rest API this is your best bet:

 

Use /rest/api/2/project to get all accessible projects.

 

Extract the project keys, and loop over every project key.

 

Use /rest/api/2/project/{projectIdOrKey}/versions to get all versions for a specific project.

 

Accumulate all of the results.

1 vote
Jonas Andersson
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.
September 27, 2015

This is another thing that is a lot easier to do via mysql (if you have access to the database):

mysql> select DISTINCT vname from projectversion;

+----------------------------------------------------------------------------+

| vname                                                                      |

+----------------------------------------------------------------------------+

| Release 1.0.2                                                              |

| Release 1.0.3                                                              |

...

...

(JIRA 6.2.1)

 

1 vote
Taha Khanzada
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.
September 27, 2015

Hi Xinan,

You can use REST API to get list of all versions in the projects

/rest/api/2/project/{projectIdOrKey}/versions

For more info you can refer - https://docs.atlassian.com/jira/REST/latest/#d2e2079

Taha

 

xinan liu
Contributor
September 27, 2015

Thanks! But can I get all projects' verions in one time instead of get one project's versions in one time?

Suggest an answer

Log in or Sign up to answer