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

2 answers

1 vote
Tessa Tuteleers
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
Admin January 16, 2025

Hello @Tessa Tuteleers , 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