Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script runner condition help linked issue

Jenifer Kuntz
Contributor
April 1, 2019

I need my condition to pass based on the issue type and there is no linked issue.

I can enforce the link type to be Relates but if there is a way to do any link type that would be preferred.

This is what I have - 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager

def issueLinkManager = ComponentAccessor.getComponent(IssueLinkManager)

! issueLinkManager.getInwardLinks(issue.getId()).any {
it.issueLinkType.name == "relates to"
} ||
issue.issueType.name == 'Dev Ops'

 

When I test by creating a linked issue with issue type Dev Ops it passes.

I tried bith outward and inward and relates to and relates and none of them have worked.

Any help would be appreciated!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events