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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

5 votes
Answer accepted
Ivan Tovbin Community Leader Feb 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' 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Statuspage

New feature: Slack notifications for Statuspage

We're excited to announce the release of a long-requested feature on Statuspage. Now visitors to your status page can subscribe to get notified in Slack when you report an incident or maintenance. Th...

51 views 0 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you