Scriptrunner Workflow condition is not hiding the transition in issues when it computes to false


I have a condition I wrote to hide a transition unless there is an issue with the type "Problem" linked to the current issue. When I test the code in ScriptRunners code console against different issues it results in True and False as would be expected for the test issues. The problem is when I put in in the workflow on the transitions condition tab the transition never gets hid. I write to the log the result of the condition and can see the false result, but the transition is still available. Thoughts on what I am missing/not understanding causing the transition to still show even when the below code results in False?


import com.atlassian.jira.component.ComponentAccessor

Boolean passesCondition = false
def type =[]

def linkMgr = ComponentAccessor.getIssueLinkManager()

for (IssueLink link in linkMgr.getOutwardLinks( {
for (IssueLink link in linkMgr.getInwardLinks( {

for (item in type) {
    if(item == "Problem"){
        passesCondition  = true
log.warn (passesCondition)


1 answer

This widget could not be displayed.

Quick easy fix from closer reading of the examples.


I am declaring passesCondition as a Boolean in my code. It's a special variable in scriptrunner apparently and does not need to be declared. I removed the deceleration and all started working.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

28 views 0 1
Join discussion

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