Hi, in an server side application (c#) I create some tasks and set some attributes depending on informations but even if I add some actual work and set actual start date, the progress bar are not displayed when I open the file (it’s a brand new file created from scratch with an upload stream)
Here is a sample of my code
docTask.Set(Tsk.Type, TaskType.FixedWork);
docTask.Set(Tsk.IsEffortDriven, true);
docTask.Set(Tsk.DurationFormat, TimeUnitType.Day);
docTask.Set(Tsk.ConstraintType, ConstraintType.StartNoEarlierThan);
docTask.Set(Tsk.Hyperlink, docTask.Get(Tsk.Name));
docTask.Set(Tsk.HyperlinkAddress, lotDoc.MFilesURL(false, MFilesURLType.MFilesURLTypeOpen, UrlTargetPlatform.Desktop));
docTask.Set(Tsk.Start, startDate);
docTask.Set(Tsk.ConstraintDate, startDate);
docTask.Set(Tsk.Duration, project.GetDuration(lotDoc.GetPropertyAs<double>(Configuration.PlanSettings.CalculatedSettings.PDCalculatedDuration), TimeUnitType.Day));
docTask.Set(Tsk.Work, project.GetDuration(lotDoc.GetPropertyAs<double>(budgetWorkPD), TimeUnitType.Hour));
if(lotDoc.GetPropertyAs<double>(actualCalculatedWorkPD)>0 && advancementPD < 100)
{
docTask.Set(Tsk.ActualWork, project.GetDuration(lotDoc.GetPropertyAs<double>(actualCalculatedWorkPD), TimeUnitType.Hour));
docTask.Set(Tsk.ActualStart, lotDoc.GetPropertyAs<DateTime>(Configuration.PlanSettings.ActualSettings.PDActualStartDate));
docTask.Set(Tsk.Finish, lotDoc.GetPropertyAs<DateTime>(Configuration.PlanSettings.CalculatedSettings.PDEndDate));
}
if (lotDoc.GetPropertyAs<double>(actualCalculatedWorkPD) > 0 && advancementPD >= 100)
{
docTask.Set(Tsk.ActualWork, project.GetDuration(lotDoc.GetPropertyAs<double>(actualCalculatedWorkPD), TimeUnitType.Hour));
docTask.Set(Tsk.ActualStart, lotDoc.GetPropertyAs<DateTime>(Configuration.PlanSettings.ActualSettings.PDActualStartDate));
docTask.Set(Tsk.ActualFinish, lotDoc.GetPropertyAs<DateTime>(Configuration.PlanSettings.ActualSettings.PDActualEndDate));
}
docTask.Set(Tsk.Work, project.GetDuration(lotDoc.GetPropertyAs<double>(budgetWorkPD), TimeUnitType.Hour));
As you can see on this screenshot the tasks seems to be created correctly with actual work and actualstart date but the progress bar aren’t there…
CaptureGCV1.JPG (117.0 KB)