Hello Aspose Team,
I’m using Aspose Tasks for .NET 21.2.0 (latest vesion when writting this ticket, and I also have the latest version of MSProject). Splitting a simple task in 2 is not working in several cases:
- when the second part of the split ends just before a week-end (ends on a Friday)
- when the second part of the split starts before a week-end and finishes after the week-end
- when the second part of the split starts after the week-end
I wrote a simple project with a few examples (the project is a simple Windows command line application, using .NET Core 3.1 and C#). Each example creates a simple task, it starts on a Monday and lasts for 3 days, splits the task in 2, the first split lasts for 1 day (so only on Monday) and the second split lasts for 2 days:
1/ the second split starts on Wednesday (same week as the first split, from Wednesday to Thursday): it works
2/ the second split starts on Thursday (same week as the first split, from Thursday to Friday): it fails
3/ the second split starts on Friday (same week as the first split): it fails
4/ the second split starts on the next Tuesday (1 week and 1 day after the first split): it fails
For all the cases, I attached the output MPP file. For the cases 2 to 4 which are all failing, I also attached the expected MPP files. Feel free to change the dates and try by yourself!
As you can see in the attached code, the “SplitTask” call is surounded by a try/catch block, because it throws an “ArgumentOutOfRangeException” (of course, because the SplitTask fails, the task is not splitted and the MPP file doesn’t match the expected split).
Could you have a look? We post several tickets about this issue (#180116 with version 18.7.1, #203823 with version 19.10), it seems to have been fixed several times but it comes back…
Thanks!
Christophe
SplitTask.zip (170.3 KB)