Skip to main content

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
The error count badge on the indicator shows how many distinct errors were detected.

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.
Script errors are caught and logged. The Gantt continues to render with the remaining valid configuration. Tasks affected by a broken script may appear with default styling instead of custom colors or markers.

Use the Browser Console

For detailed debugging, open the browser developer console:
  1. Right-click anywhere on the Gantt page.
  2. Select Inspect.
  3. Navigate to the Console tab.
  4. Look for error messages prefixed with the script type.
Script errors are logged with their full stack trace in the browser console, providing the exact line and expression that failed.

Enable Debug Mode

Set the configuration property nextedy.gantt.debug to true to enable verbose client-side debug logging:
nextedy.gantt.debug=true
When debug mode is active, the Gantt logs detailed information about configuration values, data loading, and event processing to the browser console.
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 MessageLikely CauseFix
TypeError: Cannot read property 'id' of undefinedPre-2304 script syntax after Polarion upgradeUse getter methods: wi.getType().getId() instead of wi.type.id
ReferenceError: wi is not definedScript runs on a task with no backing work itemAdd a typeof wi !== 'undefined' check
SyntaxError: Unexpected tokenJavaScript syntax error in the scriptCheck for missing brackets, quotes, or semicolons
If you recently upgraded Polarion to version 2304 or later, your scripts may need migration. See Migrate Scripts for Polarion 2304+ for a complete before/after reference.

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

diagram

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

KB ArticlesSupport TicketsSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/types/state.d.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/ganttCheckWarningInfo.cy.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/state.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/functions.js
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/impl/ScriptEvaluator.java