Hi,
I've just done another pass at validating the MS Project Automation Result vs the Aspose.Tasks result. The intent is to retire the automation.
Once again, I'm finding the number of subtle rules that are applied by MS Project that I need to acocunt for with the Aspose.Tasks routines ... Now that I think I know some of these rules and I thought I would share them.
1) DefaultStartTime and DefaultFinishTime ...
MS Project will add the defaultstarttime and the defaultfinishtime to start and end dates if they don't have them. This can cause a day to be lost if they are not set.
2) Duration is calculated based upon only entering Start and Finish dates.
MS Project provides a valid duration given the task type and the start and end dates. This needs to be calculated to avoid problems. Calendar.GetWorkingHours between start and finish dates works fine. A GetFinishDate (given start date and duration) would be nice (I could not find one).
3) Finish Date is set based upon longest date in plan (given start date).
Must set a start and finish date (not automatically set).
4) WBS and WBSLevel set for tasks.
Must set WBS and WBSLevel for tasks (not automatic). A calcWBS would be nice. Maybe there is a quick way to do this with TaskUtils..?
5) Assigning resources to a completed task
MS Project handles the calculation of work and determines if the task is complete and sets the actual time to the remaining time and the remaining time = 0. The routine also takes into account the type of task.
6) .UpdateReferences...
I'm still not sure I understand the mprjdoc.UpdateReferences method. This seems to not set parents for new tasks. I'm surprised that these are not done automatically when the task is added as a child. I seem to be using this in a lot of places to make sure 'object not found' does not occur. For example, if a task is added as a child, I would expect the parent to be obvious and the reference can be updated.
BTW: there are some calculations I'm glad are not being done automatically... splitting effort on effort driven tasks. Only if the flag is set if you do add this at some point (I'll always keep it off).
As you can see, there is a lot of work MS Project does behind the scenes. I'm slowly starting to discover this ...
If you find any others, please share them... I think I've only scratched the surface... To actually replace MS Project automation means I need to understand some of these subtle differences.
Regards, Bruce