Business hours automation

Pablo Albani August 18, 2023

Hi community, I want to create an automation that counts the number of business hours an issue was in a state. I was looking at the documentation and I see that it has the part of business days but in my case I would need to count only business hours. Is this possible? Thanks

4 answers

4 accepted

1 vote
Answer accepted
Valeriia_Havrylenko_SaaSJet
Atlassian Partner
February 23, 2024

Hello @Pablo Albani  and everybody who is looking for solution  šŸ‘‹

There is nothing built-in which can do that for working hours. Instead the built-in, i recommend you to try you Time in Status for Jira by SaaSJet.

image.png
You can also book a live demo - we'll show you the application inside out and answer all your questions.

Add-on has a 30-day free trial version and  free up to 10 users.
Hope it helps šŸ˜Œ

1 vote
Answer accepted
Emre Toptancı _OBSS_
Atlassian Partner
September 1, 2023

Hello @Pablo Albani

Our team at OBSS built Time in Status exactly for this. It is available for Jira Server, Cloud, and Data Center.  

Time in Status mainly allows you to see how much time each issue spent on each status or each assignee

The app can create reports based on a 24/7 calendar you can define your customer business calendars (each with its own working days, working hours, and holidays) to get reports.

tisCloud_StatusDuration_LeadTime_with Estimates.png    tisCloud_AssigneeDuration.png

You can combine the time for multiple statuses to get metrics like Issue Age, Cycle Time, Lead Time, Resolution Time etc. 

For all numeric report types, you can calculate averages and sums of those durations grouped by the issue fields you select. For example total in-progress time per customer or average resolution time per sprint, week, month, issuetype, request type, etc. The ability to group by parts of dates (year, month, week, day, hour) or sprints is particularly useful here since it allows you to compare different time periods or see the trend. 

tisCloud_StatusDuration_LeadTime_Average_TimeGrouped.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. It supports both Company Managed and Team Managed projects for Jira Cloud.

Time in Status reports can be accessed through its own reporting page, dashboard gadgets, and issue view screen tabs. All these options can provide both calculated data tables and charts.

Gadget_AverageStatusDurationByComponent.png  tisCloud_StatusDuration_LeadTime_Chart.png tisCloud_IssueView_Data.png

https://marketplace.atlassian.com/apps/1211756/

EmreT

1 vote
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2023

Hi @Pablo Albani 

It would help if you could provide a little more context to your goals for the rule:

  • How is this rule expected to be triggered?
  • What are you planning to do with the calculated business hours?

This additional information is important in helping us understand how to best help you.

Pablo Albani August 23, 2023

Hi Mark, the rule is activated when you enter the state, you can return to the state several times so the idea is to accumulate the working hours that are in that state. What you want with the rule is to get an average of the time that the issues are in each state. Greetings

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2023

Thanks for the added context.  I think you need a couple custom fields for this.

  • Entered Status (Date/Time)
  • Business Hours (numeric)

From there you'd need a rule like this (for my example, I'm using In Progress)

Rule 1: Issue Entered Status

  • TRIGGER: Issue Transitioned (To: In Progress)
  • ACTION: Edit Issue (Entered Status)
    • {{now}}

Rule 2: Issue Exited Status

  • TRIGGER: Issue Transitioned (From: In Progress)
  • ACTION: Edit Issue
    • Business Hours
      This should work, but basically it will account for if the issue transitioning in and out of In Progress multiple times.  It calculates the business days and multiplies the value by 8 to give the total business hours.
      • {{#=}}{{issue.Business Hours}}+({{issue.Entered Status.diff(now()).businessDays}}*8){{/}}

Now, for your need to get an average, you will probably need a marketplace app.  I'm partial to Rich Filters as it should be able to key on the Business Hours field and provide the average.

Like ā€¢ Vikrant Yadav likes this
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.
August 24, 2023

Hi @Pablo Albani 

Adding to Mark's earlier question: why are you measuring this?  That is, what problem are you trying to solve?

For example, is this a billing tracking thing, a process improvement thing, something else?  If this for tracking back-and-forth in process flow, please instead consider discussing this with the team to learn why issues are moving backwards in flow.  Knowing that may help reduce/eliminate the root cause, and so eliminate the need to measure this.

Kind regards,
Bill

Pablo Albani August 30, 2023

Hi Bill, what you are trying to see is how long it was in each state, the flow has the possibility of advances and reversals so you want to see the cumulative by state.
Greetings
Pablo

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.
August 30, 2023

Thanks for clarifying, Pablo.

What you are trying to measure is often called "Time In Status" and can sum up to "Build Cycle Time" when it spans the different status values from start-of-work until completion.

There is nothing built-in which can do that for working hours.  Instead the built-in, Atlassian interpretation of the Control Chart Report uses calendar days/hours.  To see more information you would need to:

  1. build this yourself with custom fields and automation rules (as Mark suggested)
  2. export all issue history into another tool for reporting / analysis
  3. purchase marketplace addons for reporting or dashboard gadgets
Like ā€¢ Vikrant Yadav likes this
0 votes
Answer accepted
Mehmet A _Bloompeak_
Atlassian Partner
September 1, 2023

Hi @Pablo Albani

If you prefer to use a marketplace app, you can try Status Time Reports app developed by our team. It mainly provides reports and gadgets based on how much time passed in each status.

Status durations are calculated according to the working calendar you define. Once you enter your working calendar into the app, it takes your working schedule into account too. That is, "In Progress" time of an issue opened on Friday at 5 PM and closed on Monday at 9 AM, will be a few hours rather than 3 days. You can also set different duration formats.

Here is the online demo link, you can see it in action and try without installing the app. For your case, you can have a look at Time in Status for Each Issue report. For further details, please see Status Time Reports How to Videos.

  • This app has a dynamic status grouping feature so that you can generate various valuable reports as time in status, time in assignee, status entry dates and status counts, cycle time and lead time, average/sum reports by any field(e.g. average in progress time by project, average cycle time by issue creation month).
  • You can search issues by Project, Issue Type, Status, Assignee, Issue Creation/Resolution Date(and any other Date field) and JQL Query.
  • You can export reports in CSV file format and open them in MS Excel.
  • You can also add this app as a gadget to your Jira dashboards and reach ā€œStatus Timeā€ from Issue Detail page.
  • You can enable/disable access to Status Time reports&gadgets and Issue Detail page per project, users, groups or project role.

If you are looking for a completely free solution, you can try the limited version Status Time Free.

Hope it helps.

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