Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Always update gantt cells and header to have correct data disaplyed when collapsing groups (see #43762 and #43775) Previoulsy, only the bars would change its position, but since the header remained, the bars where shown at the wrong time.

Henriette Darge5dfbc4831341
diff --git a/frontend/src/app/features/work-packages/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts b/frontend/src/app/features/work-packages/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts
index 9e284d0689a..e4715f52c23 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts
+++ b/frontend/src/app/features/work-packages/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts
@@ -69,10 +69,6 @@ export class WorkPackageTableTimelineGrid implements AfterViewInit {
}
private renderLabels(vp:TimelineViewParameters):void {
- if (this.activeZoomLevel === vp.settings.zoomLevel) {
- return;
- }
-
this.gridContainer.empty();
switch (vp.settings.zoomLevel) {
diff --git a/frontend/src/app/features/work-packages/components/wp-table/timeline/header/wp-timeline-header.directive.ts b/frontend/src/app/features/work-packages/components/wp-table/timeline/header/wp-timeline-header.directive.ts
index 675d866f19b..84963cba493 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/timeline/header/wp-timeline-header.directive.ts
+++ b/frontend/src/app/features/work-packages/components/wp-table/timeline/header/wp-timeline-header.directive.ts
@@ -69,25 +69,28 @@ export class WorkPackageTimelineHeaderController implements OnInit {
this.renderLabels(vp);
}
- private renderLabels(vp:TimelineViewParameters) {
- if (this.activeZoomLevel === vp.settings.zoomLevel) {
- return;
- }
-
+ private renderLabels(vp:TimelineViewParameters):void {
this.innerHeader.empty();
this.innerHeader.attr('data-current-zoom-level', this.wpTimelineService.zoomLevel);
switch (vp.settings.zoomLevel) {
case 'days':
- return this.renderLabelsDays(vp);
+ this.renderLabelsDays(vp);
+ break;
case 'weeks':
- return this.renderLabelsWeeks(vp);
+ this.renderLabelsWeeks(vp);
+ break;
case 'months':
- return this.renderLabelsMonths(vp);
+ this.renderLabelsMonths(vp);
+ break;
case 'quarters':
- return this.renderLabelsQuarters(vp);
+ this.renderLabelsQuarters(vp);
+ break;
case 'years':
- return this.renderLabelsYears(vp);
+ this.renderLabelsYears(vp);
+ break;
+ default:
+ return;
}
this.activeZoomLevel = vp.settings.zoomLevel;