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
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}}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Admin,
A reliable way to handle this without scripting is to calculate time against a work schedule using a Marketplace app. I can recommended - Time Metrics Tracker | Time Between Statuses, you would approach your case like this:
Create a metric that measures the time between Created and Resolution, or between the two statuses that represent open to resolved in your workflow. Apply a work schedule so only business hours are counted. For example, set it from Monday to Friday during your working hours, and you can also exclude local holidays and free days. Optionally, you can exclude statuses that shouldn't count toward the total.
The app then returns the exact business-time value. You can monitor it in reports or on a dashboard and look closely at specific issues if a result seems off.
I’m happy to help with the setup if you need it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Admin , 👋🏻
You're completely right—Jira's native smart values like .businessDays drop the precise hour and minute data, and trying to build complex workarounds with .diff() arithmetic often breaks due to format incompatibilities.
If you’re open to using a 3rd-party app to solve this seamlessly without losing precision, I can recommend ChronoFlow - Wait Time Analysis for Jira for this exact use case.
With ChronoFlow, you don't need any complex automation scripts or code manipulation. It handles the precision and business calendars out of the box:
🌱 Working Hours and Calendar Support
This is exactly what you need. You can configure your company's specific working hours and local free days/holidays. The app automatically excludes weekends and non-working hours from the calculation, while keeping your duration data 100% accurate down to the second.
🌱 Time to Resolution
It calculates the precise duration from issue creation to resolution based on your custom business calendar. You can track this for individual issues or view the average time to resolution across a group of issues filtered by JQL (project, component, priority, etc.).
🌱 Time in Status & Active Time
If you ever need to go deeper than just creation-to-resolution, you can also see exactly how much precise working time was spent in each individual status (e.g., Open, In Progress, Waiting for Support), helping you spot where issues actually get stuck.
Other useful features include:
📤 Reports grouped by assignee, status, or priority with Excel/CSV export
📊 Issue view charts for workload and status comparisons
⏱️ Historical recalculation for existing issues (so you can see past data immediately)
🍀 To learn more, feel free to contact me or explore the application through the Atlassian Marketplace link I’ve provided. 🍀
Disclaimer:I work for the vendor who developed this application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Piet Pieters , 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.