How do I obtain the Versionone's "Done" hours through its RESTful API?

StackOverflow https://stackoverflow.com/questions/16092833

  •  04-04-2022
  •  | 
  •  

سؤال

For example: When I look for all the attributes of a Task
https://<host>/VersionOne/rest-1.v1/Data/Task
I get information like "Todo" and "DetailedEstimates" but nothing related to the "Done" hrs

Do you know if there is a way to get the "Done" hrs for a given task/Test/etc through the Rest API of VersionOne?

هل كانت مفيدة؟

المحلول

"Done" is not a single value and thus must be queried for through the relation. The asset type that represents one entry of hours is called an Actual. The relation, through the Workitem base is called Actuals.

So you would 'root' your query with something like Story, or even Workitem. Then use the 'sel' to select the member and value (hours).

http://<host>/VersionOne/rest-1.v1/Data/Story?sel=Name,Actuals.Date,Actuals.Value,Actuals.Member

That might be a bit overwhelming data-wise, so you'll probably want to limit it to one story:

/rest-1.v1/Data/Story/1038?sel=Name,Actuals.Date,Actuals.Value,Actuals.Member

Please note that if you track at the task/test level and not the story level you'll have to navigate that relation as well:

/rest-1.v1/Data/Story/1031?sel=Name,Actuals.Date,Actuals.Value,Actuals.Member,Children.Actuals.Date,Children.Actuals.Value,Children.Actuals.Member

The other way you could do it is from the Actual asset itself. The data would be the same but the result might be more consumable:

/rest-1.v1/Data/Actual?sel=Date,Value,Member.Name,Workitem.Name

نصائح أخرى

Additionally, you can have all the Actual Values summed up for each Task

https://<host>/VersionOne/rest-1.v1/Data/Task?sel=Name,Actuals.Value.@Sum
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top