Skip to main content
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: diagram

JSON Syntax Validation

RuleBehavior on Violation
Valid JSON syntax requiredGrid fails to load entirely. No partial loading.
UTF-8 encoding requiredNon-UTF-8 characters may cause parse failures.
No trailing commasJSON standard does not allow trailing commas. Parser rejects.
No JavaScript commentsJSON 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

PropertyTypeRequiredDefault if MissingValidation Rule
columnsarrayNo[]Must be an array. Each element validated individually.
dataTypesobjectNo{}Must be an object. Each entry validated for required type property.
levelsarrayNo[]Must be an array. Each element validated individually.
headersobjectNo{}Must be an object. Sub-properties validated individually.
formulasobjectNo{}Must be an object. Values must be valid JavaScript function strings.
stylesobjectNo{}Must be an object. Values must be valid CSS strings.
cellDecoratorsobjectNo{}Must be an object. Values must be valid JavaScript function strings.
enumsobjectNo{}Must be an object. Each entry maps an enum ID to an array of options.
ratingsobjectNo{}Must be an object. Structure identical to enums.
relationsarrayNo[]Must be an array of relation objects.
viewsarrayNo[]Must be an array of view definitions.
globalobjectNo{}Must be an object. Sub-properties validated individually.
reviewsobjectNo{}Must be an object.
sortByarrayNo[]Must be an array of column ID strings.
readonlybooleanNofalseMust be a boolean value.
downstreamReadonlybooleanNofalseMust be a boolean value.

Column Validation Rules

Each element in the columns array is validated against the following rules:

Required Column Properties

PropertyBehavior if Missing
binding or idAt 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

PropertyDefault ValueCondition
idAuto-generated from header or bindingApplied when id is not explicitly set
typeAuto-detected from Polarion field type via bindingApplied when type is not explicitly set. Falls back to string if detection fails.
level1Applied to risk item columns. Not set for task columns.
canCreatetrueApplied to itemLink and multiItemLink columns only
filterabletrueApplied to all columns
readOnlyfalseBase default. May be overridden by automatic rules (see below).
multiLinetrueApplied to all columns
wordWraptrueApplied to all columns

Automatic Read-Only Enforcement

The readOnly property is automatically set to true regardless of the configured value in these scenarios:
ConditionReason
formula property is setFormula columns compute values; user edits would conflict
serverRender property is setServer-rendered columns are populated by Velocity templates
Column is a reference columnReference columns display linked item data, not editable fields
binding is a system field: id, status, type, project, outlineNumberSystem fields are always read-only in Risksheet
binding is: author, resolution, created, updatedThese Polarion fields cannot be modified through the grid
User lacks field-level modification permissionPolarion 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 IdentifierCategoryNotes
text / stringTextDefault fallback for unrecognized types
intNumericMaps to Edm.Int64 for OData
floatNumericMaps to Edm.Double for OData
ratingNumericTreated as integer internally. Maps to Edm.Int32 for OData
currencyNumericUses BigDecimal precision. Maps to Edm.Decimal for OData
booleanBooleanMaps to Edm.Boolean for OData
dateTemporalDate only (yyyy-MM-dd). Maps to Edm.Date for OData
datetimeTemporalDate and time. Maps to Edm.DateTimeOffset for OData
timeTemporalTime only. Maps to Edm.DateTimeOffset for OData
durationTemporalStored as string. Maps to Edm.String for OData
enum:<enumId>EnumerationColon-separated syntax. Enum ID references enums section.
multiEnum:<enumId>EnumerationColon-separated syntax. Multiple selection.
rating:<ratingId>EnumerationColon-separated syntax. References ratings section.
ref:<refId>ReferenceColon-separated syntax. References refs section.
workflowWorkflowDisplays workflow state. Read-only.
itemLinkLinkSingle linked item.
multiItemLinkLinkMultiple linked items.
taskLinkLinkDownstream 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 AdjustmentValue
typeSet to text
readOnlySet to true

DataTypes Validation Rules

Risk DataType

PropertyDefaultValidation Rule
typeNone (required)Must be specified. Error No type attribute is defined for dataType if missing. Value is evaluated through expression evaluator for dynamic resolution.
roleNoneLink role string. Evaluated through expression evaluator.
removeStrategydeleteMust be a recognized strategy identifier.
rejectedActionrejectMust match a valid workflow action ID on the work item type.
rejectedStatusrejectedMust match a valid workflow status ID.
rejectedResolutioninvalidMust match a valid resolution option ID.
showInMenutrueBoolean. Controls toolbar menu visibility.
documentNoneOptional. Restricts scope to items within a specific LiveDoc.
createInDocumentNoneOptional. Uses folder/documentId path format. Specifies where new items are created.

Task DataType

PropertyDefaultValidation Rule
typeNone (required for task creation)Work item type for mitigation/task items. Evaluated through expression evaluator.
roleNoneLink role for task relationships. Evaluated through expression evaluator.
showInMenutrueBoolean. Controls whether task creation appears in menus.
documentNoneOptional. Restricts task scope to a specific LiveDoc.
createInDocumentNoneOptional. 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:
PropertyDefaultValidation Rule
showInMenutrueBoolean. Controls level visibility in the navigation menu.
controlColumnsystemItemIdString. Must reference a valid column id or binding.

Headers Validation Rules

PropertyDefaultValidation Rule
headers.columnHeader.height32Number (pixels). Must be a positive integer.
headers.columnGroupHeader.height32Number (pixels). Must be a positive integer.
headers.rowHeader.rendererNoneString. Must reference a named function in cellDecorators.

Global Settings Validation

PropertyDefaultValidation Rule
global.cultureenString. Must be a valid culture/locale code (e.g., en, de, fr, ja). See Culture and Localization Codes.
global.helphttps://go.nextedy.com/risksheet-support-portalString. Must be a valid URL.

Reviews Validation

PropertyDefaultValidation Rule
reviews.reviewManagerCommentBasedString. Must be a recognized review manager type.

Cross-Property Validation

Some validation rules involve interactions between multiple properties:
InteractionRule
columns[].formula + columns[].readOnlyIf formula is set, readOnly is forced to true regardless of explicit setting
columns[].serverRender + columns[].type + columns[].readOnlyIf serverRender is set, type is forced to text and readOnly is forced to true
dataTypes + levelsData types and levels must be consistent — task columns should not have a level property
columns[].type (colon syntax) + enums / ratingsEnum and rating column types reference entries in the enums or ratings sections. Referenced entries should exist.
views[].columns + columns[].idView column references must match configured column IDs
cellDecorators keys + columns[].idCell decorator keys should match column IDs or named decorator references
headers.rowHeader.renderer + cellDecoratorsRow 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