Script Variables
The following variables are available in the Markers Script scope:MarkerFactory Methods
Marker Object Methods
The marker object returned byaddMarker() provides these methods:
Hovering over a milestone marker displays a tooltip in the format:
Milestone: <name> followed by Due Date: <YYYY-MM-DD>.Marker Positioning
Markers render at the end of the specified date by convention. If you need a marker to appear at the start of a date, subtract one day from the date value.Manually Adding a Marker
Create a marker with explicit values:Adding Markers from Plans
Pull markers automatically from Polarion plans matching a Lucene query:template.id:iteration— filters plans by template IDproject.id:gantt2— restricts to a specific project
plan, enabling distinct visual styling.
Adding Markers from Work Items
Pull markers from Polarion work items matching a Lucene query:type:release— filters work items by type"publicLaunch"— the date field on the work item used to position the marker"blue"— the marker color
Dynamic Project ID
Useconfig.getContextProjectId() to reference the current project instead of hardcoding:
Dynamic Markers with Polarion API
UsetrackerService for full scripting control over marker creation. This approach supports filtering, conditional coloring, and custom tooltip content.
Loading Time Points
Polarion 22 R2 and Older
For older Polarion versions, use direct property access:Dynamic Marker Customization with Page Parameters
CombinetrackerService with page parameters to let users control which markers appear:
Marker CSS Classes
Error Handling
- Script errors display as a warning indicator with a count badge in the Gantt toolbar
- The error message includes the prefix Markers Script Error:
- Errors appear in both view mode and wiki editor mode
Configuration Example
A complete Markers Script combining plan markers, work item markers, and a manual milestone:Related Pages
- Item Script API — server-side script for data preparation
- Gantt Config Script API — client-side script for templates and events
- Velocity Context Variables — server-side variables for dynamic script generation
- Page Parameters API — user-input parameters for dynamic marker filtering
- Item Color Legend — default color behavior for task bars