How to set the “Work Plan” (estimated hours) for a task in the StarTeam SDK?

I cannot figure out how to set the EstimatedHours property from the StarTeam SDK. The EstimatedHours property is read-only, and I cannot determine how to set the value from the SDK, although through the user interface you can set the "Planning, work" field.

NewTaskEstimate.png

Setup EstimatedStart/Finishdoes not work:

var task = new Borland.StarTeam.Task(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();
+3
source share
1 answer

The only way I decided to set the estimated hours is to access the database and 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
source

Source: https://habr.com/ru/post/1753521/


All Articles