Relationship between goals and stories via REST

27 views
Skip to first unread message

Jerry Vasend

unread,
May 9, 2012, 2:48:46 PM5/9/12
to VersionOne-dev
I am retrieving V1 goals and stories via REST. I have both goals and
stories defined with at least some of the stories assigned to at least
one goal. However, when I look at the data extracted, I do not see any
data that would link the stories to the goals. I have googled this and
nothing obvious came up. How can I relate goals to stories based on
data retrieved via REST? I am using ultimate edition from 2011.

Thanks!

Jerry

ibuchanan

unread,
May 9, 2012, 3:58:18 PM5/9/12
to version...@googlegroups.com
Jerry,
 
There are a few places where things may be confusing. I've posted some examples below which anyone can run using the admin/admin credentials.
 
From the Story side, we can see the relationship to Goals using the meta API:
 
From the Goals side, the relationship is a little less clear:
 
You would have to know the hierarchy of assets: Story is a subtype of PrimaryWorkitem is a subtype of Workitem
 
Now armed with the knowledge that it's there, we need to know how to ask for it -- the default query does not return all attributes and relationships. So you need to use the "sel=" parameter.
 
From the Story side, we can ask like this:
(Note: the above query uses the page parameter to make the results come back quick for testing. You may not want to use paging for your end purposes but it's a good idea when testing. Also, the stories in the above result set may not be linked to Goals but you will still see a Goal relation in the XML.)
 
From the Goal side, things are again a little more tricky. If we only care about the Stories linked with Goals, we need to downcast. So we can ask like this:
 
Yours truly,
Ian Buchanan
Product Manager for Platform and Integrations
Reply all
Reply to author
Forward
0 new messages