Author: hansbak
Date: Mon Dec 17 22:16:50 2007
New Revision: 605100
URL: http://svn.apache.org/viewvc?rev=605100&view=rev
Log:
avoid error when estimated dates not available in the ganttchart
Modified:
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl
Modified:
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl?rev=605100&r1=605099&r2=605100&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl
(original)
+++
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl
Mon Dec 17 22:16:50 2007
@@ -36,8 +36,16 @@
// Convert the database data to json
<#if tasks?has_content>
<#list tasks as taskNode>
- var dtStart = new
Date("${taskNode.estimatedStartDate?string.short}");
- var dtEnd = new
Date("${taskNode.estimatedCompletionDate?string.short}");
+ <#if taskNode.estimatedStartDate?exists>
+ var dtStart = new
Date("${taskNode.estimatedStartDate?string.short}");
+ <#else>
+ var dtStart = new Date("${chartStart?string.short}");
+ </#if>
+ <#if taskNode.estimatedCompletionDate?exists>
+ var dtEnd = new
Date("${taskNode.estimatedCompletionDate?string.short}");
+ <#else>
+ var dtEnd = new Date("${chartEnd?string.short}");
+ </#if>
<#if taskNode.phaseName?exists>
json.push({high: dtEnd.getTime(), low:
dtStart.getTime(), task: "${taskNode.phaseName}", type: "p"});
<#elseif taskNode.workEffortName?exists>