Overtimes in Tasks

In Microsoft Project, tasks can include overtime work and overtime costs to reflect additional effort beyond regular working hours.
Aspose.Tasks for .NET enables developers to programmatically read and update these overtime properties in both MPP and XML formats.

Understanding Task Overtime

The Tsk class provides properties for managing overtime values:

These properties help track extra project expenses and workload adjustments.

Microsoft Project Overtime Work fields

To see a task’s overtime work and cost properties:

  1. In the Task Entry form, select the Insert menu and then Column.
  2. Add the overtime columns.

Getting task overtimes in Aspose.Tasks

The following C# example demonstrates how to retrieve overtime-related values for tasks:

 1Project project = new Project("New Project.mpp");
 2// Read overtime and percentage completion for tasks
 3foreach (Task task in project.RootTask.Children)
 4{
 5    Console.WriteLine(task.Get(Tsk.OvertimeCost));
 6    Console.WriteLine(task.Get(Tsk.OvertimeWork).ToString());
 7    Console.WriteLine(task.Get(Tsk.PercentComplete));
 8    Console.WriteLine(task.Get(Tsk.PercentWorkComplete).ToString());
 9    Console.WriteLine(task.Get(Tsk.PhysicalPercentComplete).ToString());
10
11    // Set percent complete
12    task.Set(Tsk.PercentComplete, 100);
13}

Key Notes

FAQ

Q: Can I set overtime values programmatically when creating tasks?

Q: Do overtime properties affect the critical path?

Q: Are overtime values preserved in MPP and XML formats?

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.