Forums

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

Use automation to calculate time in status sing Business Days

Agustin Etman
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!
February 20, 2026

Hello I want to save a field with the amount of hours a ticket has been in a specific status

 

The status name is Pending

But I want to consider business hoours and working days. My project is TEAM MANAGED and Service Management project. 

Setting up SLAs is not working entirely for me since I want a targetless SLA, I don{t care about this, I just want to save the time.

I have tried everything, logging creating values variables formulas...

So far the only thing that has worked is setting the value of the field using this this {{issue."Fieldname1".diff(issue."fieldname2").businessDays|0}} 

but I cant get hours to work. I read and gpted and it state sthat my JIRA ADMIN needs to create a Calendar in order for businesshours to work?!?! I sthis correct? 

This cannot be that complicated and I can't be the only person trying to do this...

8 answers

2 votes
Lukas Maczejka - JXL
Contributor
February 22, 2026

Hi @Agustin Etman,

Welcome to the community!

As mentioned by others, there's marketplace apps that can solve your problem, so if you're open to solutions from the Atlassian Marketplace, you may want to have a look at the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your Jira data that allows viewing, inline-editing, copy-pasting, sorting, and filtering by all your work items' fields, much like you’d do in e.g. Excel, Google Sheets, Smartsheet, or Airtable. It also comes with a long list of further features, including different ways to compute "time in status".

 time-in-status-v2 (1).gif


This is really just one of a virtually endless number of possible views and reports; you have full control over which data you want to show and highlight.

If you want even more control over the calculation, you can even write your own using the custom formula feature.

Any questions just let me know,

Best,

Lukas

1 vote
Birkan Yildiz (OBSS)
Atlassian Partner
February 23, 2026

Hey @Agustin Etman 


First, welcome to the Community!

For this exact requirement, a dedicated reporting app is a much simpler solution. Timepiece - Time in Status for Jira handles this calculation automatically without any automation rules.

Instead of trying to force calculated values into a custom field, you can use our Status Duration report to instantly see exactly how long every issue spends in the "Pending" status.

image-20260223-081339.png

To answer your question about calendars: natively, yes, it can be an admin headache. But Timepiece allows you to easily set up Custom Calendars directly within the app. You can define your specific working days, business hours, holidays, and even lunch breaks, and the app will automatically calculate and format the result in precise business hours.

Not just Time in Status, Timepiece offers 15+ reporting types to identify bottlenecks, rework and quality analysis, workload management, etc. You can check it out on the Atlassian Marketplace to learn more about its features and other report types.

Full disclosure, I'm on the team that makes Timepiece - Time in Status for Jira.

Hope this saves you from wrestling with more automation formulas!


Best,
Birkan

1 vote
Rahul_RVS
Atlassian Partner
February 21, 2026

Hi @Agustin Etman 

Welcome to the community !! 

As recommended by everyone an easy solution would to be use a mktplace app. If you would be open to explore one, try out

Time in Status Reports 

With this app you generate time in each workflow status for multiple issues with multiple filter and grouping options. 

With Status grouping feature, can help you define your own issue age time and view the averages of the same. Also the app has 20+ reports to meet a variety of use cases.

Also the app has a custom calendar option to define your working hours and days which will be taken in calculation for time in status.

More details here.

Disclaimer : I am part of the app team for this add-on

Time in Status Reports.jpg

 

TIS - Working Days.PNG

1 vote
John Funk
Community Champion
February 20, 2026

Hi Augustin - Welcome to the Atlassian Community!

There are some free Atlassian Marketplace apps (and really good paid ones too!) that will calculate time in status far easier than what you are trying to do with automation and custom fields. 

However, for your syntax above, try adding: .hours.abs after the 0 to convert the days to hours. Be sure the period is there after the 0.

0 votes
Fatma Uzundemir from The Starware
Atlassian Partner
February 24, 2026

Hi @Agustin Etman

Welcome to the Atlassian Community!

It’s clear you’ve put a lot of effort into solving this with Automation and smart values! You are actually very close, but you’ve hit a well-known Jira limitation: Jira Cloud’s native automation doesn’t easily recognize custom business hour calendars for high-precision calculations like hours and minutes without complex configurations.


To answer your question: Yes, setting up a global calendar via a Jira Admin is one way, but even then, using it within Automation formulas can be quite restrictive and often doesn't give you the "Time in Status" format you’re looking for.


🌱 Since you are looking for a way to track time in Pending status based on business hours without the pressure of a "Target/SLA," I would like to recommend the Time in Status app. It’s designed to handle exactly the complexity you're facing right now.

Here is how it specifically addresses your needs:
🌍 Custom Calendars (No Admin Hassle)
You don’t need to rely on global Jira settings. You can define your own working hours (e.g., 9:00 AM – 5:00 PM), weekends, and holidays directly within the app. It handles the "hours" calculation perfectly.

📊 Targetless Tracking
Since you mentioned SLAs aren't working because you don't want a "target," our app is the perfect alternative. It simply calculates the elapsed time in the "Pending" status and displays it—no goals, no "overdue" flags, just the data.

         Screenshot 2026-02-24 at 16.46.15.png


🏷️ Custom Field Integration
This is the part you’ll love: The app can automatically sync the calculated duration (in business hours) directly into a Jira Custom Field. You can see "Time in Pending" at a glance on your issue view or in your issue navigator, just like you tried to do with your formula.

Retrospective Analysis
Unlike Automation rules which only start working after you create them, Time in Status works retrospectively. It will calculate the time spent in "Pending" for all your existing tickets the moment you install it.

                                Screenshot 2026-02-24 at 16.49.15.png               

🍀 If you’re looking for a plug-and-play solution that saves you from the "formula headache," feel free to explore the Atlassian Marketplace link I’ve provided or reach out to me for more details. 🍀


Disclaimer: I work for the vendor who developed this application.

0 votes
Iryna Komarnitska_SaaSJet_
Atlassian Partner
February 23, 2026

Hi  @Agustin Etman ,


If you’re open to using a third-party app, you can try the Custom Fields feature in Time in Status (developed by my team) to calculate time in status.

These custom fields are generated based on your work calendar, so the values are calculated in business days (with non-working hours excluded).

You can create custom fields to track:

  • Time in the current status

  • Specific time metrics such as lead time, cycle time, and more

image-20250905-111116 (1).png

 And of course, you can still generate full Time in Status reports in the app across all your issues.

Please note: these custom fields are not yet supported for JSM projects.

Hope this helps!

0 votes
Bartek Szajkowski _ Orbiscend OU
Atlassian Partner
February 21, 2026

Hello @Agustin Etman 

Welcome to the Atlassian Community.

If you are open for third-party app, I could suggest to check solution provides by Argon app, which can be useful in your case. The timeInStatus  function queries exactly how long an issue has spent in a specific status — no calendar setup, no SLA configuration needed. This is useful for tracking how long issues remain in particular workflow states.

Ex.

issue > timeInStatus("project = YOUR_PROJECT", "Pending", "4h")

ARGON Powerful JQL Search 

 

If you need the value saved as a field (not just queried), Argon also offers the Time in Status custom field — you create it in Jira Settings → Issues → Custom Fields, select "Pending" as the tracked status, and it automatically displays and stays current on each issue without any manual formulas or variables.

 

Hope this answer meets your expectation.

Wish you nice day

Bartek
(Orbiscend OU Sales support)

 

 

 

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 Champions.
February 20, 2026

Hi @Agustin Etman -- Welcome to the Atlassian Community!

First thing, which version of Jira are you using: Cloud or Data Center?  Your question is tagged with both versions.

Next, adding to the suggestions from @John Funk -- when possible I recommend using a marketplace app for this type of calculation / measurement.  Perhaps check with your Jira Site Admin to learn if you already have one to help. 

My reasons are:

  • None of the automation rule date / time functions respect the working days and hours settings in a Jira site or project / space.  Thus, if your working schedule varies from Monday - Friday, 9am - 6pm UTC, your calculations will be challenging.
  • While calculating business day differences is easy, the time part is not
  • Edge cases will make the calculations even more challenging, and difficult to maintain in a rule.  These cases could include: a date / time value outside of your working day, same values, reversed values, etc.

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer