Hi
I'm trying to create Script Condition. I have several fields (x, y, z,) and I need the transition to be available at certain values.
x == null and y == 1 and z == 1.
Hi Marat,
If you are using Scriptrunner you can add a validator in your transition.
As far as I know there aren't any native features that allow field checks before transitioning.
Sounds like you should be able to use the "Simple Scripted Condition" offered by Scriptrunner. If x, y, and z are system fields, then you should be able to do something like
issue.x == null && issue.y == 1 && issue.z == 1
or, if they're custom fields,
cfValues['x'] == null && cfValues['y'] == 1 && cfValues['z'] == 1
Hi Payne SealI will add a little condition. For example, I have custom fields x, y, z. If the x field is empty, then the transition is available. But if the field x is empty and the fields y, z are not empty, then the transition is not available.Can you help me?
I need something like this
if cfValues['y'] == 1 && cfValues['z'] == 1 { passesCondition = false}passesCondition = cfValues['x'] is empty
Sounds like they all need to be empty for the transition to be available, in which case you can use:
cfValues['x'] == null && cfValues['y'] == null && cfValues['z'] == null
It looks like you're new here. Sign in or register to get started.