tfs - Visual Studio REST API Iteration and Area ID's -


i working vso rest api , have question on how iteration , area id's assigned. specifically, why when assign work item root iteration or area id returned wit not returned when query classification nodes?

for example, imagine have hierarchy when query /defaultcollection/my project/_apis/wit/classificationnodes?$depth=2

  • my project: id=1234
    • area 1: id=5678
      • area 2: id= 9012

and query work item using /defaultcollection/_apis/wit/workitems/1?$expand=all

if work item in area 1 or area 2, system.areaid field expected (5678 , 9012, respectively). however, if assign work item project, system.areaid value not included when query classification nodes. there appears kind of relationship between id's serial (e.g. id returned classification node query 1232 area , 1233 iteration), can't seem find way query actual id returned work item query.

in fact, not id returned work item not present when query classification nodes, if assign work item both root iteration , area, id returned both fields same value not included in classification node query.

what need way @ work item , figure out area , iteration belongs to. path field strings returned, seems error prone since users can change them.

****edit**** above appears bug in rest api, comes across post there way usable iteration id path string. structure rest call so:

/defaultcollection/[project name]/_apis/wit/classificationnodes/iterations/release 1/sprint 1 (etc.)

i have never done id. use path. in classification service can node path enough.

for example, using rest api - can access url data specific iteration:

/defaultcollection/[project name]/_apis/wit/classificationnodes/iterations/[release x]/[sprint y] 

note trying access default iteration path (the project name instead of specific iteration) return error:

/defaultcollection/[project name]/_apis/wit/classificationnodes/iterations/[project name] 

will give :

{"$id":"1","innerexception":null,"message":"vs402485: node name not recognized: [project name]","typename":"microsoft.teamfoundation.workitemtracking.server.metadata.workitemtrackingtreenodenotfoundexception, microsoft.teamfoundation.workitemtracking.server","typekey":"workitemtrackingtreenodenotfoundexception","errorcode":0,"eventid":3200} 

so if batch work, have filter before querying api.


Popular posts from this blog