The risksheet loads the configuration from a file: risksheet.json 


The file is searched on following locations:

  1. attachment to a risksheet document

    The system checks if there is a file "risksheet.json" attached to the Risksheet document (LiveDoc)

  2. attachment to a risksheet document template

    The system checks if the custom field "templateDoc" of the risksheet LiveDocument points to another LiveDoc document, and checks if there is a file "risksheet.json" attached to this template document. 

    This is a type of configuration you can find in the demo project.

  3. if not, the built-in configuration is being used


Follow the guide to learn how to upload the modified configuration.


File Reference


Culture

By default, Risksheet formats (and edit) data using the American English culture. The decimal symbol is a period, the thousand separator is a comma, and the days of the week are "Sunday" through "Saturday", etc...


For supported options  see https://nextedy.freshdesk.com/en/support/solutions/articles/48001172966-countries-supported-in-the-globalization-cultures

...
  "global":{
    "culture":"en"
  },
...


Headers

Row Header

Specify the function that sets the header style.

....
"headers":{
  "rowHeader":{
    "renderer":"rowHeaderRpnNew"
  }
   },
...


See: Configure the style of the row header



Formulas

Define the formulas for calculated columns.

...
"formulas":{
  "commonRpn":"function(info){\n var value = info.item['occ']*info.item['det']*info.item['sev'];\n return value?value:null;}",
  "commonRpnNew":"function(info){\n var value = info.item['occNew']*info.item['detNew']*info.item['sevNew'];\n return value?value:null; }"        
},
...

The functions receive a single parameter - above named "info":

  • info.item - a data array, that holds the values of the input table row. So in your formula, you can access the row (item) values by calling info.item[column.id]
  • info.cell - a HTML DOM element, usually not used in formulas, but this is used typically in cellDecorators

See: Configure calculated column (formula)



Cell Decorators

Define the functions that return styles - because the cells are being reused, you should not set the styles directly but only toggle the HTML class attribute.

...
"cellDecorators":{
   		"rpn":"function(info){\n var val = info.value;\n $(info.cell).toggleClass('rpn1', val>0 && val <= 150 );\n $(info.cell).toggleClass('rpn2', val>0 && val > 150 && val <= 250);\n $(info.cell).toggleClass('rpn3', val>0 && val > 250);}",
		"rowHeaderRpnNew":"function(info){\n var val = info.item['rpnNew'];\n $(info.cell).toggleClass('rowHeadRpn1', val>0 && val <= 150 );\n $(info.cell).toggleClass('rowHeadRpn2', val>0 && val > 150 && val <= 250);\n $(info.cell).toggleClass('rowHeadRpn3', val>0 && val > 250);}"	

  },
...

The functions receive a single parameter - above named "info":

  • info.item - a data array, that holds the values of the input table row. So in your formula, you can access the row (item) values by calling info.item[column.id]
  • info.cell - a HTML DOM element, that you shall use to set the style name (see section Styles bellow). Do not set the inline styles directly, as the table cells are reused as you scroll the table.

See:  Configure cell/column styles


Styles

Define the actual styles that are referenced by Cell Decorator Functions (see above).

...
"styles":{
   ...
   ".rpn1":"{background-color: #B0D444 !important;}",
   ...
   },
...

See:  Configure cell/column styles


Columns

Define the set of columns that will be visible on the sheet

...
 "columns": [
  ...
  {
   "headerGroup":"Potential risks",
   "header": "Controls Detection",
   "bindings": "controlsDetection",
   "id": "controlsDetection",
   "filterable":true,			
   "width": 200,
   "level": 2
  },
  ...
 ],
...

See:  Add / Configure a risksheet column


Levels

Currently, the risksheet supports 3 (three) data levels (but only 2 data types). The Levels setting controls how the data (see dataTypes) relates to the columns (see Level attribute of a column).

...
"levels": [
    {
      "name": "Failure mode",
      "controlColumn": "failureMode",
      "zoomColumn":"failureMode"
    },
    {
      "name": "Cause",
      "zoomColumn": "causes",
      "controlColumn": "systemItemId"
    },
    {
      "name": "Task",
      "zoomColumn": "taskTitle"
    }
  ],
...

See: 


Data Types

Currently, the risksheet supports 3 (three) data levels (but only 2 data types). The DataTypes setting controls what is the Level 1  and Level 2 work item type (default risk), and what is the Level 3 item type (default task).

...
"dataTypes": {
    "risk": {
      "type": "risk"
    },
    "task": {
      "type": "task",
      "role": "mitigates"
    }
  },
...


PDF Configuration

Please, contact us at the support@nextedy.com to configure the pdf export.


Column Reference

Column Properties


bindings:  the id of the work item built-in or custom field (status, cause, ...)


level: a number 1, 2 or 3. 1 and 2 correspond to the risk items. 3 correspond to a level 3 item type, usually a task. See: What Work Items are visible on Risksheet


id: the id of the column. Usually autogenerated from the ID. If you need to refer to the column from formulas or renderers, give it a static ID.


type: the type is usually autogenerated from the type of the Polarion field (see bindings). But you may overwrite it, i.e. you can tell risksheet to e.g. formate and edit string field as a number.  The supported values are:

  • string - single-line text
  • text - multi-line text
  • boolean - true/false
  • int -  number
  • float - number
  • duration - Polarion time duration type
  • date - date only 
  • datetime - date and time
  • time - time only
  • currency - currency
           


readOnly: be default it is derived from work item permissions. But you can enforce the column to be read-only manually. (You cannot overwrite the permissions - if the column is read-only in Polarion you cannot mark it editable on risksheet)


format: specify the data format. see Column Data Formats


formula: a reference to a function defined in "formulas" section above. The function computes the value presented in the cell.


header: Column title


headerTooltip: Tooltip assigned to the column title


headers : The name of the style that is applied to the column title. The style is defined in the styles section in the same config file (risksheet.json).


headgroup : Title of the Column group (the columns titles can be grouped)


headerGroupTooltip: Column group title tooltip


headerGroupCss: The name of the style that is applied to the column group title. The style is defined in the styles section in the same config file (risksheet.json).


cellCss:  The name of the style that is applied to the cells in this column. The style is defined in the styles section in the same config file (risksheet.json).


cellRenderer:  a reference to a function defined in the "cellDecorators" section in the same config file. The function usually returns the style name based on the data in the cell.


width [number]: the default width of the column


minWidth: the column minimal width, it cannot be dragged to be smaller. Autosize columns (width="*") will also be not smaller than this width.


filterable: true/false - should there be a filter in the column header.