Skip to main content

Column Type Identifier

type: "itemLink"

Core Properties

PropertyTypeDefaultDescription
typestringMust be set to itemLink to create a single-item linking column
headerstringRequiredDisplay name shown in column header
idstringAuto-generatedUnique identifier for the column; auto-generated from header or binding if not specified
bindingsstringPolarion field path (e.g., harm, requirement) for auto-detection of column type and nested sub-columns
widthnumberColumn width in pixels
levelnumber1Hierarchical level where this column appears (1 = top level, 2 = second level)
filterablebooleantrueWhether users can filter by this column’s values
readOnlybooleanfalseWhether the column is editable (upstream sub-columns default to true)

Type Properties Configuration

The typeProperties object controls link behavior and filtering:
PropertyTypeDefaultDescription
linkRolestringRequiredPolarion link role name defining the relationship type (e.g., assesses, harm, effect)
linkTypesstringRequiredComma-separated list of allowed work item types for linking (e.g., requirement,systemrequirement)
createInCurrentDocumentbooleanfalseWhether users can create new linked items directly in the current document
queryFactorystringCustom JavaScript function name for filtering available linked items in the editor
itemTemplatestringVelocity template for custom item rendering (see Customize Link Rendering)

Basic Configuration Example

{
  "header": "Requirement",
  "type": "itemLink",
  "width": 150,
  "id": "requirement",
  "bindings": "requirement",
  "level": 1,
  "filterable": true,
  "typeProperties": {
    "linkRole": "assesses",
    "linkTypes": "requirement"
  }
}

Nested Sub-Columns

ItemLink columns support nested sub-columns using dot notation. Sub-columns display fields from the linked item:
{
  "header": "Requirement Status",
  "type": "workflow",
  "bindings": "requirement.status",
  "level": 2,
  "readOnly": true
}
PropertyTypeDefaultDescription
levelnumberparent+1Sub-columns automatically appear at parent level + 1
bindingsstringRequiredMust start with parent column’s binding (e.g., requirement.severity)
readOnlybooleantrueUpstream sub-columns default to read-only; set to false to enable editing

Editor Behavior

When users click an itemLink cell, the system displays an autocomplete editor:
  • Autocomplete suggestions query matching work items by ID or name
  • Selecting a suggestion auto-populates all nested sub-columns
  • “Create new item” option appears if createInCurrentDocument: true
  • New items are created within the current document attachment

Editing Upstream Sub-Columns

By default, sub-columns showing linked item properties are read-only. Enable editing by setting readOnly: false:
{
  "header": "Requirement Severity",
  "bindings": "requirement.severity",
  "type": "enum:severity_rating",
  "level": 2,
  "readOnly": false
}
Editing upstream sub-columns modifies the linked work item directly. Changes affect all references to that linked item, not just the current RISKSHEET row. Users should verify permissions before enabling edits.
Change the default behavior globally via Polarion configuration:
nextedy.risksheet.upstreamSubColumnsReadonly=false

Custom Item Rendering

Use itemTemplate to display additional information alongside the item link. The template uses Velocity syntax and receives the $item variable:
{
  "header": "Effect",
  "type": "itemLink",
  "typeProperties": {
    "linkRole": "effect",
    "linkTypes": "risk",
    "itemTemplate": "<span>$item.fields().description().render().htmlFor().forFrame()</span> <span style='white-space: nowrap;'>[S:$item.fields().get(\"severityRating\").render().withIcon(false).htmlFor().forFrame()]</span>"
  }
}

Filtering Linked Items

Use a queryFactory to restrict which work items appear in the autocomplete editor:
{
  "header": "Active Requirement",
  "type": "itemLink",
  "typeProperties": {
    "linkRole": "assesses",
    "linkTypes": "requirement",
    "queryFactory": "filterActiveRequirements"
  }
}
Define the filter function in JavaScript:
window.filterActiveRequirements = function(item, colDef, config) {
  // Return OData $filter expression
  return "fields/status ne 'closed'";
};

Restrictions and Limitations

LimitationDetails
Single link per cellUse multiItemLink for multiple items per cell
No sub-columns with multiItemLinkmultiItemLink columns cannot have nested sub-columns; use serverRender instead
Temporary ID prefixNew items get IDs starting with * until saved
Cross-project linksSupported using IdProject format (projectId/itemId)

Data Type Conversion

ItemLink columns are stored and transmitted as object references:
ContextFormatExample
Grid displayFormatted linkREQ-001 (clickable)
OData responseIdProject object{"id": "REQ-001", "project": "MYPROJECT"}
ConfigurationString bindingrequirement or requirement.severity
Temporary stateString with prefix*REQ-001 (unsaved item)

Permission Handling

ScenarioBehavior
User lacks edit permissionColumn becomes read-only
Linked item is deletedCell displays error state; link becomes invalid
User cannot create items”Create new item” option hidden from editor
Cross-project link deniedLink appears as read-only reference

Undo/Redo Support

ItemLink edits are fully supported by the undo/redo system:
  • Undo/redo individual link changes (Ctrl+Z / Ctrl+Y)
  • Dependent sub-column values automatically restore on undo
  • New unsaved items (IDs with *) cannot be restored if deleted before save

See Also

KB ArticlesSupport TicketsSource Code
  • SheetConstants.ts
  • RiskSheetContextMenu.ts
  • PolarionAppConfigManager.java
  • ExportToExcel.ts
  • risksheet.json