I tried to commit this to the project, but I guess that I don't have the
correct rights to do this, so I guess I am going to do it right here
instead.

I personally think, that we shouldn't list any task/phase per se, but limit
it to the once that are not cancelled. Internally we got the problem, that
the person responsible for adding tasks may not always do it correctly on
the first go, so the gantt Chart got littered with a huge ammount of
cancelled tasks. 

Alternatively,we could also think about adding a third color to the chart
that displays the cancelled tasks accordingly...



Within specialpurpose/projectmgr/webapp/projectmgr/project/ganttchart.ftl, I
chaged:

"
<#list phaseTaskList as t>     <#if t.workEffortTypeId == "PHASE">        
g.AddTaskItem(new JSGantt.TaskItem(${t.phaseNr}, "${t.phaseName}", "", "",
"00ff00", "", 0, "", 0, 1, 0, 1));     </#if>     <#if t.workEffortTypeId ==
"TASK">         g.AddTaskItem(new
JSGantt.TaskItem(${t.taskNr},"${t.taskName}","${t.estimatedStartDate}",
"${t.estimatedCompletionDate}","009900", "${t.url}", 0 ,
"${t.resource?if_exists}", ${t.completion?if_exists} , 0, ${t.phaseNr},
1<#if t.preDecessor?exists>, ${t.preDecessor}</#if>));     </#if> </#list>
"



to

"<#list phaseTaskList as t>
<#...@all: I think it makes a lot more sense to filter all cancelled
projects/phases/tasks... Otherwise the Gantt Chart gets cluttered and there
is no way of telling which tasks are cancelled and which are not without
opening...
 -->
<#if t.currentStatusId?? && !t.currentStatusId?contains("PTS_CANCELLED")>
    <#if t.workEffortTypeId == "PHASE">
        g.AddTaskItem(new JSGantt.TaskItem(${t.phaseNr}, "${t.phaseName}",
"", "", "00ff00", "", 0, "", 0, 1, 0, 1));
    </#if>
    <#if t.workEffortTypeId == "TASK">
        g.AddTaskItem(new
JSGantt.TaskItem(${t.taskNr},"${t.taskName}","${t.estimatedStartDate}",
"${t.estimatedCompletionDate}","009900", "${t.url}", 0 ,
"${t.resource?if_exists}", ${t.completion?if_exists} , 0, ${t.phaseNr},
1<#if t.preDecessor?exists>, ${t.preDecessor}</#if>));
    </#if>
    </#if>
</#list>"


I know this is only a minor improvement, but hey, perhaps it will be of use
to others facing the same problem as well ;)
-- 
View this message in context: 
http://www.nabble.com/Removing-cancelled-tasks-from-the-gantt-chart-tp21562696p21562696.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Reply via email to