bardsoftware / ganttproject

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

After opening a project file the duration of the tasks is not re-computed #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When a task contains sub-tasks, the duration of this task is automatically 
adapted during editing.
But when loading a project file which does not contain the 'duration' for a 
task which has sub-tasks, the duration is not computed; instead it is set to 1.
If the duration of a tasks is touched (either by trying to change it in the 
right side of the ganttproject window or opening the task properties dialog 
ONLY pressing OK - without changing something) ALL durations from ALL tasks are 
automatically and correctly adapted and shown.

So IMHO this re-computation of all durations must also be done directly after 
loading a file.

In the attached file all durations for tasks with subtasks are not set.  The 
file was created by a requirements management tool called 'rmtoo' 
[https://sourceforge.net/projects/rmtoo/].

Original issue reported on code.google.com by floma...@gmail.com on 17 Sep 2010 at 12:02

Attachments:

GoogleCodeExporter commented 9 years ago
Let me change the type because I can't agree that broken files produced by some 
other tool are a bug of GanttProject.

Original comment by dbarashev on 17 Sep 2010 at 12:27

GoogleCodeExporter commented 9 years ago
== Short History ==
A user of 'rmtoo' wants to transfer data from 'rmtoo' into
ganttproject. IMHO this makes sense and might be very helpful. 
AFAIK ganttproject import functionality is somewhat limited to TEXT
files - importing e.g. dependencies is not possible.
The only file format which can handle things like dependencies is the
XML format. Therefore a 'rmtoo' output module was written using
ganttproject XML file format.

== Formal argumentation ==
I'm not really sure what 'a broken file' for ganttproject is:
I did not find any documentation about the input/output format of
ganttproject. Therefore I downloaded the sources and had a closer
look. 
There is a file './ganttproject/data/resources/dtd/ganttproject.dtd'
where a lot attributes are marked as 'required' - but IMHO the file is
never used/referenced. (In the GanttOptions.java is a relict - but it
is not used.)
Therefore the only 'real' documentation is the source code. Example
from TaskTagHandler.java:  

        String duration = attrs.getValue("duration");
        if (duration != null) {
            ....

There is no else case - no info/warning/error is printed when the
attribute is not available. Therefore it was assumed that duration is
optional.

== Substantive argumentation ==
It is mostly impossible for other programs to compute the correct
duration without re-implementing parts of ganttproject. 

== Suggestion ==
IMHO it's only a small change to ganttproject itself to handle tasks
without duration - which would make things for 'external' tools much
easier. 

Alternatively it would be great to have a well defined and simple way
to import structured data into ganttproject.

Original comment by floma...@gmail.com on 17 Sep 2010 at 2:21

GoogleCodeExporter commented 9 years ago
I didn't say that I won't take any action on that.

Original comment by dbarashev on 17 Sep 2010 at 11:49

GoogleCodeExporter commented 9 years ago
I didn't say that I won't take any action on that.

Original comment by dbarashev on 17 Sep 2010 at 11:49