Guide · checked on Jira Cloud, November 2026

Jira time in status without a plugin, in Google Sheets™

"How long did this ticket sit in review?" Jira knows: every status change is in the issue's history, with the time it happened. What Jira doesn't have is a report that adds those times up per status. The usual answer on the Atlassian Community is "install an app". This guide shows two free ways instead: copy the status history into Google Sheets with a short Apps Script, or keep a running total on each issue with Jira automation. Then it turns either one into hours per status, per issue and for the team.

Replace ABC with your project key everywhere below. (Atlassian now calls issues "work items" in parts of Jira, so you'll see both words.)

1. What Jira shows for free

Check these first. One of them may be enough:

  • Days in column (company-managed boards): dots on each card for the days it has been in its column, turning red as they add up, with four red dots at 20 days or more. If a card comes back to a column, the count carries on. It's on by default for Kanban and off for Scrum (Atlassian's card settings).
  • Control chart (company-managed boards): cycle time across the columns you pick, with the average. Select a dot to see one work item. It has no export (Atlassian's guide).
  • History on each issue (under Activity): every status change with its date and time, but no durations.
  • JQL can tell you which issues were in a status, not for how long: project = ABC AND status WAS "In Review" DURING (startOfWeek(), now()), or status CHANGED FROM "In Review" TO "In Progress" to find work sent back.

What none of these give you is a table: each issue, each status, the hours. A CSV export doesn't include the history either. For that you need the change history itself, and that's what step 2 fetches.

2. Free: copy the status history into Sheets with Apps Script

Jira's REST API returns each issue's change history (Get changelogs, oldest first). Google Sheets can call it with Apps Script, which is free and runs in your Google account. The script below writes one row for every stay in a status: the issue, its type, the status, when it entered and when it left. It works on history you already have, back to the day each issue was created.

  1. Create an Atlassian API token at id.atlassian.com > Security > API tokens (Create API token). It can read what your account can read. Tokens expire after a year at most (Atlassian's token page), so pick a date and note it.
  2. In a new spreadsheet, open Extensions > Apps Script, delete what's there and paste the script below.
  3. Change ABC in the JQL line to your project key, then save.
  4. Reload the spreadsheet. A Jira history menu appears. Choose Set up and answer the three questions (site, email, token). Google asks you to allow the script first; it's your own script, so if Google warns that it isn't verified, choose Advanced and continue.
  5. Choose Jira history > Refresh. A History tab fills in.
// Jira status history -> the "History" tab. Free; runs in your own Google account.
// Change the JQL to your project. Open issues plus anything finished in the last 90 days
// (statusCategoryChangedDate, not resolved: many workflows never set a resolution):
const JQL = 'project = ABC AND (statusCategory != Done OR statusCategoryChangedDate >= -90d) ORDER BY created DESC';
const MAX_ISSUES = 300; // about one Jira call per issue; keeps a run well inside Apps Script's 6-minute limit

function onOpen() {
  SpreadsheetApp.getUi().createMenu('Jira history')
    .addItem('Set up', 'setup')
    .addItem('Refresh', 'refreshHistory')
    .addToUi();
}

// Saves your site, email and API token in your own user properties (not in the script, not visible to other editors).
function setup() {
  const ui = SpreadsheetApp.getUi();
  const questions = [
    ['SITE', 'Your Jira site, for example yourcompany.atlassian.net'],
    ['EMAIL', 'The email of your Atlassian account'],
    ['TOKEN', 'Your Atlassian API token'],
  ];
  for (const [key, question] of questions) {
    const answer = ui.prompt(question, ui.ButtonSet.OK_CANCEL);
    if (answer.getSelectedButton() !== ui.Button.OK) return;
    PropertiesService.getUserProperties().setProperty(key, answer.getResponseText().trim());
  }
  ui.alert('Saved. Now choose Jira history > Refresh.');
}

function jira(path) {
  const p = PropertiesService.getUserProperties();
  const site = p.getProperty('SITE').replace(/^https?:\/\//, '').replace(/\/+$/, '');
  const auth = Utilities.base64Encode(p.getProperty('EMAIL') + ':' + p.getProperty('TOKEN'));
  const res = UrlFetchApp.fetch('https://' + site + path, {
    headers: { Authorization: 'Basic ' + auth, Accept: 'application/json' },
    muteHttpExceptions: true,
  });
  if (res.getResponseCode() !== 200) {
    throw new Error('Jira answered ' + res.getResponseCode() + ': ' + res.getContentText().slice(0, 300));
  }
  return JSON.parse(res.getContentText());
}

// Jira sends "2026-11-05T10:15:32.123+0000"; JavaScript wants "+00:00".
function toDate(s) {
  return new Date(s.replace(/([+-]\d{2})(\d{2})$/, '$1:$2'));
}

function refreshHistory() {
  // 1. The issues, 100 per page.
  const issues = [];
  let next = '';
  do {
    const page = jira('/rest/api/3/search/jql?jql=' + encodeURIComponent(JQL) +
      '&fields=issuetype,status,created&maxResults=100' + (next ? '&nextPageToken=' + encodeURIComponent(next) : ''));
    issues.push(...page.issues);
    next = page.nextPageToken;
  } while (next && issues.length < MAX_ISSUES);

  // 2. Each issue's status changes, oldest first, turned into one row per stay in a status.
  const rows = [];
  for (const issue of issues.slice(0, MAX_ISSUES)) {
    const changes = [];
    let startAt = 0;
    let log;
    do {
      log = jira('/rest/api/3/issue/' + issue.key + '/changelog?startAt=' + startAt + '&maxResults=100');
      for (const h of log.values) {
        for (const item of h.items) {
          if (item.field === 'status') changes.push({ at: toDate(h.created), from: item.fromString, to: item.toString });
        }
      }
      startAt += log.values.length;
    } while (!log.isLast && log.values.length > 0);
    changes.sort((a, b) => a.at - b.at);

    const type = issue.fields.issuetype.name;
    let status = changes.length ? changes[0].from : issue.fields.status.name;
    let entered = toDate(issue.fields.created);
    for (const c of changes) {
      rows.push([issue.key, type, status, entered, c.at]);
      status = c.to;
      entered = c.at;
    }
    // Where it is now, with no "Left" yet. Finished issues (any status in the Done category, whatever
    // it's called) get no open row, so their time doesn't keep growing.
    if (issue.fields.status.statusCategory.key !== 'done') rows.push([issue.key, type, status, entered, '']);
  }

  // 3. Rewrite the History tab. Other tabs that point at it keep working.
  const book = SpreadsheetApp.getActive();
  const sheet = book.getSheetByName('History') || book.insertSheet('History');
  sheet.clearContents();
  sheet.getRange(1, 1, 1, 5).setValues([['Key', 'Type', 'Status', 'Entered', 'Left']]);
  if (rows.length) sheet.getRange(2, 1, rows.length, 5).setValues(rows);
  sheet.getRange('D:E').setNumberFormat('yyyy-mm-dd hh:mm');
}

Good to know:

  • The token is saved in your own user properties, not in the script, so other editors of the spreadsheet can't read it. Anyone who can edit the script can change what it does, though, so keep editing rights to people you trust.
  • Each issue takes one call to Jira, so MAX_ISSUES keeps a run to a few hundred issues and inside Apps Script's 6-minute limit. On our test site a call took about 0.4 seconds, so 300 issues is roughly two minutes. If Jira answers 429 (too many requests), lower it or narrow the JQL.
  • The JQL uses statusCategoryChangedDate, not resolved, for "finished in the last 90 days". Many workflows never set a resolution: on our test service space, none of the finished requests had one, so resolved >= -90d would have left every one of them out.
  • An issue that's finished (its status is in the Done category, whether it's called Done, Resolved, Closed or Approved) gets no row for its final status, so finished work doesn't keep adding hours.
  • Status names are the ones the issue had at the time. If you renamed a status, old rows keep the old name.
  • The script uses a classic (unscoped) token at your site address. Atlassian's scoped tokens use a different address (api.atlassian.com), which this script doesn't handle.

3. Hours in each status

Keep the maths on its own tab, because every refresh rewrites History. Make a tab called Times, type Key, Type, Status, Hours in A1:D1, and in A2:

=ARRAYFORMULA(FILTER({History!A2:C, ROUND((IF(History!E2:E = "", NOW(), History!E2:E) - History!D2:D) * 24, 1)}, History!A2:A <> ""))

Every stay in a status becomes a row with its hours. A stay that hasn't ended yet counts up to now. Finished issues have no open stay (the script leaves out their final status), so nothing grows forever, whatever your final statuses are called.

  • These are calendar hours, nights and weekends included, which is also what Days in column and the Control chart count. Divide by 24 for days.
  • NOW() updates when the spreadsheet recalculates, so open stays keep growing. For finished stays only, add History!E2:E <> "" as another condition.

4. Per issue, per status, and what's stuck

Per issue: a table with one row per issue and one column per status, in one formula. On a tab called By issue, in A1:

=QUERY(Times!A1:D, "select A, sum(D) where A is not null group by A pivot C", 1)

An issue that went back to In Progress twice has both stays added together. For cycle time, add up the columns that count as work, for example =SUM(C2:D2) if C and D are In Progress and In Review (check which letters they landed in once).

Per status, slowest first, on a tab called By status, in A1:

=QUERY(Times!A1:D, "select C, count(D), sum(D), avg(D) where A is not null group by C order by sum(D) desc label count(D) 'Stays', sum(D) 'Total hours', avg(D) 'Average hours'", 1)

QUERY has no median, and one ticket forgotten for a month drags the average up. Type Median hours in E1 and in E2, filled down a dozen rows:

=IF(A2 = "", "", ROUND(MEDIAN(FILTER(Times!$D$2:$D, Times!$C$2:$C = A2)), 1))

The median is the typical stay: half were shorter, half longer. A status where the average is far above the median has a few issues that sat there for a long time. For a chart, select columns A and C of By status (hold Ctrl, or Cmd on a Mac) and choose Insert > Chart, then Bar chart.

What's stuck right now: every issue's current status, oldest first. On a tab called Now, in A1:

=QUERY(History!A1:E, "select A, B, C, D where A is not null and E is null order by D asc", 1)

Column D is when the issue entered the status it's in now. The top rows have waited longest. Format D as a date-time if Sheets shows a number.

5. Free, no script: running totals with automation

If you'd rather not use an API token, Jira automation can keep the total on each issue as it moves. It needs two fields per status you want to time. For In Progress:

  1. Create a Date Time Picker field called In Progress since and a Number field called Minutes in In Progress, and add them to the issue screens.
  2. Flow 1: trigger Work item transitioned, to status In Progress. Action Edit work item: set In Progress since to {{now}}.
  3. Flow 2: trigger Work item transitioned, from status In Progress. Condition Work item fields condition: In Progress since is not empty. Action Edit work item: set Minutes in In Progress to:
    {{#=}}{{issue.Minutes in In Progress|0}} + {{issue.In Progress since.diff(now).minutes}}{{/}}
  4. Repeat for each status you care about, such as In Review or Waiting for customer.

Flow 2 adds the minutes of each stay to the total, so going back and forth is counted correctly. The |0 treats an empty total as zero (smart value defaults and maths, date diff). The totals show on the issue, as search columns and in a CSV export; in Sheets, divide by 60 for hours.

The limits: it only counts from the day you turn it on, a stay that's still going isn't in the total until the issue leaves the status, and every run counts towards your site's automation usage. Test it on one project first. We checked that this trigger, condition and action exist in Jira's flow builder (November 2026), but we haven't run these two flows.

A shortcut for the current status: Jira's Status category changed field (statusCategoryChangedDate in JQL) holds when the issue last moved between To Do, In Progress and Done. It doesn't change on a move between two statuses in the same category, and it isn't in CSV exports (JRACLOUD-81567).

6. Keep it up to date

The script, free: in Apps Script, open Triggers (the clock icon), choose Add Trigger, pick refreshHistory, Time-driven and Day timer. It then runs every day, even with the spreadsheet closed, and Google emails you if a run fails (set Failure notification settings to Notify me immediately if daily is too slow). If that covers you, you don't need anything else.

The automation fields: a CSV export is a snapshot, so the totals in Sheets are only as fresh as your last import. That's where Reportwell for Jira fits. It's our Google Sheets add-on, and for this report it does this:

  • Runs your JQL, or one of your starred Jira filters, into a tab. It takes any field by name or id, so the In Progress since and Minutes in In Progress fields from step 5 and Status Category Changed can sit next to Key, Status, Type and Assignee.
  • Writes date-time fields as real date-times in the spreadsheet's time zone, and numbers as numbers, so =NOW() - D2 or =E2 / 60 work straight away.
  • Refreshes every hour, day or week at the hour and time zone you pick, on our servers, with no script and no API token in your spreadsheet. If a scheduled refresh fails, you get a failure email, the sidebar shows why, and the old data stays in place. The Reportwell log tab records every run (the last 500).

What it doesn't do: it imports field values, not the change history. It can't build the History tab from step 2, and it can't give you time in status for the past. For that, the script is the way.

Early access: Pro (scheduled refresh, failure emails, up to 50,000 rows) is free for everyone until 28 Feb 2027. No card needed. The Free plan has manual refresh, one report per spreadsheet and up to 1,000 rows. It works with Jira Cloud, not Jira Server or Data Center.

We make Reportwell for Jira. Get it on the Google Workspace Marketplace, or read the documentation. Steps 1-5 work without it. For time from created to resolved, see the Jira resolution time guide. This guide was written with AI assistance and checked against Atlassian's and Google's documentation and the add-on's code. The script's API calls and parsing were checked against a real Jira Cloud site on 27 November 2026 (a software space and a service space, read-only), and the formulas were checked in a simulation on that data. We haven't run the script inside Apps Script with an API token, and the automation flows were not run.