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...
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".
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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
Disclaimer : I am part of the app team for this add-on
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
🏷️ 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.
🍀 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
Kind regards,
Bill
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.