How to calculate total spent spent by a Story in particular Status.

Jayanth November 26, 2024

I have a query. How can I find the total spent by a Story in particular Status (say, "In Progress"). I want to achieve this using Jira automation only without using any Add-ons or third party tools. 

Note: Here, the story can be reopened. So, the time should be calculated accordingly.

1 answer

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 Leaders.
November 26, 2024

Hi @Jayanth 

Assuming you mean the total time spent in a specific Status...

Short answer: That is not easily possible with automation rules.

 

Without a marketplace app, there are at least four approaches to gather time spent in a specific Status:

  1. use the built-in, Atlassian interpretation of a Control Chart report
  2. use an automation rule with custom fields to track when an issue enters a Status and leaves it, calculate the time difference, and add that value to an accumulation custom field
  3. use an automation rule which looks at the issue changelog using the REST API endpoints, paging through the entries when necessary
  4. use one of the many spreadsheet addins which can recursively call the REST API endpoints to load Jira data which has paging, and then use formulae to attempt the measurement

The first one may (or may not) accurately track when an issue returns to a Status (such as with backwards flow).  The documentation says it does, others have sometimes reported it does not.

The second approach with an automation rule requires that the automation engine never / rarely has an outage.  This is important because after an outage, some rules may not trigger when the event occurred, and others will not trigger at all.  Both of these reduce the accuracy of measurement.

The third approach uses the issue changelog and automation, and in theory is as accurate as a marketplace app.  The problem is there are limits to the number of changelog entries returned by the REST API, and so repeated calls and paging are required.  The only ways I know to do that and accumulate a total are: with a recursive rule using an Incoming Webhook trigger, or to add a bunch of unique Entity Properties (one for each page checked) and then sum them later with another rule.  Due to the complexity of these approaches it would probably be easier to write your own app outside of Jira to perform the measurement using the REST API.

For the fourth, spreadsheet approach: I have never tried that for time measurement so you may need to do some internet searches to find examples.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events