API Endpoint
The suggestion API is accessed through the following endpoint:
GET /risksheet/suggestion/
POST /risksheet/suggestion/
Both GET and POST requests are supported for flexibility in different scenarios.
Request Parameters
Parameter Type Required Description fieldstring Yes The field or column identifier to get suggestions for projectstring Yes The Polarion project key to scope suggestions querystring No The partial text the user typed to filter suggestions limitinteger No Maximum number of suggestions to return (default: 50) fuzzyboolean No Enable fuzzy matching for typo tolerance (default: true) starboolean No Enable wildcard search with asterisk (*) character (default: true) allboolean No Require all keywords to match (AND logic) vs any keyword (OR logic) (default: false) typestring No Work item type filter for link suggestions changesobject No Local pending changes to include in suggestions
The API returns an array of suggestion objects:
[
{
"id" : "REQ-1234" ,
"label" : "User Authentication System" ,
"type" : "Requirement" ,
"project" : "PROJ" ,
"description" : "Handles user login and session management"
},
{
"id" : "*temp-1" ,
"label" : "New Risk Item" ,
"type" : "Risk" ,
"isNew" : true
}
]
Suggestion Types
Text Field Suggestions
For regular text columns, the API returns previously entered values in that column across all work items.
Property Type Description labelstring The previously entered text value frequencyinteger Number of times this value appears in the column typestring Always “text” for text field suggestions
Item Link Suggestions
For item link columns, the API queries work items by ID and title using OData endpoints.
Property Type Description idstring The Polarion work item ID (e.g., “REQ-1234”) labelstring The work item title or display name typestring The work item type (Requirement, Task, etc.) projectstring The Polarion project key descriptionstring Additional work item metadata isNewboolean True if this is a locally created item (ID starts with *) canCreateboolean True if the user can create new items of this type
Task Link Suggestions
Task link columns provide filtered suggestions excluding tasks already in the current table.
Property Type Description idstring The task work item ID labelstring Task title typestring Always the configured task type isSelectedboolean True if this task is already linked in this table disabledboolean True if the task cannot be selected (already in table)
Enum Suggestions
For enumeration columns, the API returns available enum values from configuration.
Property Type Description idstring The enumeration ID/value labelstring The display label for this enum value descriptionstring Additional enum description ratingstring Associated rating for severity/occurrence enums
Search Features
Fuzzy Search
When enabled (default), fuzzy matching allows suggestions even with minor spelling variations:
User types: "authentiction"
Returns: "Authentication System" (fuzzy match, 1 character difference)
Wildcard Search
Users can search with asterisk (*) wildcards to find partial matches:
Query: *api*
Returns: "REST API", "GraphQL API", "Payment API" (all containing 'api')
Query: user*
Returns: "User Authentication", "User Preferences", "User Groups"
Keyword Matching Modes
The all parameter controls how multiple keywords combine:
AND Mode (all=true):
Query: "user authentication"
Returns: Only items containing BOTH "user" AND "authentication"
OR Mode (all=false, default):
Query: "user authentication"
Returns: Items containing "user" OR "authentication" OR both
Project-Scoped Filtering
All suggestions are automatically scoped to the specified Polarion project. Cross-project suggestions are not returned by default, though configuration may support cross-project linking scenarios.
Local Changes Integration
The changes parameter allows newly created items to appear in suggestions before they’re saved to the server:
// Newly created risk item (not yet saved)
const changes = {
"*new-risk-1" : {
"id" : "*new-risk-1" ,
"title" : "New Safety Risk" ,
"type" : "Risk"
}
};
// This item now appears in link suggestions
New items are identified by IDs starting with * and typically appear at the top of suggestion lists.
Result Limiting
The limit parameter prevents overwhelming UI with too many suggestions:
Limit Value Use Case Performance 10-20 Constrained UI (dropdown height) Very fast 50 Default balanced setting Fast 100+ Comprehensive search May require refined query
Column-Type Specific Configuration
Suggestion behavior varies by column type:
Text Field:
- Suggests previously entered values
- Configurable via suggestTextFields property
- Includes local unsaved entries
Item Link:
- Queries Polarion work items by ID/title
- Supports custom query filters
- Can enable creation of new items (canCreate=true)
Task Link:
- Filters out already-selected tasks
- Supports dependency-based filtering
- Validates uniqueness
Enum Dropdown:
- Returns configured enumeration values
- Supports dependent enum relationships
- Shows rating associations
Validation and Error Handling
Invalid Selections
When a user selects or enters an invalid value, the cell receives the cell-invalid CSS class:
< div class = "wj-cell cell-invalid" > Invalid Entry </ div >
This typically renders with a red border or highlight to indicate validation failure.
Duplicate Prevention
For multi-item link columns, the system prevents selecting the same item twice:
User selects: REQ-1234
User tries to select: REQ-1234 again
Result: Toast message "Item is already selected"
Action: Selection is ignored
API Flow Diagram
Configuration Properties
Global Settings
Property Type Default Description global.suggestTextFieldsboolean true Enable text field autocomplete suggestions suggestionLimitinteger 50 Maximum suggestions to return fuzzySearchEnabledboolean true Enable fuzzy matching by default wildcardSearchEnabledboolean true Enable wildcard (*) searching
Project-Level Settings
Property Type Default Description suggester.keywordMandatoryboolean false Require all keywords to match suggester.fuzzyMatchboolean true Enable fuzzy search for this project suggester.wildcardSearchboolean true Enable wildcard search for this project suggester.resultLimitinteger 20 Maximum suggestions for this project suggester.allFieldSearchboolean false Search all fields vs primary fields only
Column-Specific Settings
Property Type Default Description column.canCreateboolean false Allow creation of new linked items from suggester column.queryFactorystring null Custom OData filter function for suggestions column.validatorstring null Custom validation function for suggested values
Reduce the limit parameter for constrained UIs or set fuzzySearchEnabled=false for faster exact matching when your data is clean and complete.
Local changes (unsaved items) are only visible to the current user session. They are not persisted until the document is saved to the server.
For advanced scenarios, use queryFactory to inject OData filter expressions. This enables context-aware suggestions based on other column values or business logic.
Related Pages
Source Code
CellEditorFormatter.ts
TextEditor.ts
SuggestionServlet.java
AppConfig.ts
RisksheetProjectProperties.java