import com.atlassian.jira.component.ComponentAccessor def projectManager = ComponentAccessor.getProjectManager() def userManager = ComponentAccessor.getUserManager() def projects = projectManager.getProjectObjects() log.info("Number of projects: ${projects.size()}") projects.each { project -> def projectLead = project.getProjectLead() log.info("Project Key: ${project.getKey()}, Project Name: ${project.getName()}, Project Lead: ${projectLead?.getDisplayName() ?: 'No Lead Assigned'}") }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter