3

好的,我了解如何插入任务并将其与用户故事相关联,但现在我如何插入用户故事并将其与工作区和项目相关联。这是我到目前为止所拥有的..

DynamicJsonObject toCreate = new DynamicJsonObject(); 
toCreate["Name"] = "My Test User Story";
toCreate["Description"] = "This is the description of the test User Story";

// these do not exist
//toCreate["Iteration.Name"] = "Iteration Name";
//toCreate["Workspace.ObjectID"] = "123456";
//toCreate["Project.ObjectID"] = "456789";

CreateResult createResult = _restApi.Create("hierarchicalrequirement", toCreate);
bool success = createResult.Success;
4

3 回答 3

6

我试过了,它奏效了!

RallyRestApi _restApi = new RallyRestApi("username", "password", "https://rally1.rallydev.com", "1.27");
DynamicJsonObject toCreate = new DynamicJsonObject();
toCreate["Name"] = myUserStory.Name;
toCreate["Description"] = myUserStory.Description;

// these are the important ones..
toCreate["Workspace"] = "/workspace/456879854";
toCreate["Project"] = "/project/4573328835";
toCreate["Iteration"] = "/iteration/4459106059";

CreateResult createResult = _restApi.Create("hierarchicalrequirement", toCreate);            
bool success = createResult.Success;

所以,你必须使用参考。希望这对其他人有帮助!

于 2011-10-21T21:01:07.060 回答
2

这最终给了我一个提示,即用户故事在 RallyDev XML WebService 中意味着“分层要求”。

谢谢!

于 2012-07-05T18:56:35.970 回答
1

还要注意 CreateResult 对象上的 Errors 和 Warnings 集合的内容。它们通常可以提供一些线索来说明为什么某些东西不起作用。

于 2011-10-21T21:12:20.010 回答