好的,我知道如何插入任务并将其与用户故事关联,但是现在我如何插入用户故事并将其与工作区和项目关联。这是我到目前为止所拥有的..
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;
最佳答案
我尝试了一下,它奏效了!
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;
因此,您必须使用引用。希望这对别人有帮助!