Skip to main content

How Template Inheritance Works

Risksheet configuration uses a simple inheritance model:
  1. When a document is created from a template, it does not receive its own copy of risksheet.json. Instead, it inherits the configuration from the template document.
  2. When Risksheet loads, it first checks for a risksheet.json attachment on the current document. If none is found, it searches the document’s template hierarchy.
  3. Changes to the template’s risksheet.json automatically propagate to all documents that inherit from it.
diagram

Step 1: Create a Template Document

  1. Create a LiveDoc in a central project (for example, a Templates or Library project) that serves as the template repository.
  2. Attach the configuration files to this template document:
    • risksheet.json — the primary configuration with columns, levels, data types, formulas, styles, enums, and ratings
    • risksheetTopPanel.vm — optional custom top panel template
    • risksheetPdfExport.vm — optional PDF export script
  3. Configure the template with the settings that should be shared across all risk documents.
Risksheet has no mandatory fields or work item types. The configuration is fully flexible and works with any custom work item types your organization uses.

Step 2: Install Default Templates (Optional)

Risksheet ships with two built-in project templates:
TemplateDescription
risksheet_templateStandard FMEA template with severity, occurrence, and detection columns
risksheet_templateHaraHARA template for automotive hazard analysis and risk assessment
To install:
  1. Navigate to the Risksheet administration interface.
  2. Click Install Templates.
  3. The system installs both templates into Polarion’s template repository.
The installer automatically checks whether templates are already present before installation. Reinstalling overwrites previous versions. The installation is transaction-safe — it either completes fully or rolls back on error.

Step 3: Create Documents from the Template

  1. Open the Risksheet home page for your project.
  2. Click Create New Document.
  3. Select a folder and enter the document name.
  4. Choose the template from the template list.
  5. Click Create.
The new document inherits the template’s configuration. It does not receive its own copy of risksheet.json unless you explicitly override it later.

Step 4: Set Up Template Paths

Configure where new risk documents can be created by setting the template path in project properties:
  • Default path: Risks/Risk Specification
  • Multiple paths: Separate with commas (for example, Risks/FMEA,Risks/HARA,Risks/TARA)
Each path represents a folder where the document creation wizard allows users to create new risk documents. See Configure Template Paths for detailed instructions.

Cross-Project Templates

Templates can be stored in a different project than the documents that use them. This is useful for centralized template libraries:
  1. Create the template document in a shared project (for example, SharedTemplates).
  2. Ensure all users have read access to the template project.
  3. Documents in other projects that reference this template show a project prefix in templateName (for example, SharedTemplates/FMEA Template).
All users must have read permissions on the template project. If a user lacks access, they see a broken or inconsistent Risksheet structure instead of an explicit error message. This is a common source of confusion in multi-project deployments.

Multiple Configurations Per Project

You can maintain multiple different Risksheet configurations within a single project. Each document or document group can inherit from a different template:
  • One template for FMEA analysis with RPN-based columns
  • A separate template for HARA with ASIL-level columns
  • A third template for STRIDE/TARA cybersecurity analysis

Update a Global Template

To modify the configuration for all documents that inherit from a template:
  1. Open the template document in Polarion.
  2. Open the configuration editor (Menu > Configuration).
  3. Make your changes and save.
  4. All inheriting documents use the updated configuration on their next page load.
During critical project phases, use Menu > Override Template to detach a document from the global template. This prevents unintended configuration changes from template updates. You can revert to the template later, but reverting discards document-specific changes.

Verification

After setting up your global template and creating a document from it, you should now see:
  • The document loads with the template’s column layout and settings
  • The templateName property in the Risksheet metadata shows the template name
  • The fromTemplate flag is true in the configuration metadata

See Also


KB ArticlesSupport TicketsSource Code
  • AppConfig.ts
  • DocumentConfigProvider.java
  • OpenHelpCommand.ts
  • RisksheetViewServlet.java
  • PdfExportConfigurationService.java