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
Community Members
Community Events
Community Groups

How to use the Groovy Script Runner to list Agile Projects


I need to list all projects using Agile plugin ( the final goal is to list Agile users)

I guess the method GHConfiguration.getGrantedProjects (from com.pyxis.greenhopper.jira.configurations) provides this list but I can't find a way to get the instance of GHConfiguration.

any help will be welcome :)

(environment : JIRA 5.1.8 / Agile 6.3.1)

thanks in advance.



1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
JamieA Rising Star Jan 28, 2014

This should work... but it's not a stable API so may break at some point:

(Hack mode on)

import com.atlassian.jira.component.ComponentAccessor

def ghPlugin = ComponentAccessor.getPluginAccessor().getEnabledPlugin("com.pyxis.greenhopper.jira")
def descriptor = ghPlugin.getModuleDescriptor("greenhopper-launcher")
def applicationContext = descriptor.getModule().greenHopperCacheManager.applicationContext
def bridgeServiceLocator = applicationContext.getBean("bridgeServiceLocator")
def greenhopper = bridgeServiceLocator.getInstance().getGreenHopper()

greenhopper.getGHConfiguration().getGrantedProjects() // returns list of pids

it's works fine, thanks alot for this quick and plain answer Jamie :)

if someone has the same need as me (list project roles actors for each Agile project), the final script is available on Github:<br< a="">>

JamieA Rising Star Jan 30, 2014

+1... but maybe next time try a MarkupBuilder ;-)

hey hi Jamie... can you please help me out with the java api to do the same ??

These gist's are not available any more, I wanted to find a way to get the number of swimlanes+colours configured in kanban boards and these can cause slowness in boards and can cause so much load that the system is brought down


Atlassian Community Events