本文整理汇总了Python中jira.JIRA.sprints方法的典型用法代码示例。如果您正苦于以下问题:Python JIRA.sprints方法的具体用法?Python JIRA.sprints怎么用?Python JIRA.sprints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jira.JIRA
的用法示例。
在下文中一共展示了JIRA.sprints方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open
# 需要导入模块: from jira import JIRA [as 别名]
# 或者: from jira.JIRA import sprints [as 别名]
from dateutil import parser
import yaml
with open('jira.yaml') as f:
details = yaml.load(f)
address = details['address']
user = details['credentials']['user']
password = details['credentials']['password']
# You need to set a password, or this can be changed to use oauth apparently
jira = JIRA(address, basic_auth=(user, password))
board = next(board for board in jira.boards() if board.name == u'Enterprise Release')
sprint = next(
sprint for sprint in jira.sprints(id=board.id) if
sprint.state == u'ACTIVE' and
sprint.name.startswith('Release Squad Sprint')
)
jql = 'sprint = {sprint_id}'.format(sprint_id=sprint.id)
issue_search_results = jira.search_issues(jql)
issues = set(jira.issue(issue.key, expand='changelog') for issue in issue_search_results)
issues_moved_into_sprint = []
for issue in issues:
for history in issue.changelog.histories:
for item in history.items:
if item.field == 'Sprint' and str(sprint.id) in item.to: