Prerequisites
- A Gantt widget configured with a Progress Field mapping (default:
gantt_progress) - Edit mode access to modify widget parameters
Understand the Progress Field
TheprogressField widget parameter specifies which Polarion work item field stores the completion percentage. Progress values are stored as a float between 0.0 (not started) and 1.0 (complete). The Gantt chart displays this as a filled portion inside the task bar.
| Property | Default Value | Description |
|---|---|---|
progressField | gantt_progress | Work item field storing progress (0.0-1.0) |
drag_progress | false (since v24.8.0) | Enable or disable progress drag on task bars |
progressColoring | false | Color-code task bars based on progress percentage |
progress system column displays the value as 0-100 in the grid, while the internal task model stores it as 0.0-1.0.
Enable Manual Progress Drag
To allow users to drag the progress indicator on task bars:- Open the Polarion page containing the Gantt widget
- Edit the widget properties
- Navigate to Advanced > Gantt Config Script
- Add the following line:
Calculate Progress from Time Estimates
For short-to-mid-term items where you want to compute progress automatically based on time tracking data, use an Item Script:- Navigate to Widget Properties > Advanced > Item Script
- Add the following script:
timeSpent / (remainingEstimate + timeSpent). Resolved items automatically show 100% progress.
To limit progress calculation to a specific type (for example,
workpackage), wrap the script in a type check: if (wi.getType().getId() === 'workpackage') { ... }.- Disable manual drag when using automatic calculation. In Advanced > Gantt Config Script, add:
Show Progress Text on Task Bars
To display the calculated progress alongside the task bar, add the following to Advanced > Gantt Config Script:Calculate Epic or Plan Progress
For parent items like epics or plans, you can compute progress as the ratio of resolved children to total children. Use this Item Script pattern for Plans Gantt:Verify Your Configuration
After applying the scripts:- Open the Gantt chart and enter Edit mode
- You should now see the progress bar filled proportionally inside each task bar
- If you enabled
rightside_text, the progress percentage and time breakdown appear to the right of each task bar - If you enabled
drag_progress = true, hover over a task bar to see the drag handle appear on the progress boundary
See Also
- Calculate Progress with Scripts for advanced calculation patterns
- Customize Progress-Related Coloring to color-code task bars by progress
- Configure Right-Side Text on Task Bars for additional text formatting
- Compute Plan Progress for Plans Gantt progress setup
Sources
Sources
KB Articles
- API Example: Compute Plan Progress for Plans GANTT on the Server Using API
- Calculate item progress from time estimates
- Calculate Epic Progress
prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Task.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/columns/GanttSystemColumn.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/WorkItemsGanttWidget.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/GanttWidgetConfig.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Config.java