Get release date for project version with jira-python

微笑、不失礼 提交于 2019-12-24 06:49:20

问题


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!

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.


回答1:


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

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

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



来源:https://stackoverflow.com/questions/39669848/get-release-date-for-project-version-with-jira-python

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