Retrieve start date and end date of a JIRA sprint using the python JIRA library -
is there way start , end date of sprint in jira using python jira library? can jira.client.resultlist sprints within board of interest using jira.sprints(jira.boards()[<sequence number of board of interest>].id). list looks this:
[<jira sprint: name='lsd sprint 1', id=1>, ... <jira sprint: name='lsd sprint 14', id=14>] could somehow access start , end date each sprint using similar issue.fields returns me jira.resources.propertyholder, can access additional data ?
for testing used jirashell (python-jira 1.0.10), jira 6.3.11, jira 7.2.3, jira agile rest api v1.0. ran following code in jirashell:
dir(jira.sprints(jira.boards()[0].id)[0]) it prints methods , attributes of sprint object:
['agile_base_rest_path', 'agile_base_url', 'agile_experimental_rest_path', 'greenhopper_rest_path', 'jira_base_url', '_readable_ids', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_base_url', '_default_headers', '_get_url', '_load', '_options', '_parse_raw', '_resource', '_session', 'delete', 'find', 'id', 'linkedpagescount', 'name', 'raw', 'self', 'sequence', 'state', 'update'] as can see, list not contain startdate or enddate attributes. nevertheless, quick googling sprint startdate , enddate properties via jira rest api showed api support such properties. turned out python-jira uses old version of jira agile rest api. example, when run jira.sprints(jira.boards()[0].id)[0].self, https://[jira_url]/rest/greenhopper/1.0/sprint/[id] result (not agile/1.0 mentioned in answer api supports startdate , enddate properties). python-jira throws message old private greenhopper api used, parameters ignored.
so, assume not possible startdate , enddate using python-jira due old version of jira agile api uses.
wiki
Comments
Post a Comment