You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.