Skip to main content

Duration Type Mapping

Polarion TypeMapped TypeDescription
DurationTimeStringTime duration values stored as string representation
Duration values are mapped to the String data type in Powersheet. The underlying Polarion DurationTime type stores structured time data, but Powersheet exposes it as a formatted string for display and editing.

Property Configuration

Duration properties use the standard domain model property syntax with customFieldName pointing to a Polarion duration custom field:
NameTypeDefaultDescription
namestringRequiredProperty name unique within entity type
customFieldNamestringnullPolarion custom field ID for duration fields
typestringAuto-detectedAutomatically detected as duration from Polarion metadata
readablebooleantrueControls whether the property can be read by clients
updatablebooleantrueControls whether the property can be modified by clients
scalarbooleantrueDuration properties are always scalar
diagram

Save Operations

Duration custom field values follow the same save pattern as other custom fields, with value and original value tracked for change detection.
OperationBehavior
ReadDuration value returned as formatted string
SaveDuration value submitted in Polarion-compatible format
Change detectionOriginal value tracked alongside new value
The exact input format for editing duration values in the sheet (e.g., 2d 4h, 1/2h, ISO 8601 duration) depends on the Polarion server configuration and the Powersheet formatting settings. Verify accepted formats in your application.

Query Support

Duration fields are included in the set of primitive types supported by the query engine. They can be retrieved as part of entity queries alongside other custom field types.
Query FeatureSupport
SelectIncluded in query results
Filter (where)See application
Sort (orderBy)See application

Complete YAML Example

domainModelTypes:
  UserNeed:
    polarionType: userNeed
    properties:
      title: ~
      estimatedEffort:
        customFieldName: c_estimatedEffort
      timeSpent:
        customFieldName: c_timeSpent
        updatable: false
  SystemRequirement:
    polarionType: systemRequirement
    properties:
      title: ~
      plannedDuration:
        customFieldName: c_plannedDuration
      actualDuration:
        customFieldName: c_actualDuration
        updatable: false

Sheet Configuration with Duration Column

columns:
  title:
    title: Title
    width: 250
  estimatedEffort:
    title: Estimated Effort
    width: 100
  timeSpent:
    title: Time Spent
    width: 100
Source Code
  • SaveTest.java
  • FnExpression.java