Created
November 22, 2023 10:34
-
-
Save vikrantyadav11/53d9830f16ff89b29087184dc313324a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.adaptavist.hapi.jira.issues.Issues | |
import com.onresolve.jira.groovy.user.FieldBehaviours | |
import groovy.transform.BaseScript | |
@BaseScript FieldBehaviours behaviours | |
def linkedIssues = getFieldById('issuelinks-issues') | |
def linkedIssuesValue = linkedIssues.value as List<String> | |
linkedIssues.clearError() | |
linkedIssuesValue.each { | |
def issue = Issues.getByKey(it) | |
if (issue.issueType.name != 'Story') { | |
linkedIssues.error = 'Only Story Types Are Allowed' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment