You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2007/12/18 07:16:53 UTC

svn commit: r605100 - /ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl

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>