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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation based on day of week

Our business needs to push newly created support cases into sprints, so that they can be incorporated into overall sprint views of the work to be done. Our sprints run from Monday to Sunday.

Setting up the base automation is straight forward, but for cases that are submitted on Friday, Saturday and Sunday, the cases need to be added to the next sprint, not the current sprint. I have implemented a condition as follows:

{{issue.created.withDayOfWeekShortName}} = FRI OR {{issue.created.withDayOfWeekName}} = SATURDAY OR {{issue.created.withDayOfWeek}} = 1

Screenshot 2021-02-24 at 11.08.27.png

I have used the three different DayOfWeek variants in trying to test them. None of them seem to work. I have also tested the texts with "FRI" and "Saturday", but they did not work either. 

I have consulted the following pages for guidance in the documentation: 

Any help would be greatly appreciated. 

1 answer

1 accepted

3 votes
Answer accepted

Hi @Ross Musselman, you cannot do comparisons in JQL like that as JQL only works on issue fields, not extracts of fields.

Also, the .withDayOfWeek functions are used for setting that portion of the date to a new value. They do not return the portion of the date.

What you need is the Advanced compare condition where you can use the date formatting function to extract the date field you need and compare it with a regular expression.

The following example will match issues created on either Friday, Saturday or Sunday respectively:

Screenshot 2021-02-24 at 09.31.42.png

Thank you, @Gareth Cantrell . That fix worked perfectly!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Automation

New to Jira Automation - goodbye Cron (sort of), hello new project created trigger, new additions to

Hey Everyone! Simeon from the Automation team here. I'm delighted to share some new features and improvements that we are shipping to Jira automation (Cloud only). Firstly, @Sam Harding&nbsp...

2,823 views 10 23
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you