Skip to main content

Define Rating Scales

Add your risk parameter scales to the ratings section of risksheet.json. Each scale defines the enumeration values available in dropdown columns:
{
  "ratings": {
    "severity": [
      { "id": "1", "name": "Negligible", "description": "No effect on safety" },
      { "id": "2", "name": "Minor", "description": "Slight degradation" },
      { "id": "3", "name": "Moderate", "description": "Significant degradation" },
      { "id": "4", "name": "Major", "description": "Severe injury possible" },
      { "id": "5", "name": "Catastrophic", "description": "Fatality or permanent disability" }
    ],
    "occurrence": [
      { "id": "1", "name": "Remote", "description": "< 1 in 10,000" },
      { "id": "2", "name": "Low", "description": "1 in 5,000" },
      { "id": "3", "name": "Moderate", "description": "1 in 200" },
      { "id": "4", "name": "High", "description": "1 in 20" },
      { "id": "5", "name": "Very High", "description": "> 1 in 10" }
    ],
    "detection": [
      { "id": "1", "name": "Almost Certain", "description": "Will detect before release" },
      { "id": "3", "name": "High", "description": "Good chance of detection" },
      { "id": "5", "name": "Moderate", "description": "May detect" },
      { "id": "7", "name": "Low", "description": "Unlikely to detect" },
      { "id": "10", "name": "None", "description": "No detection method" }
    ]
  }
}
Each rating entry has three required fields:
FieldDescription
idNumeric value used in formulas (stored as string)
nameDisplay label shown in the dropdown
descriptionTooltip text explaining the rating level

Configure Rating Columns

Bind columns to your rating scales using the enum:<ratingId> type syntax:
{
  "columns": [
    { "id": "sev", "binding": "severity", "header": "S", "type": "enum:severity" },
    { "id": "occ", "binding": "occurrence", "header": "O", "type": "enum:occurrence" },
    { "id": "det", "binding": "detection", "header": "D", "type": "enum:detection" },
    { "id": "rpn", "binding": "rpn", "header": "RPN", "formula": "commonRpn" }
  ]
}
The formula property on the RPN column references a named formula from the formulas section. Columns with formula set become read-only by default.

Add RPN Formulas

Define formulas that calculate the Risk Priority Number from your rating values. The standard FMEA formula multiplies severity, occurrence, and detection:
{
  "formulas": {
    "commonRpn": "function(info){ var value = info.item['occ']*info.item['det']*info.item['sev']; return value ? value : null; }",
    "commonRpnNew": "function(info){ var value = info.item['occNew']*info.item['detNew']*info.item['sevNew']; return value ? value : null; }"
  }
}
  • commonRpn calculates the initial RPN before mitigation (S x O x D)
  • commonRpnNew calculates the revised RPN after mitigation actions are applied
diagram
For probability/severity matrices (without detection), implement a riskValue function that maps severity and probability combinations to risk categories such as acceptable, further investigation, or unacceptable. See Set Up Action Priority Matrix for this approach.

Apply Conditional Formatting

Use cellDecorators and styles to color-code cells based on RPN thresholds:
{
  "cellDecorators": {
    "rpn": "function(info){ var val = info.value; $(info.cell).toggleClass('boldCol', true); $(info.cell).toggleClass('rpn1', val > 0 && val <= 150); $(info.cell).toggleClass('rpn2', val > 150 && val <= 350); $(info.cell).toggleClass('rpn3', val > 350); }"
  },
  "styles": {
    ".boldCol": "{ font-weight: 600; }",
    ".rpn1": "{ background-color: #eaf5e9 !important; color: #1d5f20 !important; }",
    ".rpn2": "{ background-color: #fff3d2 !important; color: #735602 !important; }",
    ".rpn3": "{ background-color: #f8eae7 !important; color: #ab1c00 !important; }"
  }
}
This creates a three-tier visual risk matrix:
RPN RangeCSS ClassColorRisk Level
1 — 150.rpn1GreenLow
151 — 350.rpn2YellowMedium
> 350.rpn3RedHigh
When configuring severity from a linked item (e.g., Accident or Harm), verify that the formula references the correct field binding. The formula accesses info.item['fieldBinding'] — if the severity value comes from a different work item type in the hierarchy, adjust the binding path accordingly.

Configure Row Header Risk Indicator

Apply the risk level to row headers for at-a-glance assessment using the headers.rowHeader.renderer property:
{
  "headers": {
    "rowHeader": {
      "renderer": "rowHeaderRpnNew"
    }
  },
  "cellDecorators": {
    "rowHeaderRpnNew": "function(info){ var val = info.item['rpnNew']; $(info.cell).toggleClass('rpn1', val > 0 && val <= 150); $(info.cell).toggleClass('rpn2', val > 0 && val > 150 && val <= 350); $(info.cell).toggleClass('rpn3', val > 0 && val > 350); }"
  }
}
This colors the row header based on the post-mitigation RPN (rpnNew), giving engineers instant visibility into which risk items still require attention.
The risksheetTopPanel can reference external data sources via Velocity context and Polarion APIs, enabling dynamic risk matrix definitions shared across projects without duplicating formula logic in each risksheet.json.

Verify Your Changes

You should now see rating dropdowns with descriptions for severity, occurrence, and detection. The RPN column should automatically calculate when all three ratings are entered. Cells should display green, yellow, or red formatting based on the RPN thresholds. Row headers should reflect the post-mitigation risk level.

See Also


KB ArticlesSupport TicketsSource Code
  • RisksheetProjectProperties.java
  • risksheet.json
  • PolarionAppConfigManager.java
  • AppConfig.ts
  • AppConfigParser.ts