Skip to main content

Step 1: Understand the Query System

Risksheet builds Lucene queries to retrieve work items from Polarion. The query combines three components using AND logic:
  1. Type filter — which work item types to include
  2. Project/document scope — restricts to the current document
  3. Custom query — your optional additional filter
Query Assembly:

  Work Item Type Filter (from dataTypes.risk.type)
         +
  Project & Document Scope (automatic)
         +
  Custom Query (from dataTypes.risk.query)
         =
  Final Lucene Query

Step 2: Configure Work Item Type Filtering

Specify which work item types appear in the Risksheet using the dataTypes configuration. Multiple types are combined with OR logic.
{
  "dataTypes": {
    "risk": {
      "type": "fmeaRisk",
      "role": "relates_to"
    },
    "task": {
      "type": "mitigationTask",
      "role": "has_parent"
    }
  }
}
The type property must specify at least one work item type. If no type is configured, the system raises an error and no items are loaded.

Step 3: Add Custom Query Filters

Add a query property to your data type configuration to apply additional Lucene filters:
{
  "dataTypes": {
    "risk": {
      "type": "fmeaRisk",
      "query": "status:open OR status:draft"
    }
  }
}
The custom query is ANDed with the type and scope filters. Empty or whitespace-only queries are automatically ignored.

Step 4: Use Escaped Quotation Marks

When embedding queries with quotation marks in risksheet.json, use backslash escaping:
{
  "dataTypes": {
    "risk": {
      "type": "fmeaRisk",
      "query": "customField:\"Product Family A\""
    }
  }
}
Risksheet supports SQL queries for complex work item filtering using the SQL:(...) prefix syntax. This is useful when Lucene queries cannot express the required filtering logic.

Step 5: Configure Autocomplete Search Behavior

Control how the item search and autocomplete behaves when linking items. These properties are set in Administration > Nextedy Risksheet at the project level:
PropertyDefaultDescription
Fuzzy SearchtrueAllows approximate matches for typos
Wildcard SearchtrueEnables * and ? wildcards
Keyword Search RequiredfalseWhen true, keywords are mandatory
Suggestion Result Limit20Maximum autocomplete results
All-Field SearchfalseSearch all fields, not just primary
Set nextedy.risksheet.isSearchAllFieldsWhenSearchingLinkedItems=true in Polarion Configuration Properties to search through all fields when searching linked items, not just the default fields.

Step 6: Configure Multi-Project Queries

When working with cross-project Risksheets, you can define multiple projects for upstream columns using configuration properties with Velocity snippets.
When using configuration properties to define multi-project upstream columns, empty property values after the = sign cause errors. Always ensure configuration properties have valid values, and use direct project IDs rather than nested configuration property variables.

Verification

Open your Risksheet document and verify that:
  1. Only work items matching your configured types appear in the grid.
  2. Custom query filters correctly limit the displayed items.
  3. Autocomplete search returns relevant results when linking items.
You should now see only the work items that match your query configuration, with autocomplete suggestions filtered according to your search settings.

See Also

Support TicketsSource Code
  • QueryBuilder.java
  • SuggestionServlet.java
  • MultiItemLinkEditor.ts
  • RisksheetViewServlet.java
  • TextEditor.ts