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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to use the Groovy Script Runner to list Agile Projects

Hello,

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.

Regards

Elie

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
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.
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:

https://gist.github.com/ElieMalesys/8711402<br< a="">>

JamieA
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.
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

TAGS
AUG Leaders

Atlassian Community Events