diff --git a/module/block/view/waterfallganttblock.html.php b/module/block/view/waterfallganttblock.html.php index 68b5c3132e..a63f49f165 100644 --- a/module/block/view/waterfallganttblock.html.php +++ b/module/block/view/waterfallganttblock.html.php @@ -86,12 +86,12 @@ minTimeGap = Math.min(minTimeGap, endDatetime - startDatetime); item.tasks = []; item.completeTasks = []; - item.progress = 0; + item.progress = Number.parseFloat(item.taskProgress.replace('%', ''), 10); plans.push(item); } else if(item.type === 'task') { - item.progress = Number.parseInt(item.taskProgress.replace('%', ''), 10); + item.progress = Number.parseFloat(item.taskProgress.replace('%', ''), 10); tasks.push(item); } }); @@ -105,7 +105,6 @@ plan = plansMap[plan.parent]; if(typeof(plan) != 'object') return; } - plan.progress += task.progress; if(task.progress === 100) plan.completeTasks.push(task); plan.tasks.push(task); }); @@ -122,7 +121,6 @@ /* Update gantt plans and bars */ $.each(plans, function(index, plan) { - plan.progress = !plan.tasks.length ? 0 : plan.progress / plan.tasks.length; var $plan = $('
'); $plan.append('