DATA_ERROR

Dear Sirs,

we are evaluating your great dhtmlxGantt but we are stuck with a DATA_ERROR, very likely due to us.

We modified the example dhtmlxGantt/samples/01_initialization/1_readonly.html
to load the following data:

var project1 = new GanttProjectInfo(1, "1 My Project", new Date(2010, 9, 8)); var parentTask1 = new GanttTaskInfo(2, "1.1 Phase 1", new Date(2010, 9, 8), 1040, 50, ""); parentTask1.addChildTask(new GanttTaskInfo(3, "1.1.1 Task 1", new Date(2010, 11, 6), 320, 40, "")); parentTask1.addChildTask(new GanttTaskInfo(4, "1.1.2 Task 2", new Date(2011, 0, 10), 288,90, ""));

The durations should correspond to:

year month day duration (h) start end
2010 9 8 1040 8/10/2010 15/02/2011
2010 11 6 320 6/12/2010 15/01/2011
2011 0 10 288 10/1/2011 15/02/2011

We get the error:

DATA_ERROR Increase duration of parent task (2) or reduce EST of child task (4) or reduce duration of child task(4)

Any suggestion?

Many thanks

it says that child task does not fit into parent task limits.

Hi,

what the message says is clear, but what about the error causes? We’re also evaluating the product, and we found the same error.
We have a TASK that begins on 2011-02-19, and has duration of 11 days:

                    <name>
			<![CDATA[task name]]>
		</name>
		<est>
			<![CDATA[2011,02,19]]>
		</est>
		<duration>
			<![CDATA[11]]>
		</duration>

and there are two childtasks. One of them has the same start date and duration of the parent task:

                            <name>
			        <![CDATA[childtask-one's name]]>
		        </name>
			<est>
				<![CDATA[2011,02,19]]>
		        </est>
			<duration>
			       <![CDATA[11]]>
			</duration>

The second as a diferent start date and duration:

                            <name>
				<![CDATA[childtask-two's name]]>
			</name>
			<est>
				<![CDATA[2011,03,01]]>
			</est>
			<duration>
				<![CDATA[1]]>
			</duration>

Could that be an error due to the fact that february ends on day 28?

I saw that the javascript method getPosOnDate do a direct multiplication:

GanttChart.prototype.getPosOnDate = function(est)
{
return (est - this.startDate) / (60 * 60 * 1000) * this.hourInPixels;
};

but I could not see where this difference of days is considered.

Hi,

we have the same error, I think that it occurs when the start date of the parent task is around the end of the month… Excuse my english, I’m better in french. I hope that the developement team will fix this bug and provide us shortly the features about time scale

The duration is in hours, there should be no issues even at the end of a month. Please send me by email your XML.

the problem is with leading zeroes -
2011,03,01

it should be
2011,3,1

all the dates without leading zeroes.