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

筅森魡賤 提交于 2019-12-11 03:44:52

问题


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:


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" : "first.last@company.com",
  "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"
  }
]
}


来源:https://stackoverflow.com/questions/18408813/is-there-a-way-to-to-see-what-dates-times-tickets-changed-status-via-the-jira-ap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!