9

I'm getting started working with the JIRA REST API. I've learned how to get all the issues assigned to the current user:

rest/api/2/search?jql=assignee=currentuser()

...now I am trying to filter those by the current sprint. I think this functionality is provided by the JIRA Agile (Greenhopper) plugin, but I can't find any documentation for it. I came across some interesting data which appears to be the identifier for the sprint that the issue is assigned to:

customfield_10005: [
  "com.atlassian.greenhopper.service.sprint.Sprint@3094f872[rapidViewId=30,state=CLOSED,name=Sprint 2014-06-02,startDate=2014-06-02T00:00:37.672-07:00,endDate=2014-06-08T11:59:00.000-07:00,completeDate=2014-06-09T10:23:13.983-07:00,id=45]"
]

...but it just looks like a serialized mess. How can I query for the issues assigned to the current sprint?

4

1 回答 1

10

您正在寻找的方法是

openSprints()

它仅适用于 JIRA Agile 6.5 或更高版本。

//* 编辑:Greenhopper 被重命名为 JIRA Agile *//

方法定义为:

搜索分配给尚未完成的 Sprint 的问题。(请注意,一个问题可能同时属于已完成的 Sprint 和不完整的 Sprint。)

所以这应该对你有用

assignee in (currentUser()) AND sprint in openSprints()

问候

于 2014-08-12T11:11:12.003 回答