How to get the versions List of a project

Dan27
Contributor
July 5, 2018

Hello,

I would like to get all versions of one JIRA project in a list.

How can I do it ?

 

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
July 5, 2018

Hello,

You should use

import com.atlassian.jira.component.ComponentAccessor

def project = ComponentAccessor.getProjectManager().getProjectByCurrentKey("projectkey")
def versions = ComponentAccessor.getVersionManager().getAllVersionsForProjects([project], true)
Dan27
Contributor
July 5, 2018

Thanks !!!!

Alexey Matveev
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.
July 5, 2018

You are welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events