Skip to main content

File Overview

diagram

Top-Level Structure

PropertyTypeDefaultDescription
domainModelTypesobject(required)Root container defining all entity types. Each key is an entity type name.
relationshipsarray[]Array of relationship definitions between entity types.

domainModelTypes

Each key under domainModelTypes defines an entity type:
domainModelTypes:
  UserNeed:
    polarionType: requirement
    properties:
      severity: null
      priority: null
    constraints:
      pick:
        document:
          moduleFolder: Requirements
          type: specification

Entity Type Properties

PropertyTypeDefaultDescription
polarionTypestringEntity type name (lowercase first letter)Maps the entity type to a Polarion work item type. Override when the names differ.
propertiesobject{}Set of properties (fields) available for this entity type. Keys are property names; null values indicate the property exists without constraints.
constraintsobjectSee applicationValidation rules and filtering constraints for picker dialogs and relationships.

Built-in Properties

All entity types automatically receive these properties:
PropertyTypeDescription
objectIdstringUnique identifier (primary key)
idstringPolarion work item ID
titlestringWork item title
projectIdstringForeign key to the containing project

Built-in Entity Types

Entity TypeDescription
DocumentRepresents Polarion LiveDoc modules. Automatically available in all domain models.
ProjectRepresents Polarion projects. Automatically linked to all work item entity types.

constraints

Constraints define picker dialog filtering and validation rules.
PropertyTypeDefaultDescription
pickobjectSee applicationConstraints for picker dialogs when selecting entities
pick.documentobjectSee applicationDocument-level constraints for picker filtering
pick.document.moduleFolderstringSee applicationFilters picker results to items in a specific module folder
pick.document.moduleNamestringSee applicationFilters picker results to items in a specific module by exact name
pick.document.typestringSee applicationFilters picker results to documents of a specific document type
pick.document.componentstringSee applicationFilters by document component. Supports $context.source.document.component for dynamic filtering

Dynamic Context References

The $context.source.document.component syntax dynamically resolves to the component property of the source entity’s document at runtime, enforcing component-scoped relationships.
constraints:
  pick:
    document:
      component: $context.source.document.component

relationships

Each relationship entry defines a navigable link between two entity types:
relationships:
  - from: UserNeed
    to: SystemRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: refines
    direct:
      name: systemRequirements
    back:
      name: userNeed

Relationship Properties

PropertyTypeDefaultDescription
fromstring(required)Source entity type. Must match a key in domainModelTypes.
tostring(required)Target entity type. Must match a key in domainModelTypes.
cardinalitystring(required)Multiplicity: one-to-one, many-to-one, one-to-many, or many-to-many. See Cardinality.
storagestring(required)Persistence mechanism: linkedWorkItems (Polarion link) or customField. See Storage.
linkRolestring(required)Polarion link role used to store the relationship. Must match a defined link role. See Link Roles.
directobject(required)Forward navigation property on the source entity type.
direct.namestring(required)Property name used in binding paths, queries, and the UI.
backobjectSee applicationReverse navigation property on the target entity type.
back.namestringSee applicationProperty name for backward traversal in binding paths.
Use camelCase for navigation property names (e.g., systemRequirements). These names are used in binding paths for column configuration.

Polarion Type Mapping

When the domain model entity type name matches the Polarion work item type ID (with lowercase first letter), polarionType is optional:
Entity TypeDerived Polarion TypeOverride Needed?
RequirementrequirementNo
UserNeeduserNeedOnly if Polarion type differs
HazardhazardOnly if Polarion type differs
See Polarion Type Mapping for detailed mapping rules.

Model Helper

Powersheet provides a Model Helper widget for visualizing the domain model structure and determining correct binding paths. Configure it as a LiveReport page with parameters:
ParameterDescription
modelModel name to investigate
projectIdProject ID where the model is used
startEntityMain entity type (starting point for expansion)
depthNumber of levels to expand

Complete YAML Example

domainModelTypes:
  UserNeed:
    polarionType: requirement
    properties:
      severity: null
      priority: null
    constraints:
      pick:
        document:
          moduleFolder: Requirements
          type: specification

  SystemRequirement:
    polarionType: systemRequirement
    properties:
      severity: null
      verificationMethod: null

  DesignRequirement:
    polarionType: designRequirement
    properties:
      severity: null

  Hazard:
    polarionType: hazard
    properties:
      severity: null
      riskLevel: null
    constraints:
      pick:
        document:
          moduleFolder: Risks

  RiskControl:
    polarionType: riskControl
    properties:
      controlType: null

relationships:
  - from: UserNeed
    to: SystemRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: refines
    direct:
      name: systemRequirements
    back:
      name: userNeed

  - from: SystemRequirement
    to: DesignRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: refines
    direct:
      name: designRequirements
    back:
      name: systemRequirement

  - from: Hazard
    to: RiskControl
    cardinality: many-to-many
    storage: linkedWorkItems
    linkRole: mitigates
    direct:
      name: riskControls
    back:
      name: hazards

Source: Model Helper KB article, Core Concepts KB article, model.yaml configuration, metadata generation features
KB ArticlesSource Code
  • prod-powersheet-src/com.nextedy.powersheet.client/src/modules/Powersheet/Powersheet.tsx
  • QueryExecutorTest.java
  • prod-powersheet-src/com.nextedy.editor/src/types.d.ts
  • MetadataTest.java
  • prod-powersheet-src/com.nextedy.powersheet/src/com/nextedy/powersheet/enumProvider/SheetConfigEnumProvider.java