Question

I am new to the Rally API and just having some trouble creating a Task using the Rally.RestApi library. I need to create a Task (using .NET) and associate it with a User Story (in which the User Story belongs to a certain Iteration).

Do I have to get the User Story first, then add a Task to it? How would I do that?

Thanks.

Was it helpful?

Solution

All objects in Rally have a unique url called a ref. You just need the story's ref to associate the two:

RallyRestApi restApi = new RallyRestApi("myuser@company.com", "password",
    "https://rally1.rallydev.com", "1.27");
DynamicJsonObject newTask = new DynamicJsonObject();
newTask["Name"] = "My New Task";
newTask["WorkProduct"] = "/hierarchicalrequirement/12345"; //your story ref here
CreateResult createResult = restApi.Create("task", newTask);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top