Forums

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

how to calculate time spent during the multiple statuses through automation

Anser Ghazzaal Ali
Contributor
May 4, 2026

how to calculate time spent during the multiple statuses through automation

4 answers

1 accepted

0 votes
Answer accepted
Ivan Manolov _Appfire_
Atlassian Partner
May 6, 2026

Hi @Anser Ghazzaal Ali,

You can build this with native automation, but as @Bill Sheboy hinted, you'll need one custom field per status you want to measure plus a small set of rules. Here's a working pattern for one status - repeat it for each status you care about.

One-time setup (per status, e.g., "In Progress"):

  • Create two custom fields on the work item: a date-time field In Progress - Entered At, and a number field In Progress – Hours.

Rule 1 — capture the entry timestamp:

  • Trigger: Work item transitioned
    • From status: any
    • To status: In Progress
  • Action: Edit work item
    • In Progress – Entered At = {{now}}

Rule 2 — capture the exit and add to the running total:

  • Trigger: Work item transitioned
    • From status: In Progress
    • To status: any
  • Condition: Work item fields condition
    • In Progress – Entered At is not empty
  • Action: Edit work item
    • In Progress – Hours = {{#=}}{{issue.In Progress – Hours}} + {{now.diff(issue.In Progress – Entered At).hours}}{{/}}
    • In Progress – Entered At = (clear)

The {{#=}}…{{/}} expression is Jira's mathematical-expression smart value — it adds the just-elapsed duration to whatever was already in the total. Each round trip through the status accumulates correctly.

A few caveats worth knowing up front:

  • This only counts future transitions. To backfill historical values, you'd run a one-time rule with a Scheduled trigger and a JQL filter, but populating accurate history from the changelog inside an automation is awkward - easier to reset and start fresh.
  • Time is not business hours. Subtracting weekends/holidays inside automation is doable but messy (you'd nest a few if checks against now.dayOfWeek).
  • If the workflow has many statuses, the rule count grows linearly. Five statuses = ten rules. Keep them tightly scoped (e.g., per project) to avoid cross-project surprises.
  • If your team manually backdates work, the entered-at value won't reflect that.

For dashboard reporting, once the - Hours fields are populated you can use Two-Dimensional Filter Statistics with Assignee × In Progress – Hours (Statistic Type), or chart them in any list/issue navigator with the field as a column.

Hope this helps,

Ivan

Ivan Manolov _Appfire_
Atlassian Partner
May 6, 2026

@Anser Ghazzaal AliFollowing up on my earlier answer - I know you specifically asked for the native automation route, and that's above. Just flagging one more option in case the rule sprawl ends up being more maintenance than the data is worth.

If you're open to solutions from the Atlassian Marketplace, JXL reads time-in-status directly from the work-item changelog Jira already keeps. You add a "Time in " smart column for any status, and the values populate retroactively for every existing issue with no fields, no rules, and no backfill scripts. You can group by assignee or sum across multiple statuses for cycle-time-style metrics.

time-in-status.gif

Disclosure: I work for the team that builds JXL. Sharing this as an option, not a sales pitch - the native automation pattern works fine if you're set on it.

Cheers,

Ivan

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.
May 4, 2026

Hi @Anser Ghazzaal Ali 

Short answer: Would you please explain what outcome you are trying to achieve with these measures?  What would your team do differently if you had that information right now?  Knowing those answers will help the community provide better suggestions.

Until we know that...

 

Other than for a very simple workflow (e.g., Todo, In Progress, and Done), measuring time-in-status with automation rules can be challenging.  This why marketplace vendors are suggesting products to you: their products can get the data from the work item changelog / history and process it with app code more easily than a rule or built-in Jira features can.

How do you want the time measures provided: a chart, number values, etc.?

  • For a chart, you could try the built-in, Atlassian interpretation of a Control Chart under reports from the board...without the need for any automation rules.  This chart has some configuration options, although it also has several limitations.  To learn more, please look here: https://support.atlassian.com/jira-software-cloud/docs/view-and-understand-the-control-chart/
  • For number values, multiple custom fields and automation rules would be needed to capture the start, stop, and difference times for each desired status.  That is a brittle, and challenging solution because:
    • Getting the data directly from the changelog / history is very challenging in a rule due to REST API responses / paging, and the filtering needed.  As an alternative rule structure...
    • Multiple rules are needed for the various possible ways status can change
    • Custom fields could be tampered with by people, and thus more rules are needed to manage that
    • Workflows and board configurations could change independently of the rules, leading to mismatch problems
    • Rules can stop running for various reasons, creating gaps in the time captures
    • And...once you have any number values, your team would need to decide how to use them: export the fields, report them with dashboard gadgets, etc.
    • All of which will require extensive testing and maintenance to keep the rules running

 

Kind regards,
Bill

Anser Ghazzaal Ali
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!
May 5, 2026

Thanks, Bill, for your effort. 

But it looks like every answer is trying to push me towards buying third-party solutions, why Atlassian did not develop this small and important feature in Jira. Maybe they also try to push clients to buy third-party solutions. 

I need only the time spent by one work item in one status, where Jira is already storing the incoming and outgoing time.

 

 

Like # people like 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 Champions.
May 5, 2026

Please re-read my post where two built-in approaches are noted: the Control Chart and building automation rules.  

What happened when you tried those approaches?  Thanks!

0 votes
Enric Font
Community Champion
May 4, 2026

Dear @Anser Ghazzaal Ali 

I you need to get the time each work item remains in each status you can use the SLA report of the Gadget Utilities for Jira Cloud

aaa.png

You can select the filter of work items to display and add the statuses you can track

 

Anser Ghazzaal Ali
Contributor
May 4, 2026

I need an automation step-by-step workaround, not marketing 

Like # people like this
0 votes
Anastasiia Maliei SaaSJet
Atlassian Partner
May 4, 2026

Hi @Anser Ghazzaal Ali ! You can actually handle this with our app Time Metrics Tracker | Time Between Statuses 

It lets you calculate time spent in any status or between multiple statuses, and you can fully customize the metrics to match your workflow (cycle time, waiting time, time between specific steps — whatever you need).

On top of that, you get solid visualization tools like scatter plots, WIP charts, and trend gadgets to really understand what’s going on in your process — plus alerting if things start taking too long.

Also, it includes Manage Work Schedule, so your calculations can take into account working hours, weekends, and holidays, which makes a big difference if you want accurate numbers.

Happy to share more details if you’re exploring options 🙂

Anser Ghazzaal Ali
Contributor
May 4, 2026

I need an automation step-by-step workaround, not marketing 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events