Enhancement
Major
Detail
Bugfix
Detail
Problem
If milestones within a schedule are so close together that the labels overlap, the option "autom. collision avoidance" should introduce additional lines to distribute the milestones. This option does not work: the schedule cannot be displayed, an error message appears and an NPEx is logged in the log.
Cause
The additional (synthetic lines) do not have a name. This leads to a NPEx when rendering the structure tree, because the width cannot be computed for a null string: com.top_logic.reporting.chart.gantt.ui.AbstractGanttChartCreator.computeStringWidth(String, FontMetrics)
---
In Prime, this problem did not occur because GantRow::getName() was overridden for the purpose of text shortening, and that text shortening happened to never return null but instead returned an empty string. Therefore, the problem remained undetected until now.
Solution
The new, synthetic rows that are added as part of the autom. collision avoidance now explicitly get an empty string as name. Thus GanttRow::getName() no longer returns null for these rows, but an empty string.
Test
Create at least 3 closely spaced milestones in a project, so that their labels are not displayed conflict-free in the schedule. Then activate the option for "Autom. collision avoidance". The graphic is displayed. No error message appears. The milestones are now distributed over several lines within the task.