Hi,
I want to know how can I find all archived issues for a given project using scriptrunner.
Hi Jakub,
Here is how you can do it from a Script Console:
Here's an example:
import com.atlassian.jira.component.ComponentAccessor
def projectManager = ComponentAccessor.getProjectManager()
def issueManager = ComponentAccessor.getIssueManager()
def project = projectManager.getProjectByCurrentKey('TEST')
def issueIds = issueManager.getIssueIdsForProject(project.id)
def issues = issueManager.getIssueObjects(issueIds)
def archivedIssues = issues.findAll { it.isArchived() }
I hope this helps!
Cheers,
Helmy
Yes, that's exactly what i was looking for, thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.