Skip to main content

RPN Calculation (FMEA)

Initial RPN

Calculates the Risk Priority Number by multiplying severity, occurrence, and detection ratings per the AIAG & VDA FMEA Handbook.
{
  "formulas": {
    "commonRpn": "function(info){ var value = info.item['occ']*info.item['det']*info.item['sev']; return value?value:null;}"
  }
}
Input FieldDescription
sevSeverity rating (1-10 scale)
occOccurrence rating (1-10 scale)
detDetection rating (1-10 scale)
Column configuration:
{
  "id": "rpn",
  "header": "RPN",
  "type": "int",
  "formula": "commonRpn"
}

Revised RPN (After Mitigation)

Calculates the post-mitigation RPN using updated severity, occurrence, and detection values:
{
  "formulas": {
    "commonRpnNew": "function(info){ var value = info.item['occNew']*info.item['detNew']*info.item['sevNew']; return value?value:null; }"
  }
}

RPN with Cell Decorator

Combine the RPN formula with conditional formatting to color-code risk levels:
{
  "formulas": {
    "commonRpn": "function(info){ var value = info.item['occ']*info.item['det']*info.item['sev']; return value?value:null;}"
  },
  "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;}"
  }
}
RPN threshold summary:
CSS ClassRangeColorRisk Level
rpn11 — 150Green background, dark green textLow
rpn2151 — 350Yellow background, dark yellow textMedium
rpn3> 350Red background, dark red textHigh

Risk Matrix (HARA / Action Priority)

Severity-Probability Risk Level

Implements a risk acceptance matrix using severity and probability to determine acceptability:
{
  "formulas": {
    "riskValue": "function(info){ var sev = info.item['severity']; var prob = info.item['probability']; if(!sev || !prob) return null; if(sev >= 8 && prob >= 6) return 'Unacceptable'; if(sev >= 5 && prob >= 4) return 'Further Investigation'; return 'Acceptable'; }"
  }
}
diagram

HARA Risk Level with ASIL Mapping

For ISO 26262 HARA workflows:
{
  "formulas": {
    "asilLevel": "function(info){ var s = info.item['severity']; var e = info.item['exposure']; var c = info.item['controllability']; if(!s || !e || !c) return null; var score = s + e + c; if(score >= 9) return 'ASIL D'; if(score >= 7) return 'ASIL C'; if(score >= 5) return 'ASIL B'; if(score >= 3) return 'ASIL A'; return 'QM'; }"
  }
}

Auto-Generated Titles

Title from Hazardous Situation and Harm

Generates a work item title by combining related fields. Recommended best practice for FMEA workflows to prevent items without titles:
{
  "formulas": {
    "autoTitle": "function(info){ var h = info.item['hazardousSituation']||''; var harm = info.item['harm']||''; if(!h && !harm) return null; return h + ' - ' + harm; }"
  }
}
If the title column uses a formula, keep it visible during item creation. Formula columns do not execute when hidden, which causes incorrect titles on newly created work items.

Cross-Row Aggregation

Unique Values from Child Items

Available since v24.9.1 Collects unique enum values from downstream risk items into the parent process step row:
{
  "formulas": {
    "uniqueChars": "function(info){ var rows = risksheet.ds.getMasterRowsByColumnValue(info); var vals = []; for(var i=0; i<rows.length; i++){ var v = rows[i]['processChar']; if(v && vals.indexOf(v)===-1) vals.push(v); } return vals.length ? vals.join(', ') : null; }"
  }
}

Sum Across Child Items

Aggregates numeric values from child risk items:
{
  "formulas": {
    "totalRisk": "function(info){ var rows = risksheet.ds.getMasterRowsByColumnValue(info); var total = 0; for(var i=0; i<rows.length; i++){ total += rows[i]['riskScore']||0; } return total > 0 ? total : null; }"
  }
}

Field Combination

Linked Item Fields in One Column

Combines ID and title from a linked item into a single cell:
{
  "formulas": {
    "combinedLink": "function(info){ var id = info.item['linkedId']||''; var title = info.item['linkedTitle']||''; if(!id) return null; return id + ': ' + title; }"
  }
}

Conditional Read-Only via cellDecorators

Use systemReadOnlyFields in a cell decorator to make columns conditionally read-only based on an enum value:
{
  "cellDecorators": {
    "conditionalLock": "function(info){ if(info.item['approvalStatus'] === 'approved'){ info.item['systemReadOnlyFields'] = info.item['systemReadOnlyFields'] || []; info.item['systemReadOnlyFields'].push('severity','occurrence','detection'); } }"
  }
}

Row Header Styling with Formula Values

Apply conditional styling to row headers based on the revised RPN:
{
  "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);}"
  }
}

Top Panel Function for Dynamic Risk Matrix

Define a risk matrix in the top panel that reads from external configuration, avoiding hardcoded values in each project’s risksheet.json:
## risksheetTopPanel.vm
#set($matrixData = $doc.getOldApi().getValue('riskMatrixConfig'))
<script>
  var riskMatrix = JSON.parse('$matrixData');
  function lookupRisk(info) {
    var key = info.item['severity'] + '_' + info.item['probability'];
    return riskMatrix[key] || 'Not Evaluated';
  }
</script>
{
  "formulas": {
    "riskFromMatrix": "function(info){ return lookupRisk(info); }"
  }
}

Complete FMEA Configuration

A full working example combining RPN formulas, risk parameter ratings, and conditional formatting:
{
  "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; }"
  },
  "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); }",
    "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); }"
  },
  "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;}"
  },
  "headers": {
    "rowHeader": { "renderer": "rowHeaderRpnNew" },
    "columnHeader": { "height": 32 },
    "columnGroupHeader": { "height": 32 }
  },
  "columns": [
    { "id": "sev", "header": "S", "type": "rating:severity", "headerGroup": "Initial Risk" },
    { "id": "occ", "header": "O", "type": "rating:occurrence", "headerGroup": "Initial Risk" },
    { "id": "det", "header": "D", "type": "rating:detection", "headerGroup": "Initial Risk" },
    { "id": "rpn", "header": "RPN", "type": "int", "formula": "commonRpn", "cellDecorator": "rpn", "headerGroup": "Initial Risk" },
    { "id": "sevNew", "header": "S", "type": "rating:severity", "headerGroup": "Revised Risk" },
    { "id": "occNew", "header": "O", "type": "rating:occurrence", "headerGroup": "Revised Risk" },
    { "id": "detNew", "header": "D", "type": "rating:detection", "headerGroup": "Revised Risk" },
    { "id": "rpnNew", "header": "RPN", "type": "int", "formula": "commonRpnNew", "cellDecorator": "rpn", "headerGroup": "Revised Risk" }
  ]
}
Support TicketsSource Code
  • AppConfig.ts
  • AppConfigHelper.ts
  • risksheet.json
  • CellPreviewFormatter.ts
  • PolarionAppConfigManager.java