Skip to main content

When to Consolidate

You might have separate columns for each linked item type:

Step 1: Define All Types in the Data Type

Configure the data type to include all work item types you want to display, using linkTypes in the typeProperties:
{
  "testCase": {
    "type": "systemTestCase",
    "role": "verifies",
    "typeProperties": {
      "linkTypes": "systemTestCase,softwareTestCase,integrationTestCase"
    }
  }
}
The linkTypes property accepts a comma-separated list of Polarion work item type IDs. Replace your separate itemLink columns with a single multiItemLink column:
{
  "columns": [
    {
      "id": "allTestCases",
      "binding": "testCase",
      "header": "Test Cases",
      "type": "multiItemLink",
      "width": 250
    }
  ]
}
The itemLink type displays only one linked item per cell. If multiple items are linked, additional links are silently dropped. Always use multiItemLink when consolidating multiple link types into one column.

Step 3: Configure Saved Views

Use saved views to switch between the consolidated view and individual columns. Define a view that shows only the consolidated column and another that shows the individual type columns:
{
  "views": [
    {
      "name": "Consolidated",
      "columns": ["riskId", "riskTitle", "allTestCases", "rpn"]
    },
    {
      "name": "By Test Type",
      "columns": ["riskId", "riskTitle", "systemTests", "softwareTests", "integrationTests", "rpn"]
    }
  ]
}
Consolidating link columns into one general column combined with saved views provides a better overview for day-to-day use, while keeping the detailed per-type view available when needed.

Step 4: Control Item Creation Target

When using a consolidated column, specify where newly created items should be stored:
{
  "dataTypes": {
    "testCase": {
      "type": "systemTestCase",
      "role": "verifies",
      "typeProperties": {
        "linkTypes": "systemTestCase,softwareTestCase",
        "project": "TestProject",
        "document": "Testing/Test Specification"
      }
    }
  }
}
When both project and document are specified, newly created items from the consolidated column are stored in the specified document.

Step 5: Prevent Creation if Needed

If the consolidated column should only display existing links without allowing new item creation:
{
  "id": "allTestCases",
  "binding": "testCase",
  "header": "Test Cases",
  "type": "multiItemLink",
  "canCreate": false,
  "width": 250
}
If you reference link column IDs in levels or sortBy configuration, ensure the IDs exactly match the column definitions. Mismatched IDs cause row duplication in the grid.

Verification

Save the configuration and reload your Risksheet. You should now see the single consolidated column displaying all linked items from the different types. Each item appears as a separate entry in the cell. Switch between saved views to confirm both the consolidated and individual column views work correctly.

See Also

KB ArticlesSupport TicketsSource Code
  • CustomMergeManager.ts
  • GridUndoStack.ts
  • SheetConstants.ts
  • CellEditorFormatter.ts
  • ExportToExcel.ts