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:
This is the expected behavior.
Sometimes we get this when I believe it should be sending.
Is there a way to find out why this is failing and make appropriate modifications?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All correct, but the converted time of 1am falls between the If:all match conditions of after 5pm and before 8am, right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.