Hi, for a project it would be great to be able to extract the start and end dates of all iterations. Is that possible with this Python API? Thanks for your help. Best regards.
Yes, there is a function in the WorkClient class which allows to do that.
-
Establish connection like described in the readme
-
Get work_client
work_client = connection.clients.get_work_client() -
Need to create an instance of the Team Context class. Necessary Information for that are the project- and team name or project id and team id
team = TeamContext(project= "Test, project_id= None, team= "Test", team_id= None) -
Use function get_team_iterations
iterations = work_client.get_team_iterations(team) -
Print all dates and names of iterations
for result in iterations:print("Sprint Name: ", end = '')print(result.name)print("Start Date: ", end = '')print(result.attributes.start_date)print("Finish date: ", end = '')print(result.attributes.finish_date, "\n", "\n")
Hope it helps!