Skip to main content

Step 1: Choose the Right Column Type

Risksheet supports two link column types:
Column TypeBehavior
itemLinkDisplays a single linked work item per cell. Additional links are silently dropped.
multiItemLinkDisplays all linked work items as a formatted list within the cell.
Use multiItemLink when a risk item may have multiple upstream or downstream relationships of the same type. Set the column type to multiItemLink in your risksheet.json:
{
  "columns": [
    {
      "id": "safetyRequirements",
      "binding": "safetyReq",
      "header": "Safety Requirements",
      "type": "multiItemLink",
      "width": 200
    }
  ]
}
Each linked item appears as a separate entry in the cell with its ID and title displayed in a tooltip.
{
  "dataTypes": {
    "testCase": {
      "type": "systemTestCase",
      "role": "verifies",
      "typeProperties": {
        "linkTypes": "systemTestCase,softwareTestCase"
      }
    }
  },
  "columns": [
    {
      "id": "testCases",
      "binding": "testCase",
      "header": "Test Cases",
      "type": "multiItemLink",
      "width": 200
    }
  ]
}
When displaying multiple linked items of different types in one cell, you must use multiItemLink. The itemLink type shows only one item per cell and silently drops additional links, which can be confusing if you expect to see all related items.

Step 4: Control Item Creation

By default, multiItemLink columns allow users to create new items directly from the cell editor (canCreate defaults to true). To restrict the column to linking existing items only:
{
  "id": "testCases",
  "binding": "testCase",
  "header": "Test Cases",
  "type": "multiItemLink",
  "canCreate": false,
  "width": 200
}
The multi-item link editor automatically prevents duplicate items. If you attempt to link the same work item twice, the selection is rejected and you receive a notification.

Step 5: Save New Items to a Specific Document

When creating new items through a multiItemLink column, you can specify the target project and document where the items are stored:
{
  "dataTypes": {
    "testCase": {
      "type": "systemTestCase",
      "role": "verifies",
      "typeProperties": {
        "project": "TestProject",
        "document": "Testing/Test Specification"
      }
    }
  }
}
When you click on a multiItemLink cell, an autocomplete editor opens. You can:
  • Type at least 3 characters to search for items by ID or title
  • Select items from the dropdown to add them
  • Remove items by clicking the remove button next to each entry
  • Create new items (if canCreate is true) by typing a new title and selecting the creation option
If you see the message “This item is already linked to selected row,” it means the work item you are trying to link is already present in the cell. Each item can only appear once per cell.

Verification

Save the configuration and reload your Risksheet. You should now see the multi-item link column. Click on a cell to open the editor, search for items, and add multiple links. Each linked item should appear as a separate entry within the cell.

See Also