Getting list of Stories And Tasks in a sprint

828 views
Skip to first unread message

TheMcL...@gmail.com

unread,
Mar 7, 2008, 10:35:41 AM3/7/08
to VersionOne-dev, smc...@edfinancial.com
I'm still fairly new to the API, so I apologize if this is an obvious
question...

I've been able to query VersionOne for the list of Stories (and story
attributes) in the current sprint. And, I can query VersionOne for
the list of Tasks (and task attributes) in the current sprint. To do
this, I have been performing two separate queries and then attempting
to merge the data into a custom report.

Is there any easier way to query for a list of all of the Tasks and
Stories in the current sprint in a single query? What would be ideal
is the ability to query for Stories and receive the list of tasks for
the story embedded within each Story asset. Is that possible?

Thanks!
Sandra

Maggie Bullington

unread,
Mar 7, 2008, 10:56:05 AM3/7/08
to version...@googlegroups.com, smc...@edfinancial.com
The API will not "tree" the results in this fashion, but you can use one query to get all the items in a sprint by using the super type of Story and Task, which is Workitem. Can you send the queries you've been using and I can help you formulate them into one query?
-Maggie

Maggie Bullington

unread,
Mar 7, 2008, 11:33:26 AM3/7/08
to Sandra McLeod, version...@googlegroups.com
Ok, here it is:

http://localhost/versionone8.0/rest-1.v1/Data/Workitem?sel=Workitem.Name,Workitem.Owners.Nickname,Workitem.Timebox.Name,Workitem.Scope.Name,Story.Estimate,Story.Children[AssetState!='Deleted'].DetailEstimate.@Sum,Story.Status.Name,Story.Children[AssetState!='Deleted'].ToDo.@Sum,Story.Children[AssetState!='Deleted'].Actuals.Value.@Sum,Story.ID.Number,Task.DetailEstimate,Task.ToDo,Task.Actuals.Value.@Sum,Task.Parent.ID.Number&where=Workitem.Timebox.AssetState='Active';Workitem.Scope.Name='Release%201.0';Workitem.AssetState!='Deleted'

The key here is to query on Workitem, then to qualify *every* single attribute thereafter, as either Workitem.Something (for generic things like name) or Story.Something (for story attributes) or Task.Something (for Task attributes). Note that this query is also going to return any Defects and Tests that you have defined in that Timebox.

-Maggie

-----Original Message-----
From: Sandra McLeod [mailto:SMc...@edfinancial.com]
Sent: Friday, March 07, 2008 11:03 AM
To: Maggie Bullington; version...@googlegroups.com
Subject: RE: Getting list of Stories And Tasks in a sprint

Hi Maggie!

Here are the queries I've been using:


To get the list of Stories (some of which don't have tasks assigned
yet):


instance/rest-1.v1/Data/Story?sel=Name,Estimate,Children[AssetState!='De
leted'].DetailEstimate.@Sum,Status.Name,Children[AssetState!='Deleted'].
ToDo.@Sum,Children[AssetState!='Deleted'].Actuals.Value.@Sum,Owners.Nick
name,Timebox.Name,Scope.Name,ID.Number&where=Timebox.AssetState='Active'
;Scope.Name=<myProject>


To get the list of Tasks (including ID of parent story for merging
purposes)


instance/rest-1.v1/Data/Task?sel=Name,DetailEstimate,ToDo,Actuals.Value.
@Sum,Owners.Nickname,Parent.ID.Number&where=AssetState!='Deleted';Timebo
x.AssetState='Active';Parent.Scope.Name=<myProject>


The result that I'm looking for is a list of stories (with rolled-up
estimates, actuals, todo, etc) and the list of tasks defined for each
story (with detailed estimate, actual, todo, etc. for each task).


Thanks for your help!
-Sandra

TheMcL...@gmail.com

unread,
Mar 7, 2008, 12:14:12 PM3/7/08
to VersionOne-dev
That's just what I needed! Thanks so much for your help on this,
Maggie!

On Mar 7, 11:33 am, Maggie Bullington
<maggie.bulling...@versionone.com> wrote:
> Ok, here it is:
>
> http://localhost/versionone8.0/rest-1.v1/Data/Workitem?sel=Workitem.N...[AssetState!='Deleted'].DetailEstimate.@Sum,Story.Status.Name,Story.Childre­n[AssetState!='Deleted'].ToDo.@Sum,Story.Children[AssetState!='Deleted'].Ac­tuals.Value.@Sum,Story.ID.Number,Task.DetailEstimate,Task.ToDo,Task.Actuals­.Value.@Sum,Task.Parent.ID.Number&where=Workitem.Timebox.AssetState='Active­';Workitem.Scope.Name='Release%201.0';Workitem.AssetState!='Deleted'
>   Sandra- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages