Locate Script Errors
Since version 25.4.2, the Gantt provides a built-in error alert system that surfaces script problems directly in the interface.Edit Mode (Administrator View)
When a script contains an error, a warning indicator appears in the Gantt footer. Click the indicator to open a detailed message that identifies the error type and location:- Config Script Error — An error in the Gantt configuration script
- Markers Script Error — An error in the markers script
- Item Script Error — An error in the item script
View Mode (User View)
In view mode (non-edit), a triangle warning icon appears in the Gantt footer when configuration or data-related issues are present. This informs end users that something requires administrator attention.Use the Browser Console
For detailed debugging, open the browser developer console:- Right-click anywhere on the Gantt page.
- Select Inspect.
- Navigate to the Console tab.
- Look for error messages prefixed with the script type.
Enable Debug Mode
Set the configuration propertynextedy.gantt.debug to true to enable verbose client-side debug logging:
Debug mode can also be enabled via the hamburger menu’s Debug submenu in development builds. This provides options to toggle the debug panel and inspect configuration state.
Common Script Error Patterns
| Error Message | Likely Cause | Fix |
|---|---|---|
TypeError: Cannot read property 'id' of undefined | Pre-2304 script syntax after Polarion upgrade | Use getter methods: wi.getType().getId() instead of wi.type.id |
ReferenceError: wi is not defined | Script runs on a task with no backing work item | Add a typeof wi !== 'undefined' check |
SyntaxError: Unexpected token | JavaScript syntax error in the script | Check for missing brackets, quotes, or semicolons |
Debug Server-Side Scripts
Server-side item scripts execute on the Polarion server and log errors to the server logs. Contact your Polarion administrator to review the server log files for script evaluation errors. Server-side scripts have access to context variables including the work item, project, and platform services. Errors in server-side scripts are logged but do not crash the Gantt data load — affected tasks render with default values.Step-by-Step Debugging Workflow
Verification
You should now see no error indicators in the Gantt footer after fixing your scripts. The browser console should be free of script-related error messages, and tasks should display with the expected custom colors, markers, and computed values.See Also
- Migrate Scripts for Polarion 2304+
- Write Item Scripts
- Write Gantt Config Scripts
- Color Logic Script Examples
- Troubleshooting Script Errors
Sources
Sources
KB ArticlesSupport TicketsSource Code
prod-gantt-src/com.nextedy.polarion.gantt.client/src/types/state.d.tsprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/ganttCheckWarningInfo.cy.tsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/state.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/functions.jsprod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/ScriptEvaluator.java