Forums

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

How to find list of Archived projects in Jira using Groovy script?

Navesh August 18, 2020

I want to retrieve list of Archived projects in Jira using Groovy script. Can anyone help me out on this?

1 answer

1 accepted

1 vote
Answer accepted
Ravi Sagar _Sparxsys_
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.
August 18, 2020

Hi @Navesh 

Luckily I have a script for that.

import com.atlassian.jira.component.ComponentAccessor
import org.apache.log4j.Level
import org.apache.log4j.Logger


def log = Logger.getLogger("in.ravisagar.sr4j")
log.setLevel(Level.DEBUG)

def projectManager = ComponentAccessor.getProjectManager()

projectManager.getArchivedProjects().each { it ->

log.debug(it.key)
log.debug(it.getIssueTypes()*.name)
log.debug(it.getComponents()*.name)
log.debug(it.getProjectLead()*.username)
log.debug(it.getVersions()*.name)
log.debug(it.getProjectCategoryObject()?.name)

}

I hope it helps.

Ravi 

Navesh August 20, 2020

Thanks Ravi for the script, it helps.

Like Ravi Sagar _Sparxsys_ likes this
Navesh August 20, 2020

Hi @Ravi Sagar _Sparxsys_ , is there a way to get last issue update in all projects?

Deleted user October 21, 2021

Hi @Ravi Sagar _Sparxsys_ ,

from where can csv be extracted?

Like Parviz Tafreshian likes this
Rechu Derick October 28, 2021

Hi @Ravi Sagar _Sparxsys_ 

 

Iam able to fetch list of archived projects.but I need a script to list all archived issues. Is that possible?

Suggest an answer

Log in or Sign up to answer