Forums

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

Automation - Recognize difference between dates in business days

Dan Foster
Contributor
March 8, 2023

Hello,

We are in the process of creating a new semi automated onboarding process for our company in Jira and are currently trying to create automation that sets the priority based on the difference between a "start date" that would be specified in the submission, and the actual date of the submission.

We have the automation all sorted and it's working, using else/if functions that says essentially "if the field {start date} = 2 days from now, set priority to high" for example.

The issue we have with this is it does not account for business days only, and we cannot figure out how to make it run on business days only.  So if a request was submitted on Friday with a start date of Monday for example, that is a 1 business day difference requiring a high level of urgency, but the system currently recognizes that as 3 days and assigns a lower priority than is required.

Can anyone suggest a workaround for this?

1 answer

1 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Champion
March 8, 2023

Hi @Dan Foster,

Welcome to Atlassian Community!

You could check which day of the week the request was created like this {{issue.created.dayOfWeekName}} and then check the diff between created date and start date to figure out the priority. 

Mikael Sandberg
Community Champion
March 8, 2023

Have a look at Examples of using smart values with dates for more examples on how you can manipulate dates.

Like Kristopher Perez likes this
Dan Foster
Contributor
March 10, 2023

Thank you @Mikael Sandberg , that was exactly what I was looking for!

Like Mikael Sandberg likes this

Suggest an answer

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

Atlassian Community Events