Skip to main content
Skip table of contents

Calculate Average Time in Status by Work Item Type in Google Sheets (JSON Feed)

📝 Context: A project management team uses Jira to run multiple workflows across several projects. They need clearer visibility into how long tasks spend in each status to spot bottlenecks and improve throughput. By combining Time in Status with relevant Jira work item fields (e.g., Work Item Type, Team, Priority), and exposing the report via a dynamic JSON Data Feed into Google Sheets, the team can build an always-current pivot report that shows average time-in-status by work item type (and other segments). This setup helps them monitor progress, compare performance across workflows, and make targeted process changes that improve efficiency.

🤔 User Problem:

  1. Stakeholders need a simple way to see which work item types spend the most time in each status, over a rolling time window, without manual CSV exports.

  2. Jira gadgets or ad-hoc queries aren’t giving a repeatable, shareable, and always-current view—especially for non-Jira users.

  3. Analysts want to group by Work Item Type, get a count of issues, and average status times, with an easy option to express results in working days.

💡 Solution

1) Create and save the report preset (Time in Status)

  1. Open Time in Status app.

  2. Configure the report you need (columns, filters, work item and report periods, etc.).

  3. Save as Preset so it’s reusable.

image-20250912-134947.png
  • Avoid setting date limits directly in JQL or Filter (e.g., “created in last 30 days”) if you want the sheet to keep rolling forward.

  • Do use Work Items Period and Report Period in Time in Status to define rolling windows (e.g., Last 30 days, Last month, etc.). This keeps your JSON feed dynamic.

2) Generate the JSON Data Feed

  1. In Time in Status app, open your saved preset.

  2. Choose Create JSON Data Feed for this preset.

  3. Copy the generated JSON feed URL.

image-20250912-135007.png
image-20250912-135023.png

3) Bring the data into Google Sheets

  1. Create a new Google Sheet.

  2. Follow the app’s steps to fetch the JSON feed into a sheet.

  3. You should now see a flat table with Issue Key, Issue Type, and status duration fields (in decimal hours).

4) Build the Pivot Table (in Google Sheets)

  1. Select any cell in your imported data range.

  2. Go to Insert → Pivot table → place it on a New sheet.

image-20250912-135042.png
  1. In the Pivot table editor:

    • RowsAdd → select Issue Type.

    • ValuesAdd → select Issue KeySummarize by: COUNTA (this gives Count of Issue Key).

    • ValuesAdd → for each status duration column you care about → Summarize by: AVERAGE.

You’ll now have a pivot showing:

  • Each Issue Type as rows

  • A Count of Issue Key

  • The Average of the selected status durations (in decimal hours)

image-20250912-135054.png

5) (Optional) Convert hours to working days

Data in Google Spreadsheets is transferred in Decimal Hours format. To calculate data in working days, use the formula:

CODE
=(B2/24)/10, where
B2 is the time value you received in pivots
24 is the number of hours in a day
10 is the number of your working hours per day*

* - This number depends on how many working hours are included in your work schedule.
image-20250912-135107.png

📈 Outcomes: A live Google Sheet connected to your Time in Status preset via JSON Feed.

  1. A Pivot table by Work Item Type showing:

    • Count of Work Item Key

    • Average of selected status duration fields (in hours)

  2. Optional working-days conversion using a simple formula (e.g., =<cell> / <hours_per_workday>).

  3. Consistent, reusable setup: the saved preset + rolling Work Items/Report Periods ensure the report stays current without changing JQL.

  4. Share-ready output you can filter, chart, or reuse across teams and projects.

If you need help or want to ask questions, please contact SaaSJet Support or email us at support@saasjet.atlassian.net

Haven't used this add-on yet? Try it now

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.