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

Unify the timestamps to avoid that different times falsify the result

Henriette Dargef79bbd674dfd
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 cb479f047d6..c81c242cc71 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
@@ -501,13 +501,13 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
if (workPackage.startDate && workPackage.dueDate) {
let dateToCheck;
- const currentStartDate = this.ucCalendar.getApi().view.currentStart;
- const currentEndDate = this.ucCalendar.getApi().view.currentEnd;
+ const currentStartDate = this.ucCalendar.getApi().view.currentStart.setHours(0, 0, 0, 0);
+ const currentEndDate = this.ucCalendar.getApi().view.currentEnd.setHours(0, 0, 0, 0);
if (date === 'start') {
- dateToCheck = new Date(workPackage.startDate);
+ dateToCheck = new Date(workPackage.startDate).setHours(0, 0, 0, 0);
} else {
- dateToCheck = new Date(workPackage.dueDate);
+ dateToCheck = new Date(workPackage.dueDate).setHours(0, 0, 0, 0);
}
const dateCurrentlyVisible = dateToCheck >= currentStartDate && dateToCheck <= currentEndDate;