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.
The
progress system column displays the value as 0-100 in the grid, while the internal task model stores it as 0.0-1.0.
Progress drag is enabled by default (
gantt.config.drag_progress = true). To prevent users from adjusting progress by dragging the task bar, disable it in the Gantt Config Script with gantt.config.drag_progress = false;.Control Progress Drag
Progress drag is on by default. To set it explicitly (or re-enable it where a Config Script turned it off), use the Gantt Config Script:- 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