How to calculate time spent by issue in a status for business hours and days

Jayanth February 19, 2025

I want to calculate Time for an Issue spent in a status for only business days and hours. I am using Jira automation and I am checking feasibilities of this in Jira cloud.

I don't want any add-ons or third party apps to do it. Can anyone tell me is that even possible in Jira automation.

3 answers

0 votes
Gizem Gökçe _OBSS_
Atlassian Partner
February 20, 2025

Hello @Jayanth ,

Yes, it is possible to calculate time in status using Jira Automation, but setting it up requires significant effort. You'll need to create multiple rules to track status entry/exit times, calculate time differences, and handle edge cases like weekends and non-working hours. Maintaining these rules over time, especially with changes in workflows or business hours, adds further complexity.

Many Jira users prefer using a marketplace app like Timepiece - Time in Status for Jira, built by my team at OBSS, for this purpose. Timepiece provides ready-to-use reports that already consider business days and working hours, saving you from complex automation setups. Since you're on the Free plan, Timepiece is also free for you to use. Instead of spending hours configuring and maintaining automation, you can get accurate reports within minutes.

In Timepiece, calendars can be configured based on your working hours, excluding holidays and non-working hours (even lunch breaks) from the calculation. Time in Status reports can be generated based on your custom calendars. 

Cstom Calendar.png

The app calculates its reports using already existing Jira issue histories so when you install the app, you don't need to add anything to your issue workflows and you can get reports on your past issues as well.

Let me know if you’d like more information or assistance with your reporting needs in Timepiece - Time in Status for Jira! If you wish, you can also schedule a live demo. We will provide a comprehensive overview of the application and address any inquiries you may have.

Best regards,
Gizem

0 votes
Derek Fields _RightStar_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2025

You could create an Automation based on transition. When the issue moves from one status to another, you could determine, using the {{changelog}} whether it is coming into or from a status that you wanted to track. If it moves into a status that you want to track, then you would put the date/time into a custom field. If it moves out of a status that you wanted to track, you would use the date/time from that custom field and calculate {{now.diff(issue.status_start_time).businessDays}}. This will return the difference in business days. Then you can store this value in a custom field for reporting purposes.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2025

Hi @Jayanth 

Short answer: without a marketplace app / addon, that is possible and it is quite complicated (and so likely to be a very brittle solution).

 

Doing this would require tracking the date / time an issue enters and exits a status (or current {{now}} value).  Then the math must be performed to:

  • calculate the difference in business hours, using the known start and end of the day time
  • remove any whole days
  • use the remainder for working hours
  • combine all of the above values

Or...

  • calculate the difference in business days
  • calculate the hours remainder (i.e., the difference between the start of a working day and the exit status time...adjusting if the issue exited outside of working hours...or started outside of working hours)
  • combine all of the above values

 

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events