Skip to main content

Why Date Containment Matters

In hierarchical project scheduling, parent tasks represent containers for their children. A “Development Phase” spanning January through March logically contains all its child tasks. If a child task “Integration Testing” is scheduled for April, the parent-child relationship no longer makes sense — the parent appears to end before all its work is complete. Without conflict detection, these inconsistencies accumulate silently. Users drag tasks around, resize durations, and update dates without realizing they have broken containment rules. The Gantt’s date range conflict detection catches these violations in real time, ensuring the schedule remains logically consistent.

How Conflict Detection Works

The conflict detection system evaluates parent-child date relationships across the entire task hierarchy. It operates in two directions: diagram The detection system performs two distinct checks:
CheckDirectionWhat it detects
Child out of parent rangeUpward through ancestorsA child task whose start or end date falls outside its parent’s date range
Parent has children out of rangeDownward through descendantsA parent task that has one or more children extending beyond its own dates
These checks are not limited to the immediate parent-child pair. The system recursively checks all ancestor levels, so a deeply nested task is validated against every ancestor in the hierarchy, not just its direct parent.

Independent Start and End Checks

The conflict detection system can check start dates and end dates independently. The configuration options rangeConflict.checkStart and rangeConflict.checkEnd control which boundaries are enforced. This flexibility allows you to enforce only end-date containment (useful when child tasks can start before the parent’s official start) or only start-date containment, depending on your scheduling methodology.

When Conflicts Are Detected

Conflict detection runs at three points during a Gantt session:
  1. On data load — When the Gantt first loads, all tasks are scanned for existing conflicts. Parent tasks with out-of-range children are immediately highlighted.
  2. During drag and resize — As you drag a task bar or resize it, the Gantt evaluates the new position in real time. If the task moves outside its parent’s range, the conflict indicator appears immediately. If you move it back within range, the indicator clears.
  3. In the lightbox — When editing dates in the lightbox, validators check that the new dates respect parent-child containment. If a child’s dates would extend beyond the parent, an error message describes the parent’s date range. Similarly, if a parent’s dates would exclude existing children, the lightbox shows a warning.
Date range conflict detection requires the rangeConflict.enabled configuration to be set to true. When disabled, no conflict checks are performed and tasks can be freely positioned regardless of parent-child containment.

Visual Conflict Indicators

When a conflict is detected, the Gantt applies visual indicators to the affected tasks:
  • Parent tasks with out-of-range children receive a conflict highlight and display a tooltip message indicating the children range conflict
  • Child tasks outside their parent’s range can optionally be highlighted using the rangeConflict.highlightChild configuration. When enabled, both the parent and the offending child receive the conflict styling. When disabled, only a subtle indicator is shown on the child
The visual highlighting is reactive — it appears the moment a drag creates a conflict and disappears the moment the task returns within its parent’s range.

Automatic Conflict Resolution

Beyond detection, the Gantt includes an automatic resolution system that adjusts dates to eliminate conflicts after drag and resize operations. When resolution is active:
  • Dragging a child past its parent’s boundary causes the parent’s date range to expand automatically, growing to accommodate the child’s new position
  • Resizing a child beyond its parent’s end date triggers the same parent expansion
  • Resolution propagates hierarchically — if expanding the parent causes it to exceed its own parent’s range, that grandparent is also expanded, and so on up the tree
This means that moving a leaf-level task can cascade adjustments all the way up to the root of the hierarchy, keeping the entire tree consistent. diagram
Conflict resolution (automatic date adjustment) and conflict detection (visual warnings) are separate systems. Detection shows you where problems exist. Resolution fixes them automatically. In some configurations, you may want detection without automatic resolution — this lets users see conflicts and decide how to address them manually.

Interaction with Working Calendars

Date range conflict calculations respect working calendars when evaluating boundaries. Tasks that start or end on weekends are adjusted to the nearest working day before the conflict status is evaluated. This prevents false positives where a task technically ends on a Saturday (a non-working day) but its effective end is the preceding Friday, which may still fall within the parent’s range.

Interaction with Other Features

Date range conflict detection interacts with several other Gantt capabilities:
  • Auto-scheduling — When auto-scheduling propagates date changes through dependency links, the resulting positions are checked for parent-child conflicts. Auto-scheduling resolves dependency constraints; conflict detection resolves containment constraints.
  • Drag children — When the drag-children toolbar toggle is enabled, dragging a parent moves all children by the same offset. Since children move with the parent, containment is preserved and no conflicts arise from the move itself.
  • Critical pathCritical path analysis operates independently of conflict detection. A task can be on the critical path and also have a date range conflict.
Support TicketsSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/types/dateConflictDetector.d.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/dateConflictDetector.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/config.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/range-conflict/afterDragConflict.cy.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/dateConflictResolver.js