I am able to take userstory actual, estimate and Values from its Task.But when tasks are not there for an user story i have to take values from the userstories detail page from rally.
Ex:(i need to fetch as like below from rallyrestapi c# toolkit) https://rally1.rallydev.com/#/262768386856d/detail/defect/161729744764
Currently i tried as below , but its not working out
// Query for UserStories
[![Request storyRequest = new Rally.RestApi.Request("hierarchicalrequirement");
storyRequest.Workspace = workspaceRef;
// storyRequest.Project = projectRef;
storyRequest.ProjectScopeUp = projectScopingUp;
storyRequest.ProjectScopeDown = projectScopingDown;
storyRequest.Fetch = new List<string>()
{
"Name",
"ObjectID",
"ScheduleState",
"State",
"FormattedID",
"CreationDate",
"ReleaseDate",
"PlanEstimate",
"Iteration",
"StartDate",
"EndDate",
"Release",
"ScheduleState",
"Tasks",
};
string userstoryId = "";
long userstoryObjId ;
storyRequest.Query = new Query("Iteration.Name", Query.Operator.Equals, myIterationName);
QueryResult queryStoryResults = rallyRestApi.Query(storyRequest);
ConvertToJSon(queryStoryResults);
// Fetch Actual and Estimated Time request for task
foreach (var userstory in queryStoryResults.Results)
{
Rally.RestApi.Request tasksRequest = new Rally.RestApi.Request(userstory\["Tasks"\]);
QueryResult queryTaskResult = rallyRestApi.Query(tasksRequest);
}
Request details = new Rally.RestApi.Request("details");
details.Workspace = workspaceRef;
// storyRequest.Project = projectRef;
details.ProjectScopeUp = projectScopingUp;
details.ProjectScopeDown = projectScopingDown;
details.Fetch = new List<string>()
{
"Estimate",
"Actuals",
"ToDo"
};
storyRequest.Query = new Query("Defect.ObjectID", Query.Operator.Equals, "298510499032");
QueryResult detailsdata = rallyRestApi.Query(details);][1]][1]
Unauthorized 401 error it gives. Please guide me how to fetch the above fields from rally details page.