Hi everyone,
I'm working on a script to fetch custom fields in a project, and I started to do this by fetching the Issue Type Screen Scheme first, when I noticed that the Issue Type Screen Scheme Manager class returned some Screen Schemes that are not assigned to the project at all.
Below is a code snip that represents the situation clearly:
My Code:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.Project
import groovy.xml.MarkupBuilder
def projectManager = ComponentAccessor.projectManager
def issueTypeScreenSchemeManager = ComponentAccessor.getIssueTypeScreenSchemeManager()
def writer = new StringWriter()
def markup = new MarkupBuilder(writer)
def baseProject = Projects.getByKey("C2C")
def sourceIssueTypeScreenScheme = issueTypeScreenSchemeManager.getIssueTypeScreenScheme(baseProject)
markup.h1(sourceIssueTypeScreenScheme.getName())
sourceIssueTypeScreenScheme.getEntities().each {
def sourceScreenScheme = it.getFieldScreenScheme()
markup.p("-- sourceScreenScheme: ${sourceScreenScheme.getName()}")
}
writer.toString()
The screenshot does not show the actual issue type screen scheme but lists only the screen schemes for the issue types that are configured in your specific project.
So, the issue type screen scheme includes more screen schemes for some issue types (probably some Xray testing issue types), that are not shown in the project configuration, since the issue types are not active in that project.
To check the "real" configuration of your issue type screen scheme go to the global administration:
cog icon -> Issues -> Issue Type Screen Schemes -> '[SP] Standard Issue Type Screen Scheme 1.0' -> Configure
Best,
Ramin
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.