Skip to main content

Add a Basic Enum Column

Define an enum column in your risksheet.json configuration:
{
  "header": "Severity",
  "type": "enum:severity_5",
  "width": 120,
  "level": 1,
  "id": "severity",
  "filterable": true
}
Key properties:
  • "type": "enum:enumId" — Specifies enum type using Polarion enumeration ID
  • "level": 1 — Assigns column to risk item level (not task level)
  • "filterable": true — Enables filtering by enum values

Enum Type Syntax

Syntax PatternDescriptionExample
enum:enumIdStandard Polarion enumerationenum:severity_5
enum:rating_nameRating-based enumeration (1-5 scale)enum:occurrence_10
workflowWorkflow status fieldworkflow
Auto-detectedOmit type; inferred from field bindingBinding status → type auto-set to workflow
To discover available enumeration IDs:
  1. Navigate to Polarion Administration → Enumerations
  2. Locate the enumeration you want to use (e.g., “Severity”, “Priority”)
  3. Note the Enumeration ID shown in the enumeration editor
  4. Use this ID in the enum: type specification
Common FMEA/HARA enumerations:
  • severity_5 — Severity ratings 1-5
  • occurrence_10 — Occurrence ratings 1-10
  • detection_10 — Detection ratings 1-10
  • priority — Priority levels (High, Medium, Low)

Bind to Polarion Enum Fields

Connect the column to a Polarion custom field:
{
  "header": "Detection",
  "bindings": "detection",
  "type": "enum:detection_10",
  "width": 100,
  "level": 1,
  "id": "det"
}
The bindings property maps to a custom field ID in your Polarion work item type. The system automatically:
  • Loads valid enum values from Polarion
  • Displays dropdown options when users click the cell
  • Saves selections back to the work item field

Workflow Status Column

For the special case of workflow status fields:
{
  "header": "Status",
  "bindings": "status",
  "type": "workflow",
  "width": 120,
  "level": 1,
  "id": "riskStatus"
}
  • Workflow columns (type: "workflow") bind to the work item status field and respect workflow transition rules
  • Standard enum columns bind to custom enumeration fields and allow free selection of any valid value
  • Workflow columns may restrict available options based on current status and user permissions

Enum Columns for Upstream/Downstream Items

Display enum values from linked work items:
{
  "header": "Harm Severity",
  "bindings": "harm.harmSeverity",
  "type": "enum:harm_severity_5",
  "width": 110,
  "readOnly": false,
  "level": 1,
  "id": "harmSev"
}
Upstream enum pattern:
  • "bindings": "linkColumn.fieldName" — Access enum field from linked item
  • "readOnly": false" — Allow editing (default is read-only for upstream columns)
When displaying enum fields from linked upstream work items (using dot notation like harm.severity), columns are automatically read-only to prevent unintended changes to shared items.To enable editing:
{
  "bindings": "harm.harmSeverity",
  "type": "enum:harm_severity_5",
  "readOnly": false
}
Warning: Editing upstream enum values affects the linked work item in all contexts where it appears, not just the current risk item.

Configure Dependent Enums (Future Feature)

As of the current release, true dependent/cascading enumerations (where one enum filters another based on selection) are not yet available. This feature is planned for release by March 2025. Planned functionality:
  • Filter enum options based on another field’s value
  • Cascading dropdowns (e.g., Category → Subcategory)
  • Conditional enum population
While waiting for dependent enum support, you can use cell decorators to conditionally enable/disable linking or editing based on enum values. See Enable Conditional Linking for examples.

Cell Styling Based on Enum Values

Apply conditional formatting using cell decorators:
{
  "cellDecorators": {
    "severityColor": "function(info){ var val = info.value; $(info.cell).toggleClass('sev-high', val === 'severity_5'); $(info.cell).toggleClass('sev-medium', val === 'severity_3'); $(info.cell).toggleClass('sev-low', val === 'severity_1'); }"
  },
  "styles": {
    ".sev-high": "background-color: #f8eae7 !important; color: #ab1c00 !important;",
    ".sev-medium": "background-color: #fff3d2 !important; color: #735602 !important;",
    ".sev-low": "background-color: #eaf5e9 !important; color: #1d5f20 !important;"
  },
  "columns": [
    {
      "header": "Severity",
      "type": "enum:severity_5",
      "cellRenderer": "severityColor",
      "level": 1,
      "id": "sev"
    }
  ]
}
Visual feedback flow: diagram
  • info.value — Contains the enum ID (e.g., "severity_5")
  • info.item['columnId'] — Access the same value via item object
  • Compare using strict equality: val === 'severity_5' not val == 5

Multi-Enum Work Item Columns

For enumerations that reference multiple work items (used in traceability):
{
  "header": "Related Requirements",
  "bindings": "requirements",
  "type": "multiEnum:@NoIDWorkItems",
  "width": 200,
  "level": 1,
  "id": "reqs"
}
Discovery process:
  1. Open your Polarion project’s custom field configuration XML
  2. Find the field definition (e.g., <field id="requirements">)
  3. Look for the enumeration reference: <option id="multiEnum:@NoIDWorkItems" .../>
  4. Use this exact syntax in your column type
Work item reference enumerations use special syntax:
  • multiEnum:@NoIDWorkItems — References multiple work items without ID prefix
  • This is distinct from standard multi-enum columns (see Configure Multi-Enum Columns)
  • Configuration must match the Polarion XML field definition exactly

Verification

After adding enum columns to your configuration:
  1. Reload the RISKSHEET page
  2. Click an enum cell — You should see a dropdown with enumeration options
  3. Select a value — Cell should update with the chosen enum label (and icon if configured)
  4. Save the sheet — Value should persist to the Polarion work item
  5. Filter the column — If filterable, use the column header filter to show only specific enum values
  6. Check styling — If cell decorators are configured, cells should display conditional colors
You should now see a fully functional dropdown column with predefined enumeration values, proper filtering, and optional conditional formatting based on selections.

See Also

KB ArticlesSupport TicketsSource Code
  • AppConfig.ts
  • RisksheetViewServlet.java
  • GetSetUtil.java
  • AppConfigHelper.ts
  • ExportToPdf.ts