使用jira-python获取项目版本的发布日期 [英] Get release date for project version with jira-python

查看:505
本文介绍了使用jira-python获取项目版本的发布日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jira-python生成一些状态报告.我的问题与版本有关,我想根据版本的发布日期对其进行排序.可以在版本管理下的Jira中设置这些日期,但是似乎很难在jira-python中访问它们!

I am using jira-python to generate some status reports. My issues are associated with Versions and I want to order them according to the release dates of the versions. These dates can be set in Jira under version administration, but it seems difficult to access them in jira-python!

我在版本对象上找不到releaseate属性.一种可能性似乎是使用该版本的自我属性,该属性会产生http:/-地址.将该地址粘贴到我的浏览器中,我发现这样的字符串:

I can't find a releasedate attribute on the version object. One possibility seems to be to use the self-attribute of the version, which yields an http:/-address. Pasting that address into my browser I find a string like this:

{"self":"http://jira/rest/api/2/version/11781","id":"11781","description":"Nera 555 DVT build","name":"NE_555_DVT","archived":false,"released":false,"releaseDate":"2016-04-01","overdue":true,"userReleaseDate":"2016-04-01","projectId":11130}

我应该能够下载并解析此字符串,但想首先检查是否有人知道更简单的方法.

I should be able to download and parse this string, but want to check first if anyone knows of a simpler way.

推荐答案

我发现我可以通过以下方式获得发布日期:

I figured out that I can get the release date in this way:

i = jira.version(v.id, expand="ReleaseDate")
i.releaseDate

jira是JIRA对象,而v是我想要获取发布日期的版本.

Where jira is the JIRA object and v is the version I want to get the release date for.

这篇关于使用jira-python获取项目版本的发布日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆