[
https://issues.apache.org/jira/browse/OFBIZ-6842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux updated OFBIZ-6842:
-----------------------------------
Description:
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.
To fix it, the ids could be processed in a loop:
{code}
count = 0;
if (UtilValidate.isNotEmpty(latestTaskIds)) {
taskInfo.preDecessor = "";
for (i in latestTaskIds) {
if (count>0) {
taskInfo.preDecessor = taskInfo.preDecessor +", " + i;
} else {
taskInfo.preDecessor = taskInfo.preDecessor + i;
}
count ++;
}
}
{code}
was:
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.
To fix it, the ids could be processed in a loop:
count = 0;
if (UtilValidate.isNotEmpty(latestTaskIds)) {
taskInfo.preDecessor = "";
for (i in latestTaskIds) {
if (count>0) {
taskInfo.preDecessor = taskInfo.preDecessor +", " + i;
} else {
taskInfo.preDecessor = taskInfo.preDecessor + i;
}
count ++;
}
}
> ProjectMgr: GanttChart fails, in case of dependencies for tasks
> ---------------------------------------------------------------
>
> Key: OFBIZ-6842
> URL:
https://issues.apache.org/jira/browse/OFBIZ-6842> Project: OFBiz
> Issue Type: Bug
> Components: specialpurpose/appserver
> Affects Versions: 12.04.05
> Reporter: Ralf
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> 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.
> To fix it, the ids could be processed in a loop:
> {code}
> count = 0;
> if (UtilValidate.isNotEmpty(latestTaskIds)) {
> taskInfo.preDecessor = "";
> for (i in latestTaskIds) {
> if (count>0) {
> taskInfo.preDecessor = taskInfo.preDecessor +", " + i;
> } else {
> taskInfo.preDecessor = taskInfo.preDecessor + i;
> }
> count ++;
> }
> }
> {code}
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)