Skip to content

Instantly share code, notes, and snippets.

Created March 26, 2014 16:59
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jechlin/9788064 to your computer and use it in GitHub Desktop.
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.JiraAgileBean
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.pyxis.greenhopper.GreenHopper
GreenHopper greenHopper
def grantedProjects = greenHopper.getGHConfiguration().getGrantedProjects()
def projectManager = ComponentAccessor.getProjectManager()
if (grantedProjects.isEmpty()) { ("All projects enabled")
else {"The following projects are enabled: " + grantedProjects.collect {projectManager.getProjectObj(it).name})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment