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

set working days only toggle off only if start or end date is set on a non-working day

bsatarnejad3c463171b9bf
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
index 8d9ceeac07b..59dbf63aa46 100644
--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
@@ -752,17 +752,14 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
}
private handleDateClicked(info:DateSelectArg) {
- const startDay = new Date(info.start).getDate();
- const endDay = new Date(info.end).getDate();
- const duration = endDay - startDay;
- const ignoreNonWorkingDays = duration !== 1 ? false : this.weekdayService.isNonWorkingDay(info.start);
+ const nonWorkingDays = this.weekdayService.isNonWorkingDay(info.start) || this.weekdayService.isNonWorkingDay(info.end);
this.openNewSplitCreate(
info.startStr,
// end date is exclusive
this.workPackagesCalendar.getEndDateFromTimestamp(info.endStr),
info.resource?.id || '',
- ignoreNonWorkingDays,
+ nonWorkingDays,
);
}