Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation fails sometimes

Philip Shramko May 2, 2025

I have a rule that generally runs properly but sometimes fails.  

The rule basically sends an email to off-site techs if a work item is created between 8am and 5pm EST.

This is the rule:

Rule.png

This is the expected behavior.

passed.png

Sometimes we get this when I believe it should be sending.

failed.png

Is there a way to find out why this is failing and make appropriate modifications?  

2 answers

1 accepted

4 votes
Answer accepted
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.
May 2, 2025

Hi @Philip Shramko 

The Work Item Created trigger (formerly called "issue created") can fire so quickly that some data may not be available to the rule yet.  Indeed, the work item may be in an unstable / poorly defined state.  This can cause conditions to not match and intermittent / puzzling rule errors.

The mitigation is to always add the Re-fetch Work Item action immediately after the Work Item Created trigger.  This will slow the rule a bit, reloading the data before the steps proceed.  Please try adding that action and re-testing to observe the impact.

Kind regards,
Bill

Philip Shramko May 2, 2025

Great tip. adding that now :)

1 vote
Marc - Devoteam
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.
May 2, 2025

Hi @Philip Shramko 

So the work item doesn't match the conditions set on the automation rule in the If: all match

Looking at the conditions, you convert the created time stamps in the condition, so it can be based on the original created tie that based on the conversion one or both conditions fail.

I mean an issue is created at time X, if you convert this tom time zone America/New York, but if this is before or after 5pm or 8 pm New York time the condition fails.

 

 

Philip Shramko May 2, 2025

All correct, but the converted time of 1am falls between the If:all match conditions of after 5pm and before 8am, right? 

Marc - Devoteam
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.
May 2, 2025

Hi @Philip Shramko 

Depends on which time zone is used in JIra?

01:00AM UTC converts to New York 09:00PM

So this is greater then 05:00PM, but greater then 08:00AM, so this will fail the condition.

Philip Shramko May 2, 2025

The ticket creation time from the API shows as created "2025-05-02T01:02:44.725-0400" and the default time zone for the Jira instance is set to (GMT-05:00)New York

 

Also, the rule conditions are greater than 5pm and less than 8am so even if it took it as 1am UTC and converted that to 9pm New York time it should still satisfy the defined condition. 

 

What really confuses me is that a ticket entered at 7am does not fail the conditions.

Philip Shramko May 2, 2025

I see what is happening now...  Thanks for the nudge. :)

Philip Shramko May 2, 2025

Instead of using a text value for the time to compare agains, I changed it to this for better reliability as noted here (Solved: Create After Hours Ticket Creation Notification)

{{issue.created.convertToTimeZone("America/New_York").withHour(17).withMinute(0)}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events