i have a Hierarchical structure like this in which a Feature can have many User Stories each having one to many Tasks.
But a User Story may have no parent Feature as well as some Task may have no parent User Story
F1
-->U1,U2,U3
--->t1,t2,t3
I need a Wiql Query in c# by which for any Taskid input I get its parent storyid (or 0 if it has no parent) along with this latter parent Feature id (0 if it has no parent User Story) and name ('other' if Feature id is 0)
You may find any parent branch for work item with this query:
You can use this code to get a list of parents:
Also you can modify the last cycle and get parent info (user story or feature)