Constraint Stages Overview
Stage Cascading
Constraint stages cascade upward — more specific stages inherit all constraints from less specific ones, combined with AND logic:- Load stage: applies only
loadconstraints - Pick stage: applies
load+pickconstraints (AND) - Create stage: applies
load+pick+createconstraints (AND)
If no
create constraints are defined, the system automatically uses pick constraints for the create stage. This means defining pick constraints also affects item creation unless explicit create constraints override them.Constraint Properties Reference
Top-Level Structure
Document Constraint Properties
Each constraint stage accepts adocument object for document-based filtering. These properties scope entities to specific Polarion LiveDoc documents. All standard document metadata fields are constrainable.
Field-Level Constraint Properties
In addition to document constraints, each stage can constrain on work item field values:Comparison Operators
Constraint values support five comparison operators for flexible matching:When a constraint value is a plain string (not an object), it is treated as an
equals comparison. Use the object syntax only when you need a different operator.Logical Operators
AND Logic (Between Constraints)
Multiple constraints within the same stage are combined with AND logic. All conditions must be true for an entity to pass the constraint:OR Logic (Within Document Block)
Inside thedocument block, OR logic is supported. An entity passes the constraint if it matches any of the document conditions:
Dynamic Context Constraints
Constraints can reference the current runtime context using special context expressions. This enables constraints that are resolved dynamically based on the active sheet session.The full list of available context variables may extend beyond
$currentDocument. Consult the application release notes for the latest supported context expressions.Constraint Composition
Constraints can be defined at multiple stages simultaneously on the same entity type. When combined, stages cascade as described above.Composition Example
Complete YAML Examples
Load-Only Constraint
Restrict an entity type to only show work items from a specific document:UserNeed items in the “Requirements” document are loaded into the sheet. Pickers and creation inherit this constraint.
Pick-Only Constraint
Allow all entities to load but restrict picker options:SystemRequirement items load normally. Picker dialogs only show items with status approved or reviewed. Since no create constraints are defined, the pick constraints apply as a fallback during creation as well.
Create-Only Constraint
Set default values when creating new entities without affecting loading or picking:severity: low and status: draft.
Current-Document Scoping
Dynamically scope all stages to the currently open document:Multi-Stage Composition
A complete example combining all three stages with different scoping:UserNeeditems load from the current document, pickers show only approved/reviewed/draft items from that document, and new items default toseverity: mediumSystemRequirementitems load from the current document, pickers show only high/critical severity items from that document- The
relationshipssection connects the two entity types — picker constraints onUserNeedaffect which items appear when linking aSystemRequirementto user needs
Constraints and Relationships
Constraints interact with Relationships through picker behavior. When a sheet column binds to a navigation property (e.g.,userNeeds or chapter), the picker dialog for that column uses the pick constraints defined on the target entity type.
For details on how cardinality affects column bindings, see Cardinality. For details on column binding syntax, see Binding Syntax.
Sheet-Level Constraints
In addition to data model constraints, constraints can also be applied at the sheet configuration level through source queries. Source-level constraints use thequery and expand syntax rather than the constraints YAML key.
- Data model constraints (this page) define permanent scoping rules for an entity type across all sheets
- Source query constraints restrict which entities appear in a specific sheet configuration