Transition Condition Script Returns false but Transition is Still Available

I added a condition to a transition using the custom script condition option [ScriptRunner], but the transition is still available on the issue screen. I simplified the script to just “return false” to make sure but the transition still shows up. What could be causing this problem?

Well, there is a few things that can happen.

  • The workflow you are updating is incorrect, and the issue is using another workflow.
  • You are not publishing the changes, and are in draft, which means those changes are not being executed.
  • The transition could have more than one path to get to the same status, and this could lead to even when one condition is working fine, another transition leading you to the same status.

Let me know if some of those things help, and if not, please try to share how you have configured your condition and the workflow configuration to try to solve the problem.
Thanks, Ivan.

Thanks for the reply Ivan! I double check all of those possibilities. I made sure the workflow was the one the issue is using, to publish the workflow after every change, and that there was only one path to that status, but the problem persists.

This is how I set the condition: I clicked on “Add Condition” on the transition, selected Custom script condition [ScriptRunner], my script is one line “return false” but the issue is still available.

I also tried this is a different project with a different issue type just to make sure, but the transition also shows on the issue screen.


This is very strange. If instead of selecting “Custom script condition [ScriptRunner]”, I select “Simple scripted condition [ScriptRunner]”, the same script works as it should.

Hi, I think your problem was the following.
The custom script condition is quite different, you should set the passesCondition variable in the end to make the validation work

1 Like

Thank you Ivan! That explains it. I missed that part.