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

Automation Rules for the weekend

Leigh Bartlett January 6, 2020

Good Afternoon, 

Happy New Year!

I'm looking to set up some automation rules within Jira Service to ONLY notify certain users of ticket raised when they occur after 5:30pm Monday to Friday, before 09:00am Monday to Friday, and then 24h on a weekend/bank holiday.

I have this for evening: 

created > startOfDay(17h) OR created >= startOfDay() AND created < startOfDay(9h) AND priority = P1 OR priority = Highest

But I'm not sure how to specify a weekend?

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 7, 2020

Hi @Leigh Bartlett ,

Currently there is not a native function directly to isolate working and non working days, so first off please make sure to add your vote to the following feature request to add in a native working hour and non-working hour filter avaliable for Jira Server and Cloud respectively:

There is a really good EXE in the comments of the Feature request mentioned by another user where they are using changed after in conjunction with a endOfWeek option  instead of the startOfDay/endOfDay to simplify this one a bit, try using the following and let :

status CHANGED AFTER -1d OR ( status CHANGED DURING (-3d, endOfWeek(-1w) ) )

I was also playing around with this a bit using similar to what you were already testing against, using a combination of a the startOfWeek / endOfWeek options in conjunction with created date to isolate it with a modifier on the created timestamp, and the following seems to work pretty well to isolate the weekend:

(createdDate > startofWeek(-30h) AND createdDate < startofWeek(1d) OR createdDate > endOfWeek(-30h) AND createdDate < endOfWeek(1d))

Regards,
Earl

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events