Created
March 26, 2014 16:59
-
-
Save jechlin/9788064 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples.docs | |
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 | |
@WithPlugin("com.pyxis.greenhopper.jira") | |
@JiraAgileBean | |
GreenHopper greenHopper | |
def grantedProjects = greenHopper.getGHConfiguration().getGrantedProjects() | |
def projectManager = ComponentAccessor.getProjectManager() | |
if (grantedProjects.isEmpty()) { | |
log.info ("All projects enabled") | |
} | |
else { | |
log.info("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