Validation behavior may vary between Risksheet versions. The rules documented here are derived from available source code analysis. Test your configuration in a development environment before deploying to production.
Validation Process Overview
When Risksheet loads a risksheet.json configuration, it performs validation and default application in the following order:
JSON Syntax Validation
| Rule | Behavior on Violation |
|---|
| Valid JSON syntax required | Grid fails to load entirely. No partial loading. |
| UTF-8 encoding required | Non-UTF-8 characters may cause parse failures. |
| No trailing commas | JSON standard does not allow trailing commas. Parser rejects. |
| No JavaScript comments | JSON does not support // or /* */ comments. Parser rejects. |
Use a JSON validator (such as jsonlint or your IDE’s built-in validator) to check risksheet.json syntax before attaching it to a document. A single syntax error prevents the entire grid from loading.
Top-Level Property Validation
| Property | Type | Required | Default if Missing | Validation Rule |
|---|
columns | array | No | [] | Must be an array. Each element validated individually. |
dataTypes | object | No | {} | Must be an object. Each entry validated for required type property. |
levels | array | No | [] | Must be an array. Each element validated individually. |
headers | object | No | {} | Must be an object. Sub-properties validated individually. |
formulas | object | No | {} | Must be an object. Values must be valid JavaScript function strings. |
styles | object | No | {} | Must be an object. Values must be valid CSS strings. |
cellDecorators | object | No | {} | Must be an object. Values must be valid JavaScript function strings. |
enums | object | No | {} | Must be an object. Each entry maps an enum ID to an array of options. |
ratings | object | No | {} | Must be an object. Structure identical to enums. |
relations | array | No | [] | Must be an array of relation objects. |
views | array | No | [] | Must be an array of view definitions. |
global | object | No | {} | Must be an object. Sub-properties validated individually. |
reviews | object | No | {} | Must be an object. |
sortBy | array | No | [] | Must be an array of column ID strings. |
readonly | boolean | No | false | Must be a boolean value. |
downstreamReadonly | boolean | No | false | Must be a boolean value. |
Column Validation Rules
Each element in the columns array is validated against the following rules:
Required Column Properties
| Property | Behavior if Missing |
|---|
binding or id | At least one must be present. If only id is provided, it is used as the binding. If neither is present, the column may fail to render. |
Column Default Application
| Property | Default Value | Condition |
|---|
id | Auto-generated from header or binding | Applied when id is not explicitly set |
type | Auto-detected from Polarion field type via binding | Applied when type is not explicitly set. Falls back to string if detection fails. |
level | 1 | Applied to risk item columns. Not set for task columns. |
canCreate | true | Applied to itemLink and multiItemLink columns only |
filterable | true | Applied to all columns |
readOnly | false | Base default. May be overridden by automatic rules (see below). |
multiLine | true | Applied to all columns |
wordWrap | true | Applied to all columns |
Automatic Read-Only Enforcement
The readOnly property is automatically set to true regardless of the configured value in these scenarios:
| Condition | Reason |
|---|
formula property is set | Formula columns compute values; user edits would conflict |
serverRender property is set | Server-rendered columns are populated by Velocity templates |
| Column is a reference column | Reference columns display linked item data, not editable fields |
binding is a system field: id, status, type, project, outlineNumber | System fields are always read-only in Risksheet |
binding is: author, resolution, created, updated | These Polarion fields cannot be modified through the grid |
| User lacks field-level modification permission | Polarion permissions override configuration |
If a column appears read-only unexpectedly, check whether any of the automatic enforcement rules apply. The formula, serverRender, and system field rules take precedence over explicit readOnly: false settings.
Column Type Validation
When type is explicitly provided, it must be one of the recognized types:
| Type Identifier | Category | Notes |
|---|
text / string | Text | Default fallback for unrecognized types |
int | Numeric | Maps to Edm.Int64 for OData |
float | Numeric | Maps to Edm.Double for OData |
rating | Numeric | Treated as integer internally. Maps to Edm.Int32 for OData |
currency | Numeric | Uses BigDecimal precision. Maps to Edm.Decimal for OData |
boolean | Boolean | Maps to Edm.Boolean for OData |
date | Temporal | Date only (yyyy-MM-dd). Maps to Edm.Date for OData |
datetime | Temporal | Date and time. Maps to Edm.DateTimeOffset for OData |
time | Temporal | Time only. Maps to Edm.DateTimeOffset for OData |
duration | Temporal | Stored as string. Maps to Edm.String for OData |
enum:<enumId> | Enumeration | Colon-separated syntax. Enum ID references enums section. |
multiEnum:<enumId> | Enumeration | Colon-separated syntax. Multiple selection. |
rating:<ratingId> | Enumeration | Colon-separated syntax. References ratings section. |
ref:<refId> | Reference | Colon-separated syntax. References refs section. |
workflow | Workflow | Displays workflow state. Read-only. |
itemLink | Link | Single linked item. |
multiItemLink | Link | Multiple linked items. |
taskLink | Link | Downstream task link. |
Column types use a colon-separated syntax where the prefix before the first colon determines the base type and the remainder carries configuration parameters. For example, multiEnum:severity,priority has base type multiEnum with parameters severity,priority.
Unrecognized type identifiers default to string / text behavior.
Column Type with ServerRender
When serverRender is set on a column:
| Automatic Adjustment | Value |
|---|
type | Set to text |
readOnly | Set to true |
DataTypes Validation Rules
Risk DataType
| Property | Default | Validation Rule |
|---|
type | None (required) | Must be specified. Error No type attribute is defined for dataType if missing. Value is evaluated through expression evaluator for dynamic resolution. |
role | None | Link role string. Evaluated through expression evaluator. |
removeStrategy | delete | Must be a recognized strategy identifier. |
rejectedAction | reject | Must match a valid workflow action ID on the work item type. |
rejectedStatus | rejected | Must match a valid workflow status ID. |
rejectedResolution | invalid | Must match a valid resolution option ID. |
showInMenu | true | Boolean. Controls toolbar menu visibility. |
document | None | Optional. Restricts scope to items within a specific LiveDoc. |
createInDocument | None | Optional. Uses folder/documentId path format. Specifies where new items are created. |
Task DataType
| Property | Default | Validation Rule |
|---|
type | None (required for task creation) | Work item type for mitigation/task items. Evaluated through expression evaluator. |
role | None | Link role for task relationships. Evaluated through expression evaluator. |
showInMenu | true | Boolean. Controls whether task creation appears in menus. |
document | None | Optional. Restricts task scope to a specific LiveDoc. |
createInDocument | None | Optional. Uses folder/documentId path format. |
The type and role properties in dataTypes support dynamic resolution through the expression evaluator. This means values can reference Polarion project properties using patterns like $config.getRisksheetProjectProperties().getProperties().getProperty('propertyName'). Validation of these expressions occurs at runtime.
Levels Validation Rules
Each element in the levels array:
| Property | Default | Validation Rule |
|---|
showInMenu | true | Boolean. Controls level visibility in the navigation menu. |
controlColumn | systemItemId | String. Must reference a valid column id or binding. |
| Property | Default | Validation Rule |
|---|
headers.columnHeader.height | 32 | Number (pixels). Must be a positive integer. |
headers.columnGroupHeader.height | 32 | Number (pixels). Must be a positive integer. |
headers.rowHeader.renderer | None | String. Must reference a named function in cellDecorators. |
Global Settings Validation
| Property | Default | Validation Rule |
|---|
global.culture | en | String. Must be a valid culture/locale code (e.g., en, de, fr, ja). See Culture and Localization Codes. |
global.help | https://go.nextedy.com/risksheet-support-portal | String. Must be a valid URL. |
Reviews Validation
| Property | Default | Validation Rule |
|---|
reviews.reviewManager | CommentBased | String. Must be a recognized review manager type. |
Cross-Property Validation
Some validation rules involve interactions between multiple properties:
| Interaction | Rule |
|---|
columns[].formula + columns[].readOnly | If formula is set, readOnly is forced to true regardless of explicit setting |
columns[].serverRender + columns[].type + columns[].readOnly | If serverRender is set, type is forced to text and readOnly is forced to true |
dataTypes + levels | Data types and levels must be consistent — task columns should not have a level property |
columns[].type (colon syntax) + enums / ratings | Enum and rating column types reference entries in the enums or ratings sections. Referenced entries should exist. |
views[].columns + columns[].id | View column references must match configured column IDs |
cellDecorators keys + columns[].id | Cell decorator keys should match column IDs or named decorator references |
headers.rowHeader.renderer + cellDecorators | Row header renderer must reference a function defined in cellDecorators |
Complete Validation Example
{
"columns": [
{
"id": "severity",
"binding": "severity",
"header": "Severity (S)",
"type": "rating:severity",
"level": 1,
"filterable": true,
"readOnly": false
},
{
"id": "rpn",
"binding": "rpn",
"header": "RPN",
"formula": "commonRpn",
"level": 1
}
],
"dataTypes": {
"risk": {
"type": "failureMode",
"role": "relates_to",
"removeStrategy": "delete",
"rejectedAction": "reject",
"rejectedStatus": "rejected",
"rejectedResolution": "invalid"
},
"task": {
"type": "mitigationTask",
"role": "mitigates",
"showInMenu": true
}
},
"levels": [
{
"showInMenu": true,
"controlColumn": "systemItemId"
}
],
"formulas": {
"commonRpn": "function(info){ var value = info.item['occ']*info.item['det']*info.item['sev']; return value?value:null;}"
},
"global": {
"culture": "en"
}
}
In this example:
- The
rpn column has formula set, so readOnly is automatically forced to true.
- The
severity column has type: "rating:severity", which references the ratings.severity section (should be defined).
- Both
dataTypes entries have type specified, satisfying the required field rule.
See Also