Skip to main content

The Translation Layer

Think of data mapping as a translation dictionary between two systems. Polarion stores work item data in custom fields with names like plannedStart, 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:
ParameterPurposeDefault ValueSupported Field Types
startFieldTask start dategantt_startDate, DateTime, String
endFieldTask end date(none)Date, DateTime, String
durationFieldTask durationgantt_durationInteger, String
progressFieldCompletion percentage (0.0-1.0)gantt_progressFloat, String
resourceFieldAssigned user or team(varies)User, String
The Gantt requires at least two of the three scheduling fields: startField, endField, and durationField. The three valid combinations are: Start + End, Start + Duration, or End + Duration. If you provide only one, the Gantt displays an error and the chart does not render.

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 affects how this calculation works. In standard mode, durations are measured in days. In high-precision mode (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

The progressField 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. 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.
The Gantt supports four dependency types — Finish-to-Start (FS), Start-to-Start (SS), Finish-to-Finish (FF), and Start-to-Finish (SF) — with optional lag time. Advanced dependency metadata (type and lag) is stored in a 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
The task type is determined by the Gantt Presentation Mode setting in the Work Item Types Configuration, not by the Polarion work item type itself. This means you can configure the same Polarion type (e.g., 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.
Source Code
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Task.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/WorkItemsGanttWidget.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/GanttService.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/IGanttService.java
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/zoom.js