As you can read in the What Work Items are visible on the Risksheet the risksheet can show the upstream traceability data.


By default, the first column shows the items linked to the risk items.





Config file

Please follow this article, to learn where is the configuration file located, see:  Configure risksheet columns



Configuration

The upstream / parent column is a table column with the following parameters


  1. set "type" of the column to "itemLink"
  2. set "typeProperties"in a way that
    1. "linkRole" points to a work item link role connecting risk item to parent item
    2. "linkTypes" points to a work item types that shall be considered as parent items


"columns": [
    {
      "headerGroup":"Potential risks",
      "header": "Item/Func",
      "type": "itemLink",
      "width": 150,
      "filterable":true,
      "level": 1,
      "typeProperties":  {  
          "linkRole": "assesses",
          "linkTypes": "systemrequirement,softwarerequirement"
          }
    },


Where to load data from?

1) Query

You can specify the base query (this can be combined with all other options)


    ...
      "typeProperties": {
        "linkRole": "assessedHarm",
        "linkTypes": "harm",
        "query":"status:released"
      }
   ...

2) Document and/or Project

In addition to Query, or without a query, you can specify from what live document the items shall be loaded. The project can be from current document or in another specified project. Or you can omit the document, and use just project to load it from other project.


....
      "typeProperties": {
        "linkRole": "assessedHarm",
        "linkTypes": "harm",
        "document":"Risks/harms" ,
        "project":"med_library",
        "query":"status:released"
      }
...


3) Suggest items based on other column values
You may want to suggest items (open picker) based on other column. E.g. load situations that are linked with events...

The queryFactory can be used as extension to any previous config options

 

{
...
    "queryFactories":{
      "situationsQuery":"function(info){return 'linkedWorkItems:'+info.item['assessedSequence']}"
    },
  "formulas": ...   
 ...
  "columns": [
   ...
    {
      "headerGroup": "Hazards and Harms",
      "headerGroupCss": "headPotentialRisks",
      "headerCss": "headPotentialRisks",
      "header": "Hazardous Situation",
      "type": "itemLink",
      "width": 150,
      "filterable": true,
      "level": 3,
      "id": "assessedHazardousSituation",
      "bindings": "assessedHazardousSituation.description",
      "typeProperties": {
        "linkRole": "assessedHazardousSituation",
        "linkTypes": "hazardousSituation",
        "queryFactory":"situationsQuery",
        "createInCurrentDocument":true,
        "document":"Risks/hazardSituations"
      }
    },
  
   ...
}


Where to create new items

As you know, if no item is  found, the system suggest to create a new upstream object.


Disable "Create New" upstream object

You can disable this behaviour by placing "canCreate":false into the column (not to type properties)


    {
      "headerGroup": "Hazards and Harms",
      "headerGroupCss": "headPotentialRisks",
      "headerCss": "headPotentialRisks",
      "header": "Harm",
      "type": "itemLink",
      "width": 150,
      "filterable": true,
      "level": 4,
      "id": "assessedHarm",
      "bindings": "assessedHarm.title",
      "canCreate": false,
      "typeProperties": {
        "linkRole": "assessedHarm",
        "linkTypes": "harm",
        "document":"Risks/harms" ,
        "query":"status:released"
      }
    },


Create new object in current document

By default the new items are created in the same place where they are loaded from (see above). You can force the system to create a new items in current "risksheet" document using "createInCurrentDocument":true


{
      "headerGroup": "Hazards and Harms",
      "headerGroupCss": "headPotentialRisks",
      "headerCss": "headPotentialRisks",
      "header": "Hazardous Situation",
      "type": "itemLink",
      "width": 150,
      "filterable": true,
      "level": 3,
      "id": "assessedHazardousSituation",
      "bindings": "assessedHazardousSituation.description",
      "typeProperties": {
        "linkRole": "assessedHazardousSituation",
        "linkTypes": "hazardousSituation",
        "queryFactory":"situationsQuery",
        "createInCurrentDocument":true,
        "document":"Risks/hazardSituations"
      }
    },