Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the list of all issues in this particular project using Groovy?

miller j
Contributor
February 21, 2018

Hello,

The below code gets the project, I need a way to list all the issues in the project

import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.ComponentManager


def projectManager = ComponentAccessor.getProjectManager()

def project=projectManager.getProjectObject(projectId)


 

Thanks a mil.

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
7 votes
Answer accepted
Ivan Tovbin
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.
February 21, 2018

You can do it like so:

def issueMgr = ComponentAccessor.getIssueManager()


def issues = issueMgr.getIssueObjects(issueMgr.getIssueIdsForProject(projectId))

This will return an Array List of all issues in a project with the given 'projectId' 

TAGS
AUG Leaders

Atlassian Community Events