devopshq / tfs

Microsoft TFS API Python client
https://devopshq.github.io/tfs/
MIT License
111 stars 28 forks source link

WIQL: "queryType": "tree" possibly not supported? #12

Open binaryunary opened 6 years ago

binaryunary commented 6 years ago

https://github.com/devopshq/tfs/blob/465b83b626b984f58a9b5070014c585e4f12f454/tfs/resources.py#L160

The above line fails if the query type is tree.

self._workitems = self.tfs.get_workitems((i['target']['id'] for i in self.result['workItemRelations'])) fixes this, but of course, this should happen dynamically based on the query type.

Relevant API doc: https://www.visualstudio.com/en-us/docs/integrate/api/wit/wiql