Is there a way to to see what dates/times tickets changed Status via the JIRA API?

2.5k views Asked by At

I am trying to run queries against the JIRA API and get results in which I can see the dates and times that each issue went through a status change.

E.g.: Run a query to grab all issues with a certain assignee and see, along with the rest of the information, timestamps for when each issue changed from "Open" to "Resolved".

Is this possible?

EDIT: I have tried expanding the changelog, but while that tells me what status changes a ticket went through (e.g., that the particular ticket transitioned from "Open" to "Resolved" and then from "Resolved" to "Closed"), it doesn't tell me WHEN these transitions occurred.

1

There are 1 answers

0
J Ellis On BEST ANSWER

Turns out that each of the transition objects showing the status changes have a "created" field that contains the time and date the transition occurred, which I feel is a bit of a misnomer, but there it is. An example object inside the "histories" array in the expanded changelog object:

{ "author" : { "active" : true,
  "avatarUrls" : { "16x16" : "https://company.jira.com/secure/useravatar?size=xsmall&avatarId=10072",
      "24x24" : "https://company.jira.com/secure/useravatar?size=small&avatarId=10072",
      "32x32" : "https://company.jira.com/secure/useravatar?size=medium&avatarId=10072",
      "48x48" : "https://company.jira.com/secure/useravatar?avatarId=10072"
    },
  "displayName" : "First Last",
  "emailAddress" : "[email protected]",
  "name" : "first.last",
  "self" : "https://company.jira.com/rest/api/2/user?username=first.last"
},
"created" : "2013-04-17T16:21:13.540-0400",
"id" : "24451",
"items" : [ { "field" : "status",
    "fieldtype" : "jira",
    "from" : "5",
    "fromString" : "Resolved",
    "to" : "6",
    "toString" : "Closed"
  },
  { "field" : "assignee",
    "fieldtype" : "jira",
    "from" : "old.assignee",
    "fromString" : "Old Assignee",
    "to" : "first.last",
    "toString" : "First Last"
  }
]
}