major
minor
major
minor
Problem
If milestones within a task in the schedule are so close together that their labels overlap, the "Auto Collision Avoidance" option should insert additional rows to space out the milestones. This option does not work: The schedule cannot be displayed, an error message appears, and an NPEx is logged.
Cause
The additional (synthetic) rows have no name. This results in an NPEx when rendering the structure tree because the width for a null string cannot be calculated: com.top_logic.reporting.chart.gantt.ui.AbstractGanttChartCreator.computeStringWidth(String, FontMetrics)
---
This problem did not occur in Prime because GantRow::getName() was overridden for the purpose of text truncation, and this truncation never returns null but instead returns an empty string. Therefore, the problem remained undetected until now.
Solution
The new, synthetic rows added as part of automatic collision avoidance are now explicitly assigned an empty string as their name. As a result, GanttRow::getName() no longer returns null for these rows, but rather an empty string.
Test
In a project, create at least 3 milestones that are close together so that their labels cannot be displayed without conflict in the schedule. Then enable the "Automatic Conflict Avoidance" option. The chart is displayed. No error message appears. The milestones are now distributed across multiple rows within the task.