Skip to main content

Option 1: One-Time Comparison from the Toolbar

Use the toolbar Compare button for an ad-hoc comparison against any historical point in time.
  1. Open your Gantt chart page in Polarion.
  2. Click the Compare button in the Gantt toolbar.
  3. In the comparison dialog, select one of three modes:
ModeWhat You EnterWhen to Use
DateA specific calendar dateCompare against a known date (e.g., sprint start)
BaselineA named Polarion baseline from the dropdownCompare against a formal project baseline
RevisionA Polarion SVN revision numberCompare against a specific repository revision
  1. Click Compare. The Gantt reloads and displays baseline bars behind each task bar, showing where tasks were scheduled at the selected point in time.
The Compare dialog does not open if you have unsaved changes. Save your work first, then initiate the comparison.
Since version 25.3.0, the comparison dialog supports all three modes (date, baseline, and revision) in a single improved interface. Tasks created after the comparison point are marked with a NEW badge, making it easy to spot recently added work items.

Option 2: Always-On Baseline Display

To show baseline bars every time the Gantt loads, configure the widget to display baselines automatically.
  1. Open the page in edit mode and select the Gantt widget.
  2. Navigate to Widget Properties > Baselines.
  3. Set Show Baselines to Yes.
  4. In Compare to date, choose one of:
    • A relative date (T-minus, e.g., 30 days ago)
    • A specific date in the past
    • A page parameter to let users pick the date dynamically
  5. Save the page. The Gantt now loads with baseline overlay bars visible by default.
Create a page parameter called baselineRevision of type string on your Gantt report page. Users can then select different baselines without editing widget properties. See Configure Page Parameters for setup details.

Option 3: API Approach with Item Script

For item-specific baselines (where each work item stores its own approved schedule), use the Item Script to populate baseline fields from custom fields. Add the following to Widget Properties > Advanced > Item Script:
task.planned_start_date = util.getDate(wi, "gantt_initial_start");
task.planned_duration = util.getDuration(wi, "gantt_initial_duration");
This reads the approved start date and duration from custom fields on each work item. The baseline bars reflect per-item approved schedules rather than a single historical snapshot.
The field names passed to util.getDate() and util.getDuration() must match your Data Mapping configuration. If your mapping uses start and initialEstimate, use those exact names in the script.

Browsing Baselines with a Portal Page

You can create a Polarion wiki page that lists all project baselines and links each one directly to your Gantt with the comparison pre-applied. This approach uses a Velocity script that iterates through $project.baselinesManager.baselines and constructs links with the baselineRevision page parameter.
The Velocity-based baseline portal page requires Polarion wiki scripting permissions. Consult your Polarion administrator for access.

Exiting Compare Mode

To stop the baseline comparison and return to the normal view, click the Compare button again in the toolbar (it appears in a toggled/active state during comparison). The baseline overlay bars are removed and the Gantt returns to its current-schedule-only display.

Verification

You should now see secondary bars behind each task bar in the Gantt chart. These baseline bars represent the historical schedule. If a task has moved since the comparison date, you will see the current task bar offset from the baseline bar. Tasks added after the comparison date display a NEW badge.

See Also

KB ArticlesSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/WorkItemsGanttWidget.java
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/main.js
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Task.java
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/gantt-Baseline.cy.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/ganttExtendedCompare.cy.ts