开发者

How to set the "Plan Work" (EstimatedHours) for a Task in StarTeam SDK?

I can't figure out how to set the EstimatedHours property from the StarTeam SDK. The property EstimatedHours is readonly, and I can't figure out any way to set the value from the SDK, though through the UI you can set the "Plan, Work" field.

How to set the "Plan Work" (EstimatedHours) for a Task in StarTeam SDK?

Setting the EstimatedStart/Finish doesn't work:

var task = new Borland.StarTeam.Tas开发者_如何学Pythonk(cr.ParentFolder);
task.Name = "Name";
task.Notes = "Notes";
// task.EstimatedHours = 4.0; // readonly property
task.EstimatedStart = DateTime.Now;
task.EstimatedFinish = DateTime.Now.AddHours(4);

task.Update();


The only way I have figured out to set the Estimated Hours was with database access and a SQL query:

UPDATE t
   SET StTaskEstimatedHours = 4
FROM dbo.syn_Task t
WHERE t.EndModifiedTime = 0 AND t.DeletedTime = 0
  AND t.StTaskNumber = {task.Number}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜