Skip to main content

How Enum Columns Work

Enum columns do not define their own value lists. All enumeration values come from Polarion:
  1. An enumeration is defined in Administration > Enumerations (a Polarion-native enumeration XML).
  2. A custom field on the relevant work item type is bound to that enumeration in Administration > Work Items > Custom Fields.
  3. The Risksheet column references the field through its bindings property and declares the enumeration via its type property.
The server loads enum names, descriptions, and ordering directly from Polarion at runtime. There is no separate enums or ratings section in the sheet configuration — those are not real configuration sections and are ignored by the engine.

Define an Enum Column

Add a column entry to the sheet configuration file (risksheet.json) with the type property set to enum:<enumId>, and bind it to the matching Polarion custom field:
The identifier after the colon (risk_category above) is the Polarion enumeration ID, exactly as it appears in Administration > Enumerations. The bindings property (note the trailing s) names the custom field on the risk work item that stores the selected value.

Choose the Right Enum Type

Risksheet provides three column types for enumerations:
Use rating:<enumId> when each option needs context shown in the dropdown — for example, “5 — Catastrophic: Loss of life”. Use enum:<enumId> when the option name alone is sufficient for selection.
The Polarion enumeration drives the dropdown content in all three cases. For rating:* columns, the engine also surfaces each enum option’s description text, which is configured on the enumeration itself in Polarion.

Define the Enumeration in Polarion

To create or modify a rating scale, administrators define it in Polarion:
  1. Open Administration > Enumerations in the target project (or in the Global Library for cross-project reuse).
  2. Create or edit an enumeration such as severity_scale. Each entry has an internal ID, display name, and optional description.
  3. Create or update a custom field on the risk work item type bound to this enumeration.
  4. Reference the enumeration in the column definition: type: rating:severity_scale, bindings: severity.
A typical severity scale contains entries such as 1 — Negligible through 5 — Fatal, each with a description. The server loads these automatically.

Configure Rating Columns for Risk Parameters

Rating columns are intended for risk parameter scales — severity, occurrence, detection, ASIL exposure, controllability, and similar. Each option’s description is shown in the dropdown alongside its name to help risk analysts pick the correct level.
occurrence_scale and severity_scale must already exist as Polarion enumerations, with the occurrence and severity custom fields bound to them on the underlying work item type.
Standard enum:* columns hide descriptions by default. To show descriptions on a non-rating enum column, set showEnumDescription: true on the column.

Bind to Polarion Custom Fields

The type value must match the enumeration referenced by the bound Polarion custom field. Two common forms appear in production configurations: Standard enum custom field:
WorkItem enum custom field (work-item-typed options):
The enum type identifier must match the enumeration ID configured on the Polarion custom field. A mismatch causes the dropdown to display raw IDs instead of human-readable labels.

Dependent Enums (Column-Level, v25.3.1+)

Risksheet supports dependent enumerations where one column’s available options are filtered by the value selected in another column. This is a column-level feature configured on the dependent column (since v25.3.1+); it is not a top-level configuration section. For the column-level configuration syntax, see Configure Dependent Enums.

Use Enum Values in Formulas and Cell Decorators

When a formula or cell decorator reads an enum column value, it receives the enum ID, not the display name. Compare against IDs in your logic:
Cell decorator functions compare against enum IDs, not display values. If an enum option has ID yes and name Y, the decorator must compare against 'yes', not 'Y'. This is a common source of configuration errors.
For visual categorization by prefix — useful when enum IDs follow a naming convention such as initial_* and additional_*String.prototype.startsWith works well inside a toggleClass decorator. Always use $(info.cell).toggleClass(...) rather than inline styles, so styling is removed correctly when cells are reused during scrolling.

Verification

After configuration, you should see:
  • Dropdown selectors when clicking into an enum column cell.
  • Correct option labels (not raw IDs) in the dropdown list.
  • For rating:* columns, both name and description for each option.
  • For dependent enums, child options filtered by the selected parent value.
If labels show as raw IDs, the enumeration ID in type does not match the Polarion enumeration or the custom field is not bound correctly.

See Also

Last modified on July 10, 2026