What Changed
Since Polarion version 2304, the scripting engine used by the Gantt widget has been updated. Scripts that use direct property access on Polarion objects (such aswi.type.id or wi.status.id) no longer work as expected. You must update these to use getter methods.
If your Gantt configuration uses item scripts or configuration scripts, you may encounter errors like:
Migration Steps
Step 1: Replace Direct Property Access with Getter Methods
The most common change is replacing direct property access patterns with their getter equivalents.| Old Syntax (Pre-2304) | New Syntax (2304+) |
|---|---|
wi.type.id | wi.getType().getId() |
wi.status.id | wi.getStatus().getId() |
wi.resolution.id | wi.getResolution().getId() |
wi.priority.id | wi.getPriority().getId() |
Step 2: Replace Null Checks with typeof Checks
In Polarion 2304+, variables that were previouslynull when undefined now require typeof checks.
| Old Syntax (Pre-2304) | New Syntax (2304+) |
|---|---|
if (wi != null) | if (typeof wi !== 'undefined') |
if (plan != null) | if (typeof plan !== 'undefined') |
Step 3: Update Comparison Operators
Use strict equality operators (===) instead of loose equality (==) for consistent behavior with the updated scripting engine.
Step 4: Test Each Script
After updating your scripts, test each one:- Open the Gantt page in edit mode.
- Check the browser console for errors (right-click the page, select Inspect, open the Console tab).
- Verify that task bars render with the expected colors, markers, and labels.
Common Migration Examples
Color logic script:Verification
You should now see your Gantt chart rendering correctly withoutTypeError messages in the browser console. Task bars should display the expected colors, progress, and markers as defined by your scripts.
See Also
Sources
Sources
KB ArticlesSupport TicketsSource Code
prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/types/TypesConfig.java