Script Runner - Script failed : Linked issue require on create issue transition

tushargohel_crest December 7, 2018

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
}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events