Forums

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

StartOfYear in Automation

Marcel Risques
Contributor
February 27, 2023

Hi there,

I have an automation where I'm trying to calculate the number of business days since the start of the current year to the Due Date of the issue.

I have tried with:

{{startOfYear.diff(issue.duedate).BusinessDays}}

Also with {{startOfYear().diff(issue.duedate).BusinessDays}}

But in both cases I get zero days days as result.

If I try with:

{{now.diff(issue.duedate).BusinessDays}} then I get the right number of days... so why isn't it working with the StartOfYear function?

Thank you in advance for your help.

1 answer

1 accepted

3 votes
Answer accepted
Walter Buggenhout
Community Champion
February 27, 2023

Hi @Marcel Risques and welcome to the Community!

The startOfYear() function you refer to is a thing from JQL.

You may want to try the following syntax to retrieve the first day of the year:

{{now.startOfMonth.withMonth(1)}}

Hope this helps!

Marcel Risques
Contributor
February 28, 2023

Yep, that worked! :)

Really appreciate your quick response.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events