Commit ab0e7264 authored by Ana Rute Mendes's avatar Ana Rute Mendes 🌈

CCU: create progress bar only if task has children

If the task has no children it doesn't make much sense
to display the progress bar as the progress can only be 0 or 100%
parent 46b61d7b
......@@ -199,8 +199,12 @@ final class ProjectBoardTaskCard extends Phobject {
->setIcon('fa-circle ' . $rag_status);
$card->addAttribute($rag_icon);
$task_children = $task->loadDependsOnTaskPHIDs();
$task_progress = [];
if ($task_children) {
$task_progress = $task->getTaskProgress($viewer);
if ($task_progress['total_points'] > 0) {
}
if ($task_children && $task_progress['total_points'] > 0) {
$bar = id(new PHUISegmentBarView())
->setLabel(pht(
'Progress: %s/%s points',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment