Simple scripted validator for inward link


using JIRA 6.3.13 and Scriptrunner 3.1.4 I'd like to add a simple scripted validator doing the following:

If there are incoming links of linktype "Teilprojekt" the linked issue(s) must NOT be "Open" for carrying out the transition. Link discription for incoming link is "is Teilprojekt of".

Very important: the validator should only check incomming, but not outgoing links.


Thank you!

1 answer

0 vote
Jenna Davis Community Champion Sep 08, 2017


I think that something like this will work for you:

import com.atlassian.jira.component.ComponentAccessor

def issueLinkManager = ComponentAccessor.issueLinkManager
def inwardLinks = issueLinkManager.getInwardLinks(

inwardLinks.each {
if ( == "Teilprojekt") {
if ((it.sourceObject.status as String) == 'Open') {
return false
else return true

I did not test out the code directly, but I believe it should work. If something isn't working out please do not hestitate to come back and ask. :)


Hi Jenna,

thank you very much for looking into this one. But I am sorry. It is not working. The transition is not blocked.

Jenna Davis Community Champion Sep 20, 2017

Sorry for my belated reply!

Were you able to get this to work? If not, do you see any errors?

Regards, Jenna

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

168 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you