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...

3 answers

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
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