Import from MS Project - duration misscalculation

Hello,
While working with your gantt import from MS Project I’ve come across 2 incorrect duration calculations.

1 When task in MS Project doesn’t end on a working day, the duration is longer as it should be.

2 Once I indent and outdent task and then import it with your API, the duration is corrupted.

I’ve prepared and attached an example .mpp file with project and .har file with requests from your sample. There you can see ‘Task 3’, which ends on a non-working day and ‘Task 4’ which is a former sub-task as described in the point 2. ‘Task 3’ duration is 5 in MS Project and your API returns 6. ‘Task 4’ duration is 6 and your API returns 11.DurationMisscalculation.mpp (352 KB)
duration (1.9 MB)

Hello Marques,
When you import the data from MS Project, it returns only the start_date and duration parameters. There is no way to obtain the end_date parameter to have the same dates as in MS Project. The dev team will try to fix it in the future, but I cannot give you any ETA.
So, now, Gantt needs to calculate the end_date from the imported data. It fully depends on the Gantt configuration. When the work_time is turned off, the tasks are mostly loaded with the same dates.

However, I tried to experiment with your file and it seems that you have split tasks.
When I add a regular task to the same dates, it is imported correctly:

I added it as a bug to our internal tracker. The dev team will fix it in the future, but I cannot give you any ETA.

Hi Ramil.

Something similar is presented to me. Try to configure the parameters of hours and working days in the gantt dhtmlx identical to MS Project, but the import does not match in duration with some tasks but in most others.

It would help a lot if the import returned the end date by API.

Hi,

differences in time calculation vary on a combination of configs used in gantt, and usually requires a data sample to investigate.
We don’t have a general solution (i.e. we can’t make dates/duration 100% match all the time), since there are fundamental differences in the way date calculations work in dhtmlxGantt vs MS Project, which in some case leads to different results.
Any specific use case usually can be tweaked to normal by applying appropriate settings.

As for your suggestion, we can include field from the MS Project in the output data, so if needed you could post-process the imported data as you see fit

https://docs.dhtmlx.com/gantt/desktop__export_msproject.html#importfrommsproject

From now, tasks that are returned from gantt.importFromMSProject call now contain extra property project.data[0].$raw, which contain values some values from the original Task record from MPP file.

Currently, it contains the following properties:

  • ActualDuration
  • ActualFinish
  • ActualStart
  • Duration
  • Finish
  • Start
  • Work