Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,245
Community Members
 
Community Events
168
Community Groups

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

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

6 votes
Answer accepted

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' 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events