Option 1: One-Time Comparison from the Toolbar
Use the toolbar Compare button for an ad-hoc comparison against any historical point in time.- Open your Gantt chart page in Polarion.
- Click the Compare button in the Gantt toolbar.
- In the comparison dialog, select one of three modes:
| Mode | What You Enter | When to Use |
|---|---|---|
| Date | A specific calendar date | Compare against a known date (e.g., sprint start) |
| Baseline | A named Polarion baseline from the dropdown | Compare against a formal project baseline |
| Revision | A Polarion SVN revision number | Compare against a specific repository revision |
- Click Compare. The Gantt reloads and displays baseline bars behind each task bar, showing where tasks were scheduled at the selected point in time.
Option 2: Always-On Baseline Display
To show baseline bars every time the Gantt loads, configure the widget to display baselines automatically.- Open the page in edit mode and select the Gantt widget.
- Navigate to Widget Properties > Baselines.
- Set Show Baselines to Yes.
-
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
- Save the page. The Gantt now loads with baseline overlay bars visible by default.
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: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
- Configure Page Parameters
- Configure Item Colors
- Perform What-If Analysis Without Saving
- Write Item Scripts
Sources
Sources
KB Articles
- How to show the difference of actual vs initial schedule
- Browse Project Baselines and show Plan Comparison View
- Classic project view - brackets
prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/WorkItemsGanttWidget.javaprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/main.jsprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Task.javaprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/gantt-Baseline.cy.tsprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/ganttExtendedCompare.cy.ts