> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Document Configuration Override

> Nextedy RISKSHEET documents can load their sheet configuration from two sources: a template document (inherited configuration) or the document itself (overridden configuration).

export const LastReviewed = ({date}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      Last reviewed on {formatted}
    </p>;
};

## Configuration Loading Hierarchy

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/yWl5nA2D0IzEnZC1/risksheet/diagrams/reference/configuration/document-config-override/diagram-1.svg?fit=max&auto=format&n=yWl5nA2D0IzEnZC1&q=85&s=62893ea3436d0df099cb8440fbb4c446" alt="diagram" style={{ maxWidth: "620px", width: "100%" }} width="620" height="100" data-path="risksheet/diagrams/reference/configuration/document-config-override/diagram-1.svg" />
</Frame>

The configuration manager searches for the sheet configuration attachment in the following order:

1. **Document attachment** -- the sheet configuration file attached directly to the current Polarion LiveDoc document
2. **Template hierarchy** -- if not found on the document, the system searches the document's template module for the attachment

When configuration is loaded from a template, the `fromTemplate` flag is set to `true` and the `templateName` property contains the display name of the source template (including a project name prefix if the template is from a different project).

## Configuration Source Properties

These properties are set by the configuration loader and indicate where the active configuration originated:

| Property       | Type      | Default | Description                                                                                                                                                                                                            |
| -------------- | --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fromTemplate` | `boolean` | `false` | Set to `true` when the configuration was loaded from a template document rather than the target document itself.                                                                                                       |
| `configPath`   | `string`  | `None`  | URI path to the configuration attachment that was actually loaded, whether from the document or from a template. Useful for debugging configuration source.                                                            |
| `templateName` | `string`  | `None`  | Display name of the template document from which configuration was inherited. Includes project name prefix if the template is from a different project. Empty when configuration is loaded directly from the document. |
| `fileName`     | `string`  | `None`  | Path and name of the document where configuration was requested (not necessarily where it was found). Formatted as `folder/documentTitle`.                                                                             |
| `source`       | `string`  | `null`  | Path to the configuration source file (document or template) used to load the Risksheet configuration. Displayed in the UI to indicate configuration origin.                                                           |
| `revision`     | `string`  | `None`  | Data revision identifier of the cached configuration attachment. Used internally for cache invalidation when attachment content changes.                                                                               |

<Note title="Configuration Caching">
  The configuration manager caches loaded configuration files keyed by the document path and the attachment revision. When the attachment is updated (new revision), the cache is automatically invalidated and the configuration is reloaded on the next page load.
</Note>

## Override Template Feature

### How It Works

The Override Template feature copies the sheet configuration from the template and attaches it directly to the current document. After this operation:

* The document has its own sheet configuration attachment
* Changes to the template no longer affect this document
* The `fromTemplate` flag changes from `true` to `false`
* The `templateName` property becomes empty
* The `source` property updates to reference the document itself

### Accessing Override Template

The Override Template option is available in the Risksheet menu. It requires administrative privileges (`canAdmin: true`) to execute. The configuration editor can be opened via:

| Property        | Type      | Default                               | Description                                                                                                                                       |
| --------------- | --------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `configEditUrl` | `string`  | `${baseUrl}/risksheet/configuration/` | Base URL for the Risksheet configuration editor interface. Opens in a new browser window with `project`, `document`, and `type` query parameters. |
| `canAdmin`      | `boolean` | `false`                               | Indicates whether the current user has administrative privileges for configuration editing. Required to access Override Template.                 |

The configuration update endpoint (`POST /config/update`) supports a `scope` parameter to indicate whether the update is copying from a template. The operation executes within a write transaction and redirects back to the document view upon completion.

### Reverting to Template

The Override Template operation is reversible. To revert a document back to template-inherited configuration:

1. Remove the sheet configuration attachment from the document
2. The configuration manager will fall back to the template hierarchy on the next page load
3. The `fromTemplate` flag returns to `true`

<Warning title="Reverting Discards Document-Specific Changes">
  When you revert from an overridden configuration back to the template, all document-specific configuration changes are lost. The document-level sheet configuration attachment is removed and the template's configuration takes effect immediately. There is no merge -- the template configuration replaces the document configuration entirely.
</Warning>

## Template Inheritance Details

### Template Resolution

When Risksheet searches the template hierarchy, it looks for the sheet configuration attachment in the document's template module. The template module is determined by the Polarion document's template assignment (configured at document creation time or through Polarion's document management).

If the template module is in a different project, the `templateName` includes the project name prefix for disambiguation. For example, a template named "FMEA Standard" in the "Templates" project would display as `Templates/FMEA Standard`.

### Template Path Configuration

The location where Risksheet documents can be created is controlled by the template path configuration:

| Property      | Type     | Default                    | Description                                                                                                                                               |
| ------------- | -------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Template path | `string` | `Risks/Risk Specification` | Document template path(s) where new risk documents can be created. Multiple paths can be comma-separated. Configured in the Risksheet project properties. |

See [Template Path Configuration](/risksheet/reference/configuration/template-path-configuration) for the full reference on template path settings.

## Configuration Sections Subject to Override

When a document overrides the template configuration, the entire sheet configuration file is copied and becomes independent. All configuration sections are included in the override:

| Section            | Property    | Description                                                                              |
| ------------------ | ----------- | ---------------------------------------------------------------------------------------- |
| Column definitions | `columns`   | Array of column definitions including bindings, types, headers, and rendering properties |
| Data types         | `dataTypes` | Risk and task type configuration including work item types, roles, and menu visibility   |
| Levels             | `levels`    | Hierarchical level definitions with control columns                                      |
| Formulas           | `formulas`  | Named JavaScript formula definitions for calculated columns                              |
| Styles             | `styles`    | CSS style definitions for conditional formatting                                         |

\| Global settings | `global` | Culture/locale, help URL, refresh behavior, menu organization |
\| Reviews | `reviews` | Review workflow configuration |
\| Sort order | `sortBy` | Default sort column sequence |
\| Headers | `headers` | Row header and column header height/renderer settings |
\| Read-only flag | `readonly` | Global read-only toggle |
\| Downstream readonly | `downstreamReadonly` | Controls whether downstream linked items are editable |

## Use Cases for Document Override

### Critical Project Phase Isolation

During critical project phases (certification review, safety case preparation), you may want to freeze the Risksheet configuration to prevent unintended changes from template updates. Override the template to create a stable, document-specific configuration:

```yaml theme={null}
columns:
- id: systemItemId
  header: ID
  bindings: systemItemId
  level: 1
- id: title
  header: Failure Mode
  bindings: title
  level: 1
- id: sev
  header: Severity
  bindings: sev
  type: rating:severity
  level: 2
- id: occ
  header: Occurrence
  bindings: occ
  type: rating:occurrence
  level: 2
- id: det
  header: Detection
  bindings: det
  type: rating:detection
  level: 2
dataTypes:
  risk:
    type: fmea_risk
    role: has_risk
  task:
    type: fmea_task
    role: mitigates
levels:
- name: Failure Mode
  controlColumn: systemItemId
  zoomColumn: systemItemId
  showInMenu: true
formulas:
  rpn: function(info){ var v = info.item['occ']*info.item['det']*info.item['sev'];
    return v?v:null; }
```

This configuration is now independent of the template and will not change when the template is updated.

### Document-Specific Column Layout

Individual FMEA documents may require different column configurations than the standard template. For example, a cybersecurity TARA analysis may need STRIDE-specific columns while the standard template uses FMEA columns:

1. Override the template on the TARA document
2. Modify the `columns` array to include TARA-specific fields
3. The rest of the project's FMEA documents continue using the template configuration

### Testing Configuration Changes

Before modifying a template that affects multiple documents, override the template on a single test document, make changes, and validate. Once confirmed, apply the changes to the template.

## PDF Export Configuration Override

The PDF export configuration follows the same override pattern as sheet configuration:

| Property                 | Type      | Default                 | Description                                                                                                   |
| ------------------------ | --------- | ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| `risksheetPdfExport.vm`  | `string`  | `risksheetPdfExport.vm` | Velocity template file name for PDF export. Can be attached to the document or inherited from the template.   |
| `pdfExportConfiguration` | `string`  | `None`                  | Full content of the PDF export Velocity template. Loaded from either the document attachment or the template. |
| `fromTemplate` (PDF)     | `boolean` | `false`                 | Whether the PDF export configuration was loaded from a template.                                              |

The same resolution order applies: document attachment first, then template hierarchy.

## Configuration Editor

The configuration editor opens in a new browser window and provides a visual interface for modifying sheet configuration. The URL is constructed from:

* `configEditUrl` -- base URL for the editor (`${baseUrl}/risksheet/configuration/`)
* `projectId` -- Polarion project identifier
* `document.id` -- Risksheet document identifier
* `type` -- configuration section to edit (e.g., `columns`, `settings`, `levels`)

When changes are saved through the editor, the system executes the update within a write transaction. If the document is using a template configuration and you make changes through the editor, the system may prompt you to override the template first.

## Interaction with Other Configuration Features

| Feature                  | Interaction                                                                                                                                                                    |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Template path**        | Controls where new documents can be created and which templates are available. The template path does not affect the override mechanism.                                       |
| **Global help URL**      | The `global.help` property defaults to the Nextedy support portal (`https://go.nextedy.com/risksheet-support-portal`). This can be customized per document via override.       |
| **Historical revisions** | Viewing a document at a specific revision loads the sheet configuration from that revision. The `readonly` flag is automatically set to `true` for historical views.           |
| **Auto-suspect**         | The auto-suspect setting (whether changes trigger suspect links) is a project-level property, not a document configuration property. It is not affected by document overrides. |

## Complete Example

A document-specific override configuration for an automotive FMEA with custom RPN thresholds:

```yaml theme={null}
columns:
- id: systemItemId
  header: ID
  bindings: systemItemId
  level: 1
  width: 80
- id: title
  header: Failure Mode
  bindings: title
  level: 1
  width: 200
- id: cause
  header: Cause
  bindings: cause
  level: 2
  width: 180
- id: effect
  header: Effect
  bindings: effect
  level: 2
  width: 180
- id: sev
  header: S
  bindings: sev
  type: rating:severity
  level: 2
  width: 50
- id: occ
  header: O
  bindings: occ
  type: rating:occurrence
  level: 2
  width: 50
- id: det
  header: D
  bindings: det
  type: rating:detection
  level: 2
  width: 50
- id: rpn
  header: RPN
  formula: commonRpn
  level: 2
  width: 60
dataTypes:
  risk:
    type: fmea_risk
    role: has_risk
    removeStrategy: delete
    rejectedStatus: rejected
  task:
    type: fmea_task
    role: mitigates
    showInMenu: true
levels:
- name: Failure Mode
  controlColumn: systemItemId
  zoomColumn: systemItemId
  showInMenu: true
formulas:
  commonRpn: function(info){ var v = info.item['occ']*info.item['det']*info.item['sev'];
    return v?v:null; }
cellDecorators:
  rpn: function(info){ var val=info.value; $(info.cell).toggleClass('rpn1',val>0&&val<=100);
    $(info.cell).toggleClass('rpn2',val>100&&val<=200); $(info.cell).toggleClass('rpn3',val>200);
    }
styles:
  .rpn1: '{background-color:#eaf5e9!important;color:#1d5f20!important;}'
  .rpn2: '{background-color:#fff3d2!important;color:#735602!important;}'
  .rpn3: '{background-color:#f8eae7!important;color:#ab1c00!important;}'
global:
  culture: en
reviews:
  reviewManager: CommentBased
```

## See Also

* [Risksheet.json Format](/risksheet/reference/configuration/risksheet-json-format) -- complete JSON structure reference
* [Template Path Configuration](/risksheet/reference/configuration/template-path-configuration) -- configuring document template paths
* [Configuration Properties Index](/risksheet/reference/configuration/properties-index) -- all configuration properties
* [Default Configuration Values](/risksheet/reference/configuration/default-values) -- default values for all properties
* [Configuration Validation Rules](/risksheet/reference/configuration/config-validation-rules) -- validation rules applied to configuration
* [Configuration Interactions](/risksheet/reference/configuration/config-interactions) -- property dependencies and interactions

<LastReviewed date="2026-06-24" />
