Prerequisites
Filter Link Suggestions with queryFactory
A query factory is a named JavaScript function that returns a Lucene query string. The query string is appended to the autocomplete search criteria for a link column, so the suggestion dropdown only shows work items that match both the user’s typed text and your filter.
Step 1: Define the Query Factory in the Sheet Configuration
Query factories live in the top-level queryFactories section of the sheet configuration. Each entry is a named function that receives an info object (current row context) and returns a Lucene query string.
This factory filters suggestions to work items linked to the same system element selected in the current row. If no element is selected yet, the factory returns an empty string (no extra filter applied).
Step 2: Reference the Query Factory from a Link Column
For itemLink and multiItemLink columns, set queryFactory inside the column’s typeProperties block. The value is the name of the registered factory:
When users type in the autocomplete, Risksheet calls filterBySystemElement(info) with the current row data, appends the returned query to the search, and shows only matching work items.
Step 3: Reload and Verify
Save the sheet configuration. The autocomplete requires a minimum of 3 characters before the search triggers — type at least three characters in the link cell and confirm that suggestions are now limited to items matching your filter.
Interactive Filtering from the Top Panel
A query factory can read user input from the top panel (risksheetTopPanel.vm) using jQuery, turning a dropdown into a live filter for autocomplete suggestions.
Users pick a classification in the top panel (for example, a <select id="asilFilter"> element), and itemLink autocomplete results update on the next search. This pattern enables stage-by-stage analysis without rewriting the sheet configuration.
Make Link Columns Conditionally Read-Only
To lock a link column based on row data, use a cell decorator that appends the column’s field ID to info.item.systemReadOnlyFields. This property is a pipe-delimited string (not an array), and a column whose binding appears between two pipes becomes read-only for that specific row.
The column property is cellRenderer, and its value names a function defined in the cellDecorators section. The built-in rs-readonly CSS class grays the cell out so users see the locked state.
Use queryFactory to filter what users can choose, and cellRenderer plus systemReadOnlyFields to lock cells entirely based on workflow state. The two mechanisms complement each other for comprehensive link control.
Enable Link Role Compliance
From Risksheet 24.2.2 onward, the checkLinkRoleCompliance property validates multiple link roles from risk items. It is disabled by default and must be enabled explicitly:
- Navigate to Administration > Nextedy Risksheet > Setup at the Polarion server level
- Add the configuration property
nextedy.risksheet.checkLinkRoleCompliance=true
- Save and restart the Polarion service
checkLinkRoleCompliance changes how link roles are validated. Enabling it on an existing project may affect link column behavior. Test in a sandbox project before applying it in production.
Link Column Behavior Summary
Troubleshooting
Query factory function not called. Verify the factory is defined in the queryFactories section of the sheet configuration and that typeProperties.queryFactory on the column matches the factory name exactly.
“This item is already linked to selected row”. The multiItemLink editor prevents duplicate links automatically. Each work item can be linked only once per cell.
“Invalid column config, itemLink bindings without dot”. The bindings value for an itemLink column displaying a linked field must include a dot separator (for example, requirement.title). Verify the binding format.
See Also