I have a Jira automation that has quite a few else's within an If/Else block. Occasionally there's a field that doesn't get populated so one of the calculations within it throws an error. I'd like to wrap the entire existing If/Else under a new If/Else that has a check for the value being missing:
IF <value> not empty, THEN <all existing code> ELSE <do something else>
I can add the new If/Else, but when I try to drag the existing If/Else block under the new one, it won't let me. I can drag and drop each individual Then block, but would need to recreate all the If logic through copy/paste plus individually drag all the actions under the right Else/If section. Pain in the behind!
Is there a way to add the new If/Else block and move all the existing logic under it without recreating it?
Alternatively if there's a way to exit the automation under a condition (IF <value> is empty then exit) that would work, but not ideal.
Hello @Steve Ungar
In Jira Cloud nesting an If under an If is not supported. I suspect it is not supported in Automation for Jira Server/DC either.
You could add a Issue Field Condition to check if the field is empty before starting your If/Else-if section.
Or you could make the first IF checking to see that the field is not empty.
Or you could add a second condition to each If/Else-if component to verify that the field is not empty.
I want to avoid the last option because of the number of Elses that would need to be changed. Maintenance nightmare!
I tried to add a first IF to check if the field is empty but had the same issue - I couldn't get all the other logic to switch to move under the new Else that would be created. But I guess rebuilding the first IF statement as an Else-If isn't too bad. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Steve Ungar ,
We are in Need of If/Else block - same thing as below flow.
If
then
else if
then
else if
then
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same question. I have a complicated nested IF. But now I need to insert 1 IF in the middele of the nested IF's. But I can not find how to do it.
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.