Free Support Forum -

Aspose.tasks split task

I have tried to find out if the split task is supported in any latest versions of aspose.tasks. But, I couldn't find any besides the answer 'NO' done in 2007. My company just purchased it, and the split task has to be supported in our work. Does any later version support this?

This message was posted using Aspose.Live 2 Forum


Thank you a lot for your interest in Aspose.Tasks.

You can implement the task split using resource assignment SplitTask method. See a sample below:
<span lang=“EN-US” style=“font-size:10.0pt;font-family:“Courier New”;color:#2B91AF;
<span lang=“EN-US” style=“font-size:10.0pt;font-family:“Courier New”;color:#2B91AF;
mso-ansi-language:EN-US;mso-no-proof:yes”> ProjectReader<span lang=“EN-US” style=“font-size:10.0pt;font-family:“Courier New”;mso-ansi-language:EN-US;
mso-no-proof:yes”> reader = new ProjectReader();
<span lang=“EN-US” style=“font-size:10.0pt;font-family:“Courier New”;mso-ansi-language:EN-US;
mso-no-proof:yes”> Project project = reader.Read(“Project1.xml”);
Task task = project.GetTaskByUid(1);
ra in
ra.SplitTask(new DateTime(2010,
10, 14), new DateTime(2010,
10, 20), project.Calendar);

First of all: Thank you for the snippet of code. It works.

Two possible problems to watch out for:

The task must have CanLevelingSplit equal to true, and the ResourceAssignment must have WorkContourType cannot be set to flat. I set mine to Contoured. If you're reading an MS project file that was created by Project and then splitting tasks, this won't be a problem. If you're creating tasks and resource assignments from the ground-up like I am, you'll have to be aware of these flags.


Thank you a lot for your feedback!

Yes you are completely right, the CanLevelingSplit flag has to be set to true and WorkContourType must be set to Contoured too in common case. We are going to add a common sample to our product documentation.

A new issue ‘Add task split sample to product documentation.’ with ID = 20731 has been created and linked to this forum thread.

Thank you a lot for your correction.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.