Query Types
Risksheet supports two query syntaxes:Lucene Query Basics
Lucene queries filter work items based on field values using standard Polarion query syntax.Operators
Common Fields
Query Assembly
- Type filter — Work item type from
dataTypes.<name>.type(additional types on a link column come fromtypeProperties.linkTypes), combined with OR if multiple - Project scope — Current project identifier
- Document scope — Current document/module path (quoted to handle spaces)
- Custom query — Additional user-defined conditions from the
queryproperty
Query in Configuration
Data Type Query
ThedataTypes configuration uses the query property to add custom filtering to the generated query:
Escaped Quotation Marks in JSON
When embedding queries that contain quotation marks inside sheet configuration, escape the inner quotes with a backslash (\"):
SQL Query Support
Risksheet supports SQL queries for complex filtering scenarios using theSQL:(...) prefix:
SQL query syntax and available tables/fields depend on your Polarion server version. Verify supported SQL constructs in your environment before deploying.
Query Factory
Query factories provide dynamic query filtering through custom JavaScript functions registered on thewindow.risksheet.queryFactories object. They enable context-aware filtering of linked items in autocomplete dropdowns.
See JavaScript API for the full query factory API.
Document Path Handling
Document IDs with_default/ prefix (default modules) have the prefix automatically stripped before query construction. Document paths containing spaces or special characters are automatically quoted in the generated query.
Autocomplete Search Behavior
The autocomplete suggestion system uses queries to search for matching work items:Suggestions are automatically scoped to the current project. Cross-project suggestions are not available in the default autocomplete. Newly created items that have not been saved appear in suggestions for the current session.
Complete Example
A full configuration demonstrating query usage across data types and columns:- Loads FMEA risk items for
productFamily_A, excluding those withrejectedstatus - Loads
mitigationtask items, excludingcloseditems - Provides item link columns for requirements (with creation) and hazards, each with custom query factory filtering
Related Pages
- Configuration Properties Index — all configuration properties
- Risksheet.json Format — sheet configuration structure
- Suggestion and Autocomplete API — autocomplete endpoint reference
- JavaScript API — query factory registration
- Item Link Columns — item link column configuration
- Top Panel Template — bridging server data for query factories