How to configure risk matrix - Puzzlepart/prosjektportalen GitHub Wiki

The risk matrix as displayed below can be configured in several ways. Keep in mind that this view uses search, and will only find items that have been crawled by search. The risk matrix can show up to 500 risk items.

How-to-configure-risk-matrix-01.PNG

How to configure the query for the portfolio level

Go to site settings --> Prosjektportalen - Datakilder --> Select the item with Title=RISKOVERVIEW.

The query should look something like this:

ContentTypeId:0x010088578E7470CC4AA68D566346483107020101* Path:{SiteCollection.URL} GtShowInPortfolioOWSBOOL=1

The ContentTypeId refers to risk items (only show risk items), the path to the URL of where to retrieve data (only look in the current site collection), and the GtShowInPortfolioOWSBOOL=1 means that we only show risk items where users have checked "Show in portfolio"/"Vis i portefølje". The query can be changes to update which items to be displayed in the matrix.

Hot to configure the query for the project status level

Go to site settings --> Prosjektportalen - Statusseksjoner --> Select the item with Title=Risiko.

The query should look similar to the following:

<OrderBy>
<FieldRef Name="GtRiskFactor" Ascending="FALSE" />
</OrderBy>
<Where>
<Neq>
    <FieldRef Name="GtRiskStatus" />
    <Value Type="Text">Ikke lenger aktuell</Value>
</Neq>
</Where>

This is a CAML query where the uncertainties risk list is filtered, not showing items with status=Ikke lenger aktuell.

How to configure risk matrix colors and labels

Go to Site Assets/Nettstedsobjekter --> pp --> config --> risk-matrix-cells.txt. If the file isn't already there, you need to create it.

This is a configuration file which defines color and labels for the different risk matrix cells.

An example of how this file is defines is the following

[
    [{
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellValue": "Ubetydelig konsekvens",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellValue": "Liten konsekvens",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellValue": "Middels konsekvens",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellValue": "Stor konsekvens",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellValue": "Svært stor konsekvens",
        "cellType": 0,
        "className": "risk-header"
    }],
    [{
        "cellValue": "Svært sannsynlig",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 1,
        "probability": 5
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 2,
        "probability": 5
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#ea5c73" },
        "consequence": 3,
        "probability": 5
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#993333" },
        "consequence": 4,
        "probability": 5
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#993333" },
        "consequence": 5,
        "probability": 5
    }],
    [{
        "cellValue": "Meget sannsynlig",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#2da748" },
        "consequence": 1,
        "probability": 4
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 2,
        "probability": 4
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#ea5c73" },
        "consequence": 3,
        "probability": 4
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#ea5c73" },
        "consequence": 4,
        "probability": 4
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#993333" },
        "consequence": 5,
        "probability": 4
    }],
    [{
        "cellValue": "Sannsynlig",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#2da748" },
        "consequence": 1,
        "probability": 3
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 2,
        "probability": 3
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 3,
        "probability": 3
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#ea5c73" },
        "consequence": 4,
        "probability": 3
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#ea5c73" },
        "consequence": 5,
        "probability": 3
    }],
    [{
        "cellValue": "Lite sannsynlig",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#2da748" },
        "consequence": 1,
        "probability": 2
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#2da748" },
        "consequence": 2,
        "probability": 2
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 3,
        "probability": 2
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 4,
        "probability": 2
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 5,
        "probability": 2
    }],
    [{
        "cellValue": "Svært lite sannsynlig",
        "cellType": 0,
        "className": "risk-header"
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#2da748" },
        "consequence": 1,
        "probability": 1
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#2da748" },
        "consequence": 2,
        "probability": 1
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#2da748" },
        "consequence": 3,
        "probability": 1
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#2da748" },
        "consequence": 4,
        "probability": 1
    }, {
        "cellType": 1,
        "className": "risk-matrix-cell",
        "style": { "backgroundColor": "#e9b359" },
        "consequence": 5,
        "probability": 1
    }]
]
⚠️ **GitHub.com Fallback** ⚠️