Prerequisites
- A working Nextedy GANTT widget with Plans configured
- Work items assigned to Polarion Plans (iterations, releases)
- Access to Widget Parameters > Advanced > Item Script
Option 1: Derive Schedule from Plans Using Item Script
When you need a work item’s dates to come from its plan assignment rather than from its own date fields, add the following to Widget Parameters > Advanced > Item Script:
This script iterates through all plans the work item belongs to, finds the one matching the Iteration template, and copies the plan’s start and due dates onto the task bar.
Option 2: Use the Utility Method for Unplanned Items
For work items that have no dates set, use the built-in deriveScheduleFromPlans utility method in your item script:
This method automatically sets the task’s start and end dates from the matching plan.
If you encounter errors during script execution, the script may be processing a non-existent work item. Add a null check around your script:
Option 3: Automatic Sync with syncToPlans
You can configure the Gantt to automatically keep work item plan membership in sync when dates are edited. In Widget Parameters > Work Item Types Configuration, enable Sync to Plans for the relevant work item type.
When syncToPlans is enabled, saving a task in the Gantt automatically adds or removes the work item from overlapping Polarion Plans that match the configured plan templates.
When you have many plans (100+), use a contextField filter to limit which plans are considered for sync. This prevents performance issues and ensures only relevant plans are matched. A bug fix in v25.8.0 ensures the most recent plans are fetched by due date.
The plan sync mechanism fetches up to 100 plans by default. If you have more than 100 plans, newer plans may not appear unless you upgrade to v25.8.0 or later, which fetches plans ordered by due date.
Verify
After configuring one of the above methods, reload the Gantt chart. You should now see work items positioned on the timeline according to their assigned plan dates. Unplanned items should display at their plan’s date range, and items with syncToPlans enabled should automatically update plan membership when you drag and save them.
See also