Using Aspose.Tasks 24.8.0. When I create a task link between a manually scheduled task and automatically scheduled one the scheduler does not move the automatically scheduled task. For example if I have a task that is manually scheduled that starts on 2024/08/22 08:00 and ends on 2024/08/24 16:00 And create a relation to automatically scheduled task that first starts on 2024/08/22 08:00 and end on 2024/08/23 16:00. The link created is Finish-To-Start. After this link creation the automatically scheduled tasks’ startDate should move to be after the end on manual task, but the scheduler returns the same start and Finish dates as originally was provided.
MS Project does move the auto task in this case.
@KornelijusS ,
could you please share your complete sample runnable code with us that we can use to reproduce this problem at our end?
using Aspose.Tasks;
using Aspose.Tasks.Util;
var project = new Project();
project.Set(Prj.StartDate, new DateTime(2024, 9, 22, 8, 0, 0));
project.CalculationMode = CalculationMode.Automatic;
var manualTask = project.RootTask.Children.Add("ManualTask");
manualTask.Set(Tsk.IsManual, true);
manualTask.Set(Tsk.Start, new DateTime(2024, 9, 23, 8,0,0));
manualTask.Set(Tsk.Finish, new DateTime(2024, 9, 25, 17, 0, 0));
var relatedAutoTask = project.RootTask.Children.Add("RelatedAutoTask");
relatedAutoTask.Set(Tsk.IsManual, false);
var link = project.TaskLinks.Add(manualTask, relatedAutoTask, TaskLinkType.FinishToStart);
project.Recalculate(true);
var collector = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, collector, 0);
foreach (var task in collector.Tasks)
{
Console.WriteLine($"{task.Name}: Start - {task.Start}; End - {task.Finish}");
}
Console.WriteLine($"{project.TaskLinks[0].PredTask.Name}: {project.TaskLinks[0].PredTask.Finish} - {project.TaskLinks[0].SuccTask.Name}: {project.TaskLinks[0].SuccTask.Start} -- {project.TaskLinks[0].LinkType}");
The result hare should be that the relatedAutoTask Start is 2024/09/26 08:00:00, but instead the task is not moved. If I create these two tasks in MSProject and do the same thing the relatedAutoTask would be moved. This works in Aspose only if neither of the tasks are manually scheduled.
@KornelijusS,
thank you for the example. We were able to reproduce the issue.
The following new ticket was opened in our internal issue tracking system. The fix will be delivered according to the terms mentioned in Free Support Policies.
Issue ID(s): TASKSNET-11299
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.