Skip to main content

Enum Type Syntax

diagram
The identifier after the colon is the ID of a Polarion enumeration (defined under Administration > Enumerations). Risksheet loads the values automatically at runtime.

Column Type Comparison

Use rating:ID for risk assessment scales (severity, occurrence, detection) where enum value descriptions should appear inline in the dropdown. Use enum:ID for categorical selections where the name alone is sufficient.

Enum Column Properties

The type: enum:* property is optional for main row item columns (Risksheet auto-detects from the bound Polarion field). However, it is mandatory for all upstream and downstream linked item columns. Omitting the type for linked items results in the column not rendering correctly.

How Enum Values Are Defined

All enum, rating, and multiEnum values come from Polarion enumerations — they are not defined in the sheet configuration.
  1. Define the enumeration in Polarion: Go to Administration > Enumerations and create an enumeration with the values you need. For rating scales, use integer IDs (for example 1, 4, 7, 10); for categorical enumerations, use string IDs (for example disc, drum, regen). Each value has an ID, a name (displayed in the UI), and an optional description.
  2. Bind a custom field to the enumeration: In Polarion, define or extend a work item type with a custom field whose type is Enum:<enumId> (single-select) or Enum:<enumId>:multi (multi-select).
  3. Reference the enumeration from a column: In the sheet configuration, set type: enum:<enumId> (or rating:<enumId> / multiEnum:<enumId>) and bindings: <fieldId> on the column.
The Risksheet server loads the enumeration values automatically — there is no enums or ratings section in the sheet configuration.

Example: Category Column

This column displays the values defined in the Polarion enumeration risk_category and stores the user’s selection in the custom field category on the risk work item.

Example: Rating Column With Descriptions

The Polarion enumeration severity_scale would contain entries such as 1 — No effect, 4 — Moderate, 7 — High, 10 — Hazardous. Because the column type is rating:*, Risksheet shows the description next to each value in the dropdown.

Example: Multi-Select With Descriptions

Setting showEnumDescription: true causes the descriptions defined in the Polarion enumeration measure_types to be shown alongside each option in the dropdown and inside the rendered cell.

Cell Decorators for Enum Columns

Cell decorators compare against enum value IDs, not display names. This is a common source of errors. For enum/multiEnum columns this is a string ID, and for rating columns it is an integer ID.
Cell decorator functions must compare against the enum value ID (for example 'yes'), not the display name (for example 'Y'). Using display names causes the comparison to fail silently. CSS style definitions require !important to override Risksheet default styling. Use $(info.cell).toggleClass(...) rather than inline style mutations, because Risksheet reuses cells when scrolling.

Enum Loading and Filtering

Risksheet loads enumeration values automatically for any column whose type is enum:*, rating:*, or multiEnum:*. The server resolves the ID after the colon against the Polarion enumerations of the project (or globally, if the enumeration is global).
  • Risk-item enum fields are filtered by the Polarion enumeration bound to the risk work item type.
  • Task-item enum fields are filtered by the Polarion enumeration bound to each task work item type, including the multi-project case (dataTypes.task.projects).
  • Project pickers show only projects allowed in the configuration.
Because enums are defined in Polarion and resolved at runtime, the same column configuration works across environments as long as the enumeration ID matches.

WorkItem Enum Fields

WorkItem enum fields (Polarion custom fields whose enumeration is a query for work items) use a type identifier matching the Polarion XML custom field definition:
WorkItem enum fields have limited support on upstream and downstream linked item columns compared to main row item columns. Check the Polarion custom field XML definition (custom-fields.xml) for the exact enumeration name to use in the type property.

Dependent Enumerations

Dependent enumerations restrict the values offered in one enum column based on the value selected in another enum column. This is a column-level feature, not a top-level section of the sheet configuration. It was introduced in v25.3.1 for single-value enum columns; multi-value (multiEnum) dependency is planned for a future release. Dependencies are defined on the dependent column using a column-level property that names the controlling column and supplies the value mapping. Verify the exact property name and shape in the configuration editor of your Risksheet version.
Dependent enumeration support landed in v25.3.1 for single-value enums. The v25.5.0 configuration editor provides YAML editing with syntax highlighting and inline error detection, which is the recommended way to author dependency configurations.

PDF Export Behavior

Enum fields in PDF export have inconsistent rendering depending on column type:
Use saved views as an alternative export option to control how enum fields are rendered in PDF output. See Saved Views.

Complete Example

The values design, process, and the entries of severity_scale, occurrence_scale, detection_scale, risk_category, and measure_types are defined as Polarion enumerations under Administration > Enumerations; the sheet configuration only references them by ID.

See Also

Last modified on July 10, 2026