The Translation Layer
Think of data mapping as a translation dictionary between two systems. Polarion stores work item data in custom fields with names likeplannedStart, gantt_duration, or initialEstimate. The Gantt chart needs to know which of these fields represents the task start, which represents the end, and which represents the duration. Data mapping provides this translation.
When the Gantt chart loads, the server reads each work item’s mapped fields and constructs a task object with standardized properties — start_date, end_date, duration, and progress. When a user drags a task bar or edits dates in the lightbox, the Gantt writes the changes back to the same mapped Polarion fields.
Core Field Mappings
The Data Mapping section of the configuration parameters defines five key mappings:| Parameter | Purpose | Default Value | Supported Field Types |
|---|---|---|---|
startField | Task start date | gantt_start | Date, DateTime, String |
endField | Task end date | (none) | Date, DateTime, String |
durationField | Task duration | gantt_duration | Integer, String |
progressField | Completion percentage (0.0-1.0) | gantt_progress | Float, String |
resourceField | Assigned user or team | (varies) | User, String |
How Duration Is Calculated
When you provide all three fields (start, end, and duration), the Gantt uses the start and end dates as the authoritative source and recalculates duration from them. When you provide only two fields, the third is derived:- Start + Duration — The end date is calculated by adding the duration to the start date.
- End + Duration — The start date is calculated by subtracting the duration from the end date.
- Start + End — The duration is calculated from the difference between start and end.
Duration Precision = High (Hours)), durations are measured in hours, and date fields should use DateTime rather than Date types to preserve time information.
When switching from day precision to hour precision, existing duration values are reinterpreted. A stored value of
8 that previously meant 8 days will be treated as 8 hours (1 working day) after the switch.Progress Field Format
TheprogressField stores completion as a float between 0.0 and 1.0, where 0.0 means no progress and 1.0 means fully complete. The Gantt renders this as the filled portion of the task bar. Multiplying by 100 gives the percentage displayed in the lightbox and grid columns.
For production use, a Float custom field type is recommended for the progress field. String-type fields work but may have precision limitations.
Dependency Link Mapping
Beyond scheduling fields, the Gantt maps work item link roles to dependency and hierarchy relationships:parentRoles— Polarion link role IDs that define parent-child hierarchy. Work items linked through these roles appear in a tree structure in the Gantt grid.dependsRoles— Polarion link role IDs that define finish-to-start dependencies. Work items linked through these roles display dependency arrows on the chart.
gantt_dependency_metadata custom field as JSON, separate from the native Polarion link role.
Task Type Resolution
Each work item is rendered as one of three visual types based on its configuration:- Task — A standard task bar with directly editable start and end dates
- Project — A summary bar whose dates are derived from its children (not directly editable)
- Milestone — A diamond marker representing a single point in time
workpackage) to render differently depending on context.
For more about presentation modes, see Presentation Modes — Task, Project, and Milestone.
The Server-to-Client Pipeline
When a Gantt page loads, the server resolves all field mappings into a unified configuration object that is serialized to JSON and sent to the client. This object contains the resolved field names, default values, and display settings. The client uses this configuration to parse the task data, render the chart, and handle user edits. Understanding this pipeline helps explain why changes to field mappings require a page reload to take effect — the mapping is resolved once at render time and cached for the session.Related Pages
- Configuration Layers and Precedence — where field mapping defaults come from
- Presentation Modes — Task, Project, and Milestone — how task type affects scheduling behavior
- Architecture and Data Flow — the full rendering pipeline
Sources
Sources
Source Code
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/widget/WorkItemsGanttWidget.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/GanttService.javaprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/IGanttService.javaprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/zoom.js