Hello Everyone,
I would like to know, how to identify Xray is enabled for specific jira Project through script runner or Rest API, or any other ways to find it programatically.
Thanks and Regards,
Jyoti
A project using Xray is the porject that have the Xray issue type available. You can find them using the following script.
import com.atlassian.jira.component.ComponentAccessor
def projectManager = ComponentAccessor.projectManager
def issueTypeManager = ComponentAccessor.getIssueTypeSchemeManager()
// Define the issue type name you want to search for
def targetIssueTypeName = ["Test", "Test Set", "Test Plan", "Test Execution"]
// Get all projects
def allProjects = projectManager.getProjectObjects()
List<String> xrayProject = new ArrayList<String>()
// Iterate through each project
allProjects.each { project ->
// Get issue types for the project
def issueTypesForProject = issueTypeManager.getIssueTypesForProject(project)
// Check if the target issue type exists in the project
if (issueTypesForProject.find { it.name in targetIssueTypeName }) {
xrayProject.add(project.key)
}
}
return xrayProject
Regards
Hello @Florian Bonniec
These approach will not work for my scenario, as issue type is showing to the projects in which Xray is disabled, because all these project area is using same Issue type scheme.Kindly guide me ,how these can be achievable.Manually we are able to identify it from Project's setting Action Menu options.
Thanks and Regards,
Jyoti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh you not looking to project that have Xray features but Projects that are configured as Requirement projects with the Xray Requirement Coverage right ?
You want to find project listed in this config page ?
/secure/admin/views/XrayRequirementProjectsConfiguration.jspa
You can use the following endpoint
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.