Forum Discussion
Why IsMilestone Task property Can I set on second publication via CSOM?
Hello.
Why IsMilestone Task property Can I set on second publication via CSOM?
I have this code:
csom.DraftProject draft = project.CheckOut();
context.Load(draft.Tasks, dt => dt.Where(t => t.Id == taskUID));
context.ExecuteQuery();
csom.DraftTask task = draft.Tasks.First();
task.ActualStart = task_Act_Start;
task.ActualFinish = task_Act_Start;
task.PercentComplete = 100;
task.IsLockedByManager = true;
task.IsMilestone = true;
draft.Update();
csom.JobState jobState = context.WaitForQueue(draft.Publish(true), Consts.DEFAULTTIMEOUTSECONDS);
BUT task.IsMilestone = true; works only after second publication:
csom.DraftProject draft = project.CheckOut();
context.Load(draft.Tasks, dt => dt.Where(t => t.Id == taskUID));
context.ExecuteQuery();
csom.DraftTask task = draft.Tasks.First();
task.IsMilestone = true;
draft.Update();
csom.JobState jobState = context.WaitForQueue(draft.Publish(true), Consts.DEFAULTTIMEOUTSECONDS);
How can I do it with one publication?