Managing Estimated and Milestone Tasks

In Microsoft Project, milestones and estimated tasks are used to track planning uncertainty and project checkpoints.

  • A milestone usually has zero duration and represents a critical project event or deadline.
  • An estimated task has uncertain or provisional duration, marked until further clarification.

Understanding Estimated and Milestone Tasks

Aspose.Tasks for .NET provides APIs to check and manage whether a task is estimated or a milestone programmatically.

The Task class exposes the following fields of the Tsk type:

Checking in Microsoft Project

In Microsoft Project, you can check whether a task is estimated or a milestone by:

Check if a task is a milestone or estimated

Example: Finding Estimated and Milestone Tasks

The following code demonstrates how to check if tasks are estimated or milestones using Aspose.Tasks for .NET:

 1Project project = new Project("New Project.mpp");
 2
 3// Create a ChildTasksCollector instance
 4ChildTasksCollector collector = new ChildTasksCollector();
 5
 6// Collect all the tasks from RootTask using TaskUtils
 7TaskUtils.Apply(project.RootTask, collector, 0);
 8
 9// Parse through all the collected tasks
10foreach (Task task in collector.Tasks)
11{
12    string strEst = (task.Get(Tsk.IsEstimated)) ? "Estimated" : "Non-Estimated";
13    string strMileStone = (task.Get(Tsk.IsMilestone)) ? "Milestone" : "Non-Milestone";
14    Console.WriteLine(task.Get(Tsk.Name) + " : " + strEst);
15    Console.WriteLine(task.Get(Tsk.Name) + " : " + strMileStone);
16}

This example iterates over project tasks and programmatically determines whether they are marked as estimated or milestones.

Key Notes

FAQ

Q: Can a task be both estimated and a milestone?

Q: What is the default milestone rule in Microsoft Project?

Q: Do estimated and milestone flags affect the critical path?

Q: Does Aspose.Tasks support reading and writing these properties in both MPP and XML formats?

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.