I'm using the following 3 queries in order to get a list of Task/User Story/Feature relationship in a given Sprint (Iteration)
I'm no Odata expert, but it would seem in some way I could combine the 3 queries into 1 to retrieve Task, Parent (User Story) Parent (Feature) and associated Assigned Usernames.
Is this possible or could this be done another way?
Get Task and parent User Stories
https://analytics.dev.azure.com/{org}/{projectName}/_odata/v3.0-preview/WorkItems?$select=AssignedToUserSK,WorkItemId,Title,State,WorkItemType,ParentWorkItemId,RemainingWork,CompletedWork,OriginalEstimate&$expand=Parent($select=WorkItemId,Title,State,WorkItemType,ParentWorkItemId,StoryPoints,StackRank)&$filter=Iteration/IterationPath eq '{sprint}' and WorkItemType eq 'Task'";
Get parent Feature of User Stories (from above)
https://analytics.dev.azure.com/{org}/{projectName}/_odata/v3.0-preview/WorkItems?$select=WorkItemId, Title, State, &$filter=WorkItemId in ({parentStoryFeatureIdsStr})
Get Work Item and Assigned User Name
https://analytics.dev.azure.com/{org}/{projectName}/_odata/v3.0-preview/WorkItems?$select=WorkItemId,&$expand=AssignedTo($select=UserName)&$filter=Iteration/IterationPath eq '{sprint}' and WorkItemType eq 'Task'"