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.
I need something like this
if cfValues['y'] == 1 && cfValues['z'] == 1 {
passesCondition = false
}
passesCondition = cfValues['x'] is empty
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Payne Seal
I 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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.