Skip to main content

Deadlines Widget Parameters

NameTypeDefaultDescription
Show DeadlinesBooleanfalseMaster toggle that enables deadline marker display on the Gantt chart. All parameters below require this to be true.
Deadline FieldStringEmptyThe Polarion work item field name that holds the deadline date. Must be a Date-Only or String type field. Only visible when Show Deadlines is true.
Passed Deadline ColorStringSee applicationThe CSS color applied to task bars where the end date extends past the deadline date. Accepts named colors (e.g., red) or hex codes (e.g., #e53935). Only visible when Show Deadlines is true.
The Deadline Field and Passed Deadline Color parameters only appear in the widget parameter editor after you set Show Deadlines to Yes.

How Deadline Coloring Works

The deadline coloring logic compares the task’s end date against the deadline field value: diagram
The passed deadline color indicates a schedule violation — the task’s planned end date extends beyond its due date. It does not compare the deadline against today’s date. To implement date-relative deadline coloring based on the current date, use a custom Item Script.

Deadline Column

When deadlines are enabled, you can add a dedicated deadline column to the Gantt grid using the Column Configuration Parameters. The deadline column:
  • Displays the deadline date in a compact format (e.g., Sep-09, Nov-30).
  • Shows the date in red text when the task is overdue (end date past deadline).
  • Uses the deadline template ID in the column configuration.

Supported Field Types

The Deadline Field parameter accepts the following Polarion custom field types:
Field TypeNotes
Date-OnlyRecommended. Stores a calendar date without time component.
StringStores the date as a string value. For production use, prefer Date-Only.
For a full list of supported field types, see Supported Field Types.

Configuration Example

To enable deadline tracking using a custom field called dueDate:
  1. Open Widget Properties for the Gantt widget.
  2. In the Deadlines section:
    • Set Show Deadlines to Yes.
    • Set Deadline Field to dueDate.
    • Set Passed Deadline Color to #e53935 (red).
  3. Save the widget parameters.
Tasks with a dueDate value now display a deadline marker on the chart. If a task’s end date extends past the dueDate, the task bar turns red.

Dynamic Deadline Coloring via Item Script

For more advanced deadline logic (e.g., coloring based on proximity to the deadline or current date comparison), use the Item Script API:
// Color task yellow if within 7 days of deadline, red if past
var deadline = util.getDate(wi, "dueDate");
var today = new java.util.Date();
if (deadline != null) {
    var daysLeft = (deadline.getTime() - today.getTime()) / (1000 * 60 * 60 * 24);
    if (daysLeft < 0) {
        task.color = "#e53935"; // Past deadline
    } else if (daysLeft < 7) {
        task.color = "#fb8c00"; // Approaching deadline
    }
}
The Item Script approach provides more control than the built-in Passed Deadline Color parameter. Verify the exact util.getDate() API in your Gantt version.
KB ArticlesSupport TicketsSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/GanttWidgetDependenciesProcessor.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/widget/GanttWidget.java
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Task.java
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/columns.js
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/projectCalendar/polarion-config/custom fields/scheduletweak-custom-fields.xml