Forums

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

how to get the difference between the created and resolution dates by only business work.

Admin
January 15, 2025

Hello, 

In our company, we want to automate the calculation of resolution time in business days. (without weekends, and local free days).

the diff function give us the total duration and not business work.

 

issue.created.diff(issue.resolutiondate) -> (exp: 3 days 18 hours 40 minutes 15 secondes)

 

I tried to manipulate the code and mines days , plus business days bit it seems that the format of the result of diff function does not support that.

we have a cloud jira service managemant instance.

So please, we need help to achieve this .

FTITI Walid

3 answers

1 vote
Demo klant
Community Champion
January 15, 2025

Hey @Admin , 

There is a syntax to calculate the difference in business days, however, then you will change the value you calculate with to days, and you lose the hour / minute / second data. 

{{issue.created.diff(issue.resolved).businessDays}} 

Screenshot 2025-01-15 164132.png

 

If you really need this information as well you could try some advanced calculations ( count difference in days > count difference in business days > substract previous results (then you know how many non-business days you had > count total difference in time > substract amount of non business days)

Hope this helps!

- Tessa

John Funk
Community Champion
January 19, 2025

@Admin  - Please reply inline with this thread so users can follow the conversation. 

What exactly about Tessa's solution does not work for you? Please give an actual use case with values. 

0 votes
Kimberly Jesus
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 29, 2026

In Jira Service Management Cloud, issue.created.diff(issue.resolutiondate) will always return total calendar time, including weekends and non-working days in the businesses like this.

You can use .businessDays like this:
{{issue.created.diff(issue.resolutiondate).businessDays}}

However, this only returns whole business days, and it does not include hours, minutes, or seconds in business time.

So currently:

 No native smart value supports full business-hour precision
You cannot combine business-day filtering with full diff() time breakdown
Only partial option is .businessDays or now.diff(...).businessDays
Most teams handle this by using:

Jira SLAs (best option for business-time tracking)
Or external reporting/tools / Marketplace apps
In short, Jira automation doesn’t yet support a full “business time diff with hours/minutes” calculation in a single expression.

0 votes
Admin
January 16, 2025

Hello @Demo klant , thank you for response but that does not help me.

As i mention I tried already the advanced calculation by the diff function result's format not compatible with arithmatic operations when triying to retrieve non business days.  also We d'ont have 'businesshour' statemant to use and we have only businessdays that will make us loosing the precision with hours .

 

Regards, 

Walid FTITI

Suggest an answer

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

Atlassian Community Events