Skip to main content

Computed Property Flow

diagram

Domain Model Property Configuration

Properties in the domain model YAML define the fields available on each entity type. When a property includes serverRender, it becomes a computed property.

Property Fields

NameTypeDefaultDescription
namestringRequiredProperty name as exposed in the metadata API. Must be unique within the entity type.
serverNamestringSame as nameOverride for the actual Polarion field name when it differs from the client-facing property name.
customFieldNamestringnullPolarion custom field ID. Required when the property maps to a custom field.
typestringnullData type (string, integer, date, enum, etc.). Determines validation and rendering.
storagestringnullPersistence mechanism (e.g., workitem field, linkedWorkItems).
enumValuesarraynullList of valid enum option IDs when type is enumeration.
readablebooleantrueWhether the property is visible to clients.
updatablebooleantrueWhether the property can be modified. Automatically false for serverRender properties.
scalarbooleantrueSingle value (true) or collection (false).
navigabilitystringnullNavigation direction for relationship properties.
serverRenderstringnullVelocity template pattern. When set, property is evaluated server-side and marked read-only.
When serverRender is configured on a property, the property is automatically marked as not updatable (updatable = false), regardless of any explicit updatable setting. This ensures computed values cannot be overwritten by client edits.

Security Model

Property-level security follows an intersection model:
LevelDescription
Entity-level permissionsBase CRUD permissions from the entity type definition
Property-level readableControls visibility; defaults to true
Property-level updatableControls editability; defaults to true but overridden to false by serverRender
Server-render overrideProperties with serverRender are always read-only

Read-Only System Fields

Certain built-in fields are always read-only, regardless of configuration:
FieldEntity TypeDescription
idAll work itemsPolarion work item ID
outlineNumberAll work itemsDocument outline number
objectIdAll entitiesPrimary key (auto-generated, non-nullable)

Create-Only Document Fields

For Document entity types, certain fields are only writable during creation:
FieldDescription
moduleFolderDocument folder/space path
moduleNameDocument name
titleDocument title
typeDocument type
allowedWITypesAllowed work item types

Built-In Properties

All work item entity types automatically include these standard properties:
PropertyTypeDescription
objectIdstringPrimary key, part of entity key. Auto-generated using Identity strategy.
idstringPolarion work item ID
titlestringWork item title
projectIdstringForeign key referencing the project

Type Mapping

Polarion field types are automatically mapped to metadata types:
Polarion TypeMetadata TypeDescription
IntegerInt32Whole numbers
FloatDoubleFloating-point numbers
CurrencyDoubleCurrency values
DateOnlyDateTimeDate without time
DateDateTimeDate with time
TimeOnlyDateTimeTime only
DurationTimeStringDuration values
BooleanBooleanTrue/false
TextStringRich text
StringStringPlain text

Enum Properties

Enum-typed properties receive additional metadata for dropdown picker rendering:
MetadataDescription
Enum IDPolarion enumeration identifier
Full qualified enum IDDot-separated identifier combining query keys and entity metadata
Query keysContext keys (prototype, project, type) for filtering available enum options
Default values for enum properties are resolved in this order: explicit domain model default, then Polarion enumeration default, then null.

Computed Property Examples

Simple Status Display

domainModelTypes:
  SystemRequirement:
    polarionType: systemRequirement
    properties:
      title: ~
      severity: ~
      statusLabel:
        serverRender: "$item.status.id"

Conditional Formatting

      riskLevel:
        serverRender: |
          #if($item.severity && $item.severity.id == "critical")
            HIGH
          #elseif($item.severity && $item.severity.id == "major")
            MEDIUM
          #else
            LOW
          #end

Document Path

      documentLocation:
        serverRender: |
          #if($module)
            $module.moduleFolder/$module.moduleName
          #else
            (no document)
          #end
      linkedItems:
        serverRender: |
          #set($links = $wi.getLinkedWorkItems())
          $links.size()

Sheet Configuration for Computed Properties

Computed properties are referenced in the sheet configuration like any other property:
columns:
  id:
    width: 80
  title:
    width: 300
    hasFocus: true
  statusLabel:
    width: 120
    formatter: readOnly
  riskLevel:
    width: 100
    formatter: readOnly
  documentLocation:
    width: 200
    formatter: readOnly
  linkedItems:
    width: 80
    formatter: readOnly

sources:
  - id: requirements
    title: System Requirements
    model: rtm
    query:
      from: SystemRequirement
      where: "<WHERE>"
    expand:
      - name: designRequirements
        title: Design Requirements
        expand:
          - name: designRequirement
Apply the readOnly formatter to computed property columns to visually indicate they are not editable. This matches the server-enforced read-only behavior.

Error Handling

ErrorDisplayDebug
Template parse error#SERVER_RENDER_ERROR in cellCheck server logs for ParseErrorException
Method invocation error#SERVER_RENDER_ERROR in cellCheck server logs for MethodInvocationException
Resource not found#SERVER_RENDER_ERROR in cellCheck server logs for ResourceNotFoundException

Source context: Property, ServerRenderer, MetadataTest, DataPropertyFactory, RowItemFactory, ViewModel
Source Code
  • Property.java
  • MetadataTest.java
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/__tests__/test-viewModel.ts
  • ServerRenderer.java
  • DataPropertyFactory.java