本文整理汇总了Python中jira.JIRA.get_versions方法的典型用法代码示例。如果您正苦于以下问题:Python JIRA.get_versions方法的具体用法?Python JIRA.get_versions怎么用?Python JIRA.get_versions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jira.JIRA
的用法示例。
在下文中一共展示了JIRA.get_versions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: index
# 需要导入模块: from jira import JIRA [as 别名]
# 或者: from jira.JIRA import get_versions [as 别名]
@auth
@cached(True)
def index():
favorites, projects = jira.get_projects(app.config['JIRA_FAVORITE_PROJECTS'])
filters = jira.get_saved_filters()
return render_template('index.html', favorites=favorites, projects=projects, filters=filters)
@app.route('/projects/<project_key>')
@auth
@cached()
def project(project_key):
try:
project = jira.get_project_by_key(project_key)
except Exception, e:
abort(404)
released, upcoming, unplanned = jira.get_versions(project_key)
return render_template('project.html', project=project, released=released, upcoming=upcoming, unplanned=unplanned)
@app.route('/projects/<project_key>/<version_nr>')
@auth
@cached()
def version(project_key, version_nr):
try:
project = jira.get_project_by_key(project_key)
except Exception, e:
abort(404)
version = jira.get_version(project_key, version_nr)
if not version:
abort(404)
issues = jira.get_issues_from_version(project_key, version_nr)
statuses = jira.get_statuses()