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

check NWDs on Gantt chart

bsatarnejad1c3f5f4807f5
diff --git a/frontend/src/app/features/work-packages/components/wp-table/timeline/cells/timeline-cell-renderer.ts b/frontend/src/app/features/work-packages/components/wp-table/timeline/cells/timeline-cell-renderer.ts
index ca040d10e03..8b350fd684e 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/timeline/cells/timeline-cell-renderer.ts
+++ b/frontend/src/app/features/work-packages/components/wp-table/timeline/cells/timeline-cell-renderer.ts
@@ -324,7 +324,7 @@ export class TimelineCellRenderer {
break;
}
// Extend the duration if the currentDate is non-working
- if (this.weekdayService.isNonWorkingDay(currentDate.toDate()) || this.dayService.isNonWorkingDay(currentDate.toDate())) {
+ if (this.weekdayService.isNonWorkingDay(currentDate.toDate() || this.workPackageTimeline.isNonWorkingDay(currentDate.toDate()))) {
duration += 1;
}
}
@@ -476,10 +476,10 @@ export class TimelineCellRenderer {
? [this.cursorDateAndDayOffset(evOrDates, renderInfo)[0]]
: evOrDates;
if (!renderInfo.workPackage.ignoreNonWorkingDays && direction === 'both'
- && (this.weekdayService.isNonWorkingDay(dates[dates.length - 1].toDate()) || this.dayService.isNonWorkingDay(dates[dates.length - 1].toDate()))) {
+ && (this.weekdayService.isNonWorkingDay(dates[dates.length - 1].toDate() || this.workPackageTimeline.isNonWorkingDay(dates[dates.length - 1].toDate())))) {
return false;
}
- return dates.some((date) => (this.weekdayService.isNonWorkingDay(date.toDate()) || this.dayService.isNonWorkingDay(date.toDate())));
+ return dates.some((date) => (this.weekdayService.isNonWorkingDay(date.toDate()) || this.workPackageTimeline.isNonWorkingDay(date.toDate())));
}
/**
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 73daac5ceef..6454cd69070 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
@@ -189,8 +189,7 @@ export class WorkPackageTableTimelineGrid implements AfterViewInit {
private checkForNonWorkingDayHighlight(date:Moment, cell:HTMLElement) {
const day = date.toDate();
-
- if (this.weekdaysService.isNonWorkingDay(day) || this.daysService.isNonWorkingDay(day)) {
+ if (this.weekdaysService.isNonWorkingDay(day) || this.wpTimeline.isNonWorkingDay(day)) {
cell.classList.add('wp-timeline--non-working-day');
cell.dataset.qaSelector = `wp-timeline--non-working-day_${day.getDate()}-${day.getMonth() + 1}-${day.getFullYear()}`;
}