Skip to main content

Enum Property Configuration

Enum properties are defined in the domain model with the enumValues property or automatically detected from Polarion custom field metadata.
NameTypeDefaultDescription
namestringRequiredProperty name unique within the entity type
enumValuesarraynullList of valid enum option IDs; must match Polarion enum IDs
customFieldNamestringnullPolarion custom field ID when the property maps to a custom field
typestringAuto-detectedSet to enum explicitly or auto-detected from Polarion metadata
readablebooleantrueControls whether the property can be read by clients
updatablebooleantrueControls whether the property can be modified by clients
scalarbooleantruetrue for single-select enum, false for multi-select

Enum Resolution Flow

Powersheet resolves enum options using a multi-key strategy that scopes available options based on context (project, entity type, and prototype). diagram

Enum Query Key Strategies

Powersheet uses three query key strategies to determine which metadata keys are needed to resolve enum options:
StrategyKeys UsedApplied When
Proto-onlyprotoWork item type (work-item-type) and document type (document-type) enums
Enum ID + ProjectenumId, projectEnums scoped to a specific project
Defaultproto, project, polarionType, enumIdAll other enumeration types
The fully-qualified enum identifier is constructed by joining query key values with dots. For example: WorkItem.myProject.systemRequirement.severity. This scoping ensures that the correct set of options is loaded per project and entity type.

Default Value Resolution

Enum properties follow a priority chain for default values:
  1. Explicit domain model default — Value specified in the property configuration
  2. Polarion enumeration default — Default option defined in the Polarion enumeration
  3. null — No default if neither source provides one

Enum Constraints and Filtering

Enum options can be filtered based on context using constraints. This is especially important for the type enum field, which controls which work item types appear in creation dialogs.

Type Enum Filtering

When an entity type supports multiple Polarion work item types via the polarionType array configuration, the type enum dropdown shows only the allowed types:
domainModelTypes:
  Requirement:
    polarionType:
      - sys_req
      - des_req
    properties:
      title: ~
      severity: ~
Multi-type entity behavior — where a single entity type maps to multiple Polarion work item types — may require additional constraint configuration for correct document routing. Verify the full constraint setup in your application.

Document-Based Enum Scoping

The allowedWITypes property on document entity types enables automatic filtering of type enum options based on which document the entity belongs to.

Save Behavior

Enum values are saved using their Polarion option ID (not display label). The save operation validates that the submitted value matches a valid option for the field.
OperationBehavior
Save new entityEnum value must be a valid option ID for the field
Update existingOriginal value tracked for change detection
Multi-selectCollection of option IDs stored as list

Complete YAML Example

domainModelTypes:
  UserNeed:
    polarionType: userNeed
    properties:
      title: ~
      priority:
        customFieldName: priority
        enumValues:
          - high
          - medium
          - low
      status:
        customFieldName: status
  SystemRequirement:
    polarionType: systemRequirement
    properties:
      title: ~
      severity:
        customFieldName: severity
      verificationMethod:
        customFieldName: c_verificationMethod
        enumValues:
          - analysis
          - inspection
          - test
          - demonstration

relationships:
  - from: UserNeed
    to: SystemRequirement
    cardinality: many-to-many
    storage: linkedWorkItems
    linkRole: relates_to
    direct:
      name: systemRequirements
    back:
      name: userNeeds
Source Code
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/domain/document.ts
  • DataPropertyFactory.java
  • Property.java
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/e2e/userFlows/multiple-entity-type-flow.cy.ts
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/api/document.ts