How to create a Task belonging to an Iteration using Rally Api and .NET

混江龙づ霸主 提交于 2019-12-10 20:08:42

问题


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.


回答1:


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);


来源:https://stackoverflow.com/questions/7825345/how-to-create-a-task-belonging-to-an-iteration-using-rally-api-and-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!