I have added a validator to Crete Issue Transition that if Issue type is test and there is at least one issue linked.
But this script failed while I clone issue.
import com.atlassian.jira.issue.fields.IssueLinksSystemField
import com.atlassian.jira.component.ComponentAccessor
def fieldManager = ComponentAccessor.getFieldManager()
def linksSystemField = fieldManager.getField("issuelinks") as IssueLinksSystemField
import webwork.action.ActionContext
def request = ActionContext.getRequest()
def params = request.getParameterMap()
def issueLinkingValue = linksSystemField.getRelevantParams(params) as IssueLinksSystemField.IssueLinkingValue
if (issue.issueType.name == "Test") {
issueLinkingValue.linkedIssues.size() > 0
}
else {
true
}
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.