bardsoftware / ganttproject

Official GanttProject repository.
http://ganttproject.biz
GNU General Public License v3.0
890 stars 310 forks source link

MS Project file import error - modified dates #1935

Closed Danielmanenti closed 3 years ago

Danielmanenti commented 3 years ago

When trying to import a schedule from MS Project the dates are modified.

With the modified dates, the imported schedule is different from the original

Attachment follows log with import error Log ERRO Importação.txt

dbarashev commented 3 years ago

There are many reasons why tasks may change their dates. Please read this document to learn what might be applicable to your project: http://docs.ganttproject.biz/user/troubleshooting-msproject-import/index.html

If you don't see anything which might be relevant, please share a small MS Project file which clearly exposes the problem.

Danielmanenti commented 3 years ago

Hello,

I did the tests informed in your e-mail but the problem continues to occur.

I send an mpp file attachment so you can test and comment me.

When trying to import this file you will see the errors I comment TESTE.zip

Thanks

dbarashev commented 3 years ago

What do you mean when you say "I did the tests but the problem continues"? The document provides an explanation of reasons why the dates may change. If you just read it and don't change anything in your MS Project file, of course the dates will keep changing.

In the attachment you can find a .gan file produced by MS Project import with scheduler switched off. You can switch off the scheduler by editing the following entry in the settings file:

<option id="task.scheduler.disabled" value="false"/>

You need to replace false with true to disable the scheduler. The settings file name is .ganttproject and it sits in your home folder. You can edit it in any text editor.

If you carefully look at the file, you will see that there are many task pairs which are connected with Finish-Start dependencies, but where the start date of a successor task is the same as the end date of a predecessor task. Examples (outline numbers of the tasks):

1.1.3.2 -> 1.1.3.9.1 
1.1.3.4 -> 1.1.3.9.2

I think this is exactly what is written in the 3rd item:

In the original MS Project file tasks have duration less than 1 day and/or task starts on the same day when its predecessor ends. GanttProject's duration granularity is 1 day, and it assumes that task starts in the morning and finishes in the evening, so it is impossible for successor to start at the same day when predecessor finishes.

There are also other issues with dependencies and task start dates which may fall under item 4:

Microsoft Project is known to be somewhat forgiving with respect to dependencies, and it is possible that task with e.g. Finish-Start dependency on its predecessor actually starts earlier than predecessor finishes in the original file. GanttProject is more strict and enforces the constraint.

Example: 1.1.6 -> 1.1.1.10 There is a strong Start-Start dependency, however the start date of 1.1.1.10 is 20 days earlier than the start date of 1.1.6. MS Project doesn't care, but GanttProject scheduler makes the start dates the same. Issue1935.zip

Danielmanenti commented 3 years ago

The files I have from MSProject are from a client and I cannot modify them.

Where in the grantt Project installation folder is the .ganttproject file located?

If I modify the parameter as directed when I import the MS Project file, will it keep the original dates existing in the MS Project file?

dbarashev commented 3 years ago

Where in the grantt Project installation folder is the .ganttproject file located?

I didn't say "installation folder". I said "your home folder". If you're on Windows, it is something like C:\Users\<your user name>

If I modify the parameter as directed when I import the MS Project file, will it keep the original dates existing in the MS Project file?

Actually, no, unfortunately. This option was introduced recently for opening native .gan files (generated by external scripts). However, when I was importing your project, I discovered that it would not work when importing, so I just changed the code locally. I will add the required changes to the importing code too, and they will appear in the next updates.

You should be aware, that with this option GanttProject loses any practical sense as a scheduling software, and becomes basically a software to layout rectangles in rows, not too much different from MS Paint.