我正在尝试使用以下示例代码创建任务:
fields = {}
fields["Name"] ="test"
fields["Workspace"] = "https://rally1.rallydev.com/slm/webservice/1.42/workspace/1234567.js"
fields["Project"] = "https://rally1.rallydev.com/slm/webservice/1.42/project/1234567.js"
fields["Owner"] = "https://rally1.rallydev.com/slm/webservice/1.42/user/1234567.js"
fields["Estimate"] = '0.25'
@rally.create(:task, fields)
运行时出现以下错误:
Error on request - https://rally1.rallydev.com/slm/webservice/1.42/Task/create.js -
{:errors=>[
"Validation error: Task.Project should not be null",
"Validation error: Task.WorkProduct should not be null"
], :warnings=>[
"API status is Deprecated and will become Not Supported on 2014-05-08",
"Ignored JSON element Task.Project during processing of this request."
]}
这些错误看起来很奇怪。一方面,他们表示 api 忽略了 JSON 中的 Task.Project,但随后出现了一个验证错误,即 Task.Project 为空。
我在这里做错了什么?