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:| Check | Direction | What it detects |
|---|---|---|
| Child out of parent range | Upward through ancestors | A child task whose start or end date falls outside its parent’s date range |
| Parent has children out of range | Downward through descendants | A parent task that has one or more children extending beyond its own dates |
Independent Start and End Checks
The conflict detection system can check start dates and end dates independently. The configuration optionsrangeConflict.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:- 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.
- 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.
- 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.highlightChildconfiguration. When enabled, both the parent and the offending child receive the conflict styling. When disabled, only a subtle indicator is shown on the child
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
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 path — Critical path analysis operates independently of conflict detection. A task can be on the critical path and also have a date range conflict.
Related Topics
- Auto-Scheduling and Dependency Propagation — How dependency constraints interact with containment enforcement
- Critical Path Analysis — Identifying the schedule-determining task chain
- Working Calendars and Scheduling — How calendar boundaries affect conflict evaluation
Sources
Sources
Support TicketsSource Code
prod-gantt-src/com.nextedy.polarion.gantt.client/src/types/dateConflictDetector.d.tsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/dateConflictDetector.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/config.jsprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/range-conflict/afterDragConflict.cy.tsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/dateConflictResolver.js