Skip to content

Create a Table to Display All Issues

We'll create a template which displays our reported Issues

Note: The template had an error which prevented the display of the panel. Panel open/close names must match!

{
    "systemHeader": {
        "systemType": "template",
        "templateId": "74746c80-8378-11e6-99b1-71ee944cf59f",
        "summaryName": "All Issues"
    },
    "appTags": [
        "myApplication",
        "report"
    ],
    "components": [
        {
            "componentName": "sc-static-html",
            "name": "panel1",
            "wrapAction": "open",
            "wrapHtmlType": "wrap",
            "wrapClass": "panel-primary",
            "fullWidth": true,
            "label": "All Issues"
        },
        {
            "componentName": "sc-datatables",
            "name": "allIssues",
            "showReload": true,
            "gridColumns": [
                {
                    "displayName": "Issue",
                    "field": "systemHeader.summaryName",
                    "href": "/form/{{{documentId}}}",
                    "type": "url",
                    "urlOpenIn": "newWindow",
                    "width": 3
                },
                {
                    "displayName": "Date Reported",
                    "field": "reportedDate",
                    "filter": "dateFilter",
                    "type": "date",
                    "width": 2
                },
                {
                    "displayName": "Issue Description",
                    "field": "description",
                    "type": "array",
                    "width": 2
                },
                {
                    "displayName": "Organisation",
                    "field": "orgRel.name",
                    "type": "string",
                    "filter": "arrayFilter",
                    "width": 2
                }
            ],
            "filter": "{'query':{'bool':{'filter':[{'term':{'appTags':'issue'}},{'term':{'systemHeader.systemType':'document'}},{'term':{'appTags':'myApplication'}}]}}}",
            "enableColumnMoving": true,
            "enableColumnResizing": true,
            "columnSearch": true,
            "fullWidth": true,
            "label": " "
        },
        {
            "componentName": "sc-static-html",
            "name": "panel1",
            "wrapHtmlType": "wrap",
            "wrapAction": "close"
        }
    ]
}