Overview
Queries determine the scope of data loaded into a Risksheet:- Master query: Which risk items appear as main rows
- Task query: Which mitigation/downstream items are available for linking
Basic Syntax
Field:Value Matching
Match items where a field equals a specific value:Multiple Conditions (AND)
All conditions must match (AND logic):Multiple Values (OR)
Any value can match (OR logic):Negation (NOT)
Exclude items matching a condition:Polarion-Specific Fields
Standard Work Item Fields
| Field | Type | Example | Notes |
|---|---|---|---|
type | string | type:requirement | Work item type (requirement, task, defect, etc.) |
status | string | status:open | Workflow status |
project | string | project:MyProject | Project ID |
title | string | title:"System Safety" | Item title (quote for exact match) |
id | string | id:REQ-001 | Work item ID |
assignee | string | assignee:john.doe | Assigned user login |
created | date | created:[2025-01-01 TO 2025-12-31] | Creation date range |
modified | date | modified:[2025-01-01 TO NOW] | Last modified date range |
author | string | author:jane.smith | Item creator |
Module/Document Fields
| Field | Type | Example | Notes |
|---|---|---|---|
module | string | module:"FMEA/System" | Wiki document/module containing the item |
space | string | space:default | Document space |
Link Relationship Fields
| Field | Type | Example | Notes |
|---|---|---|---|
linkedWorkItem.type | string | linkedWorkItem.type:task | Type of linked item |
linkedWorkItem.status | string | linkedWorkItem.status:resolved | Status of linked item |
linkedRole | string | linkedRole:implements | Link role name |
Date Range Queries
Inclusive Range
Match items created between two dates:Open-Ended Range
Items created after a specific date:Text Search
Phrase Search (Exact Match)
Quote phrases to match exact text:Substring/Contains
Match items containing text anywhere in a field:Wildcard Search
Use* for any characters, ? for single character:
Configuration Examples
Example 1: FMEA Failure Modes
Load all requirement-type items in the current document:Example 2: Open Tasks Only
Retrieve only non-closed mitigation tasks:Example 3: Multiple Item Types
Include both requirements and defects as risks:Example 4: Exclude Draft Items
Show all items except those in draft status:Example 5: Recently Modified
Show only items modified in the last 30 days:Query Scope and Expansion
Automatic Scope Addition
The RISKSHEET system automatically adds scope to queries: Original query:Document ID Handling
Document IDs with the_default/ prefix are automatically normalized:
Input: module:"_default/MyFolder/MyDoc"
Processed to: module:"MyFolder/MyDoc"
Query Processing Flowchart
Custom Field Queries
Simple Custom Fields
Query custom field values using the field key:Custom Field Patterns
| Pattern | Example | Matches |
|---|---|---|
| String match | custom_phase:"Design" | Exact value |
| Enum value | custom_category:(A OR B OR C) | Multiple options |
| Date range | custom_deadline:[2025-01-01 TO 2025-12-31] | Date bounds |
| Numeric | custom_points:[10 TO 100] | Numeric range |
Document-Level Custom Fields
For queries that filter by document-level custom field values, use the.KEY syntax:
Linked Item Queries
Query Items Linked to Specific Type
Find items that are linked to tasks:Query by Link Role
Find items using a specific link relationship:Combined: Items Linked as “Implements”
Special Query Values
Current User
Some Polarion implementations support dynamic values:Empty/Null Fields
Match items with unset fields:Query Validation
Invalid queries are caught during parsing: If a query is invalid, the RISKSHEET may:- Log an error in the browser console
- Use a fallback query (usually all items)
- Display an error message in the UI
Performance Considerations
Multi-Project Queries
By default, queries are scoped to the current project. To query across projects:Related Pages
- Configure Queries Guide — How to set up queries
- Data Model — Work item structure and fields
- Traceability — How linked items work
- Work Item Visibility — Controlling which items appear
Sources
Sources
Support TicketsSource Code
QueryBuilder.javaAppConfig.tsMultiItemLinkEditor.tsSuggestionServlet.javaOpenInTableCommand.ts