svn commit: r1725257 - /ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1725257 - /ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy

jleroux@apache.org
Author: jleroux
Date: Mon Jan 18 13:08:12 2016
New Revision: 1725257

URL: http://svn.apache.org/viewvc?rev=1725257&view=rev
Log:
A patch from "Ralph" (info at agentur-m3 dot de) for "ProjectMgr: GanttChart fails, in case of dependencies for tasks" https://issues.apache.org/jira/browse/OFBIZ-6842

the problen is in line 127:
taskInfo.preDecessor = latestTaskIds
This line causes brackets around ids (e.g.: [10098] )
And these brackets cannot be processed by jsgantt.
So in case of dependencies the ganttchart will not be displayed.

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy?rev=1725257&r1=1725256&r2=1725257&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy Mon Jan 18 13:08:12 2016
@@ -123,8 +123,17 @@ if (phases) {
                     wf = preTask.getRelatedOne("FromWorkEffort", false);
                     latestTaskIds.add(wf.workEffortId);
                 }
+                count = 0;
                 if (UtilValidate.isNotEmpty(latestTaskIds)) {
-                    taskInfo.preDecessor = latestTaskIds;
+                    taskInfo.preDecessor = "";
+                    for (i in latestTaskIds) {
+                        if (count > 0) {
+                            taskInfo.preDecessor = taskInfo.preDecessor +", " + i;
+                        } else {
+                            taskInfo.preDecessor = taskInfo.preDecessor + i;
+                        }
+                        count ++;
+                    }
                 }
                 ganttList.add(taskInfo);
             }