Skip to main content

What You Will Achieve

After completing this tutorial, you will have:
  • A configured dependency role in your Gantt widget
  • A dependency link created between two tasks using the graphical link builder
  • An understanding of link direction and the four dependency types

Prerequisites

Step 1: Configure the Dependency Role

Before you can create dependency links, you need to tell the Gantt chart which Polarion link role represents a dependency relationship.
  1. Enter page edit mode by clicking Edit on the Polarion page
  2. Open the widget parameters by clicking the widget gear icon
  3. Find the Dependency Role parameter under Work Items
  4. Click Select and add depends_on (or your project’s dependency link role) from the left list to the right
  5. Click OK, then Apply
You should see the Gantt chart reload. If any work items already have dependency links in Polarion, arrows now appear between them.
You can select multiple link roles. If you select more than one, the first role in the list is used when creating new dependency links via the graphical builder.

Step 2: Enter Edit Mode on the Gantt

  1. Click the Edit button in the Gantt toolbar
You should see the toolbar change to show the save and cancel buttons, and task bars become interactive (draggable, resizable).
  1. Hover over the source task bar (the predecessor task). You should see small circles appear on the left and right edges of the task bar.
  2. Click and drag from the right circle of the source task
  3. Drop onto the left circle of the target task (the successor task)
An arrow now appears connecting the two tasks, flowing from the predecessor to the successor. This creates a finish-to-start dependency link, meaning the target task cannot start until the source task finishes.

Step 4: Save Your Changes

Click the Save button in the Gantt toolbar to persist the dependency link to Polarion. After saving, the dependency link is stored as a Polarion work item link using the configured dependency role. Polarion’s default depends_on link role points from a dependent item to its source (the opposite direction from standard Gantt convention). The Gantt chart automatically reverses the arrow direction so that dependency arrows flow correctly from predecessor to successor. If your project uses a different link role where the source already points to the dependent item, you can configure this using the nextedy.gantt.workitems.default.forward_dependency administration property. diagram

Dependency Types

The Gantt chart supports four standard dependency types:
TypeCodeDescription
Finish-to-Start (FS)0Target cannot start before source finishes (default)
Start-to-Start (SS)1Target cannot start before source starts
Finish-to-Finish (FF)2Target cannot finish before source finishes
Start-to-Finish (SF)3Target cannot finish before source starts
By default, only finish-to-start dependencies are available. To enable all four types, set the following administration property:
nextedy.gantt.default.advanced_dependencies=true
This property is set in Project / Repository Administration > Configuration Properties.

Dependency Constraint Violations

When auto-scheduling is enabled and a dependency constraint is violated (for example, a successor task starts before its predecessor finishes), the Gantt chart displays a red dotted line beneath the offending task. To resolve the violation, move the task to satisfy the dependency rules.
If a dependency link connects to a task that is hidden from the current Gantt view (due to filtering or max items), the dependency is ignored by the Gantt as if it does not exist. The task with the missing dependency continues to function normally, with a tooltip indicating the missing connection.
If you want to display existing dependency links but prevent users from creating new ones, add the following to your widget’s Gantt Config Script parameter:
gantt.config.drag_links = false;

Next Steps

KB ArticlesSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/IGanttService.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Link.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/IGanttDataService.java
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/config.js
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/workflow/GanttLinkedWorkItemsStatusCondition.java