If the project key is known , I want to get all the components associated to this project using groovy.
Just enter your project key instead of "EnterYourProjectKey".
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.bc.project.component.ProjectComponentimport com.atlassian.jira.bc.project.component.ProjectComponentManagerimport com.atlassian.jira.project.ProjectManagerdef projectComponentManager = ComponentAccessor.getComponent(ProjectComponentManager)def projectManager = ComponentAccessor.getComponent(ProjectManager)def project = projectManager.getProjectByCurrentKey("EnterYourProjectKey")long projectId = project.getId()Collection<ProjectComponent> projectComponents = projectComponentManager.findAllForProject(projectId)return projectComponents
Thanks for this one!
Thanks Neta
It looks like you're new here. Sign in or register to get started.