Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation Rules with Two Branches Not Working As Expected.

Nicole Gosling March 19, 2025

Hi.  I am trying to modify an existing automation rule (AR) that has been working since it was created three years ago.  

This scheduled automation rule is runs every one hour and retrieve records where the "issue type equals Epic and project equals CC and status equals Invoicing and Approvals."

If all of the stories linked to the Epic are in "Done" or "Completed" status, the Epic transitions from "Invoicing and Approvals" to "Construction and Commissioning" status. 

Current AR Setup.png

 

 

I need to add a new condition to this rule that checks if the Operations Contact field is empty.  If it is not, the Epic transitions from "Invoicing and Approvals" to "Construction and Commissioning" status, just like the current AR does.  However, if the Operations Contact field on the EPIC is empty, then the Epic status doesn't change and an email is set to a group mailbox to populated the Operations Contact field.

I have read multiple knowledge articles, Atlassian documentation, but I can't find an resolution to my issue.

I made the following AR configurations but can't seem to get them to work properly.

1) If/Else - it would send email for Epics where the "Operations Contact" field was populated. I read the If/Else functionality can be tricky so I tried simpler approach (#2)

New AR_ElseIf Setup.png

 

2) Multiple Branches - in addition to the conditions in the current automation rule, I add a check for the Operations Contact.  This one was looking promising however when I was digging into the audit logs I noticed that an email was sent for an Epic that had open stories and no operations contact.  Because I used "And" and not "Or" I would have expected the Epic to not pass the first condition in the second branch and do nothing.

Any help you can offer is greatly appreciated.

 

Thanks,

Nicole

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2025

Hi @Nicole Gosling 

I would expect the updated rule you show with the If / Else block to work for this scenario, although the branch on current issue is not needed...and neither is the condition on the Else: you could just assume the field is empty.

Without changing anything, would you please post an image showing the audit log details for the rule execution which did not work as you expect?  That may provide some context to help explain the symptom.

 

Regarding multiple branches, I would not try that for your scenario.  Such branches execute in parallel and so it will be difficult to diagnose what is happening for any timing-related problems.

 

Kind regards,
Bill

Nicole Gosling March 19, 2025

@Bill SheboyThank you for your prompt response. I reviewed the automation rule using the If/Else functionality again, and it appears to be functioning correctly.

We use an API to import data from a another system ("Source System") every 15 minutes, including the Operations Contact. I believe my user received multiple emails for the same Epic because although she entered the operations contact in the source system, the API didn't update in the Jira Epic. I have created a ticket for our AMS team to investigate potential errors in the API.

I'm curious why the branch and ELSE condition are not necessary. We need to ensure that the child tickets are in Done or Complete status and that the operations contact field is populated before the Epic can transition to Construction and Commissioning status. Is there a simpler way to achieve this?

Thanks Nicole

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2025

I am glad to learn the rule is working for you!

 

Regarding my other suggestions...

Once the rule is inside that first if / else block, the branch on current issue is not needed because the rule is already acting on the current issue.  The conditions on Area Crew and related issues will work without it.  The key is being inside the branch, and not adding to the conditions of the if / else block.

For the Else...the first condition tested "if Operations Contact is not empty".  And so the else to that would be "empty" and testing that is not needed.

Neither of those impact your rule behavior, and so definitely leave them as-is if it makes it more clear to you and your team.

Suggest an answer

Log in or Sign up to answer