问题
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