From 29ce6cd62332f8138da40f6bd6439e11696017f6 Mon Sep 17 00:00:00 2001 From: Bhoopalan1999 Date: Sat, 13 Sep 2025 13:26:01 +0530 Subject: [PATCH] feat: Jira Sprint Board Adds a new Grafana dashboard for Jira that is sprint-based rather than time-based. Some of the features: Hides the global time picker Introduces a sprint selection dropdown to scope all panels Does not modify the existing Kanban (time-based) dashboard --- grafana/JiraSprintBoard.json | 1436 ++++++++++++++++++++++++++++++++++ 1 file changed, 1436 insertions(+) create mode 100644 grafana/JiraSprintBoard.json diff --git a/grafana/JiraSprintBoard.json b/grafana/JiraSprintBoard.json new file mode 100644 index 00000000000..058bbe38af3 --- /dev/null +++ b/grafana/JiraSprintBoard.json @@ -0,0 +1,1436 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL", + "label": "mysql", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "barchart", + "name": "Bar chart", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "11.3.0" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "11.3.0-pre" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 9, + "graphTooltip": 0, + "id": null, + "links": [ + { + "asDropdown": false, + "icon": "external link", + "includeVars": false, + "keepTime": true, + "tags": [ + "Data Source Specific Dashboard" + ], + "targetBlank": false, + "title": "Metric dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 126, + "panels": [], + "title": "1. Issue Throughput", + "type": "row" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "1. Total number of issues created.\n2. The requirements being calculated are filtered by \"requirement creation time\" (time filter at the upper-right corner) and \"Jira board\" (\"Choose Board\" filter at the upper-left corner)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 140, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "queryType": "randomWalk", + "rawQuery": true, + "rawSql": "SELECT\r\n\tcount(distinct(i.id))\r\nFROM\r\n\tissues i\r\nJOIN\r\n\tsprint_issues si ON si.issue_id = i.id\r\nJOIN\t\r\n\tsprints sp ON si.sprint_id = sp.id\r\nWHERE\r\n\t(i.original_type IN (${type}) OR i.type IN (${type}))\r\n\tAND\r\n\tsp.id IN (${sprint_id})\r\n\tAND\r\n\ti.original_status != 'cancelled'", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Number of Issues [Issues Created in Selected Time Range]", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 141, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "queryType": "randomWalk", + "rawQuery": true, + "rawSql": "SELECT\r\n\tcount(distinct(i.id))\r\nFROM\r\n\tissues i\r\nJOIN\r\n\tsprint_issues si ON si.issue_id = i.id\r\nJOIN\t\r\n\tsprints sp ON si.sprint_id = sp.id\r\nWHERE\r\n\t(i.original_type IN (${type}) OR i.type IN (${type}))\r\n\tAND\r\n\tsp.id IN (${sprint_id})\r\n\tAND\r\n\ti.status = 'DONE'\r\n AND\r\n i.original_status != 'cancelled'", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Number of Delivered Issue [Issues Created in Selected Time Range]", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "fillOpacity": 80, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 16, + "x": 8, + "y": 1 + }, + "id": 145, + "options": { + "barRadius": 0, + "barWidth": 0.97, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "auto", + "stacking": "normal", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": -45, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "dataset": "devlakeschema", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\r\n\tCOUNT(DISTINCT CASE WHEN i.status = 'DONE' THEN i.id END) AS number_of_delivered_issues,\r\n\tCOUNT(DISTINCT CASE WHEN i.status != 'DONE' THEN i.id END) AS number_of_open_issues,\r\n sp.name AS sprint_name\r\nFROM\r\n\tissues i\r\nJOIN\r\n\tsprint_issues si ON si.issue_id = i.id\r\nJOIN\t\r\n\tsprints sp ON si.sprint_id = sp.id\r\nWHERE\r\n\t(i.original_type IN (${type}) OR i.type IN (${type}))\r\n\tAND\r\n\tsp.id IN (${sprint_id})\r\n\tAND\r\n i.original_status != 'cancelled'\r\nGROUP BY sp.name", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Issue Status Distribution over Sprint", + "type": "barchart" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "Issue Delivery Rate = count(Delivered Issues)/count(Issues)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 50 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 7 + }, + "id": 117, + "links": [ + { + "targetBlank": true, + "title": "Requirement Delivery Rate", + "url": "https://devlake.apache.org/docs/Metrics/RequirementDeliveryRate" + } + ], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "queryType": "randomWalk", + "rawQuery": true, + "rawSql": "SELECT\r\n NOW() AS time,\r\n (COUNT(DISTINCT(CASE WHEN i.status = 'Done' THEN i.id END))) / (COUNT(DISTINCT(i.id)))\r\nFROM\r\n\tissues i\r\nJOIN\r\n\tsprint_issues si ON si.issue_id = i.id\r\nJOIN\t\r\n\tsprints sp ON si.sprint_id = sp.id\r\nWHERE\r\n\t(i.original_type IN (${type}) OR i.type IN (${type}))\r\n\tAND\r\n\tsp.id IN (${sprint_id})\r\n\tAND\r\n\ti.original_status != 'cancelled'", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Issue Delivery Rate [Issues Created in Selected Time Range]", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "fillOpacity": 80, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 16, + "x": 8, + "y": 7 + }, + "id": 146, + "options": { + "barRadius": 0, + "barWidth": 0.97, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "auto", + "stacking": "normal", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": -45, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "dataset": "devlakeschema", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\r\n\t(COUNT(DISTINCT CASE WHEN i.status = 'DONE' THEN i.id END))/(COUNT(DISTINCT i.id))*100 AS issues_delivered_percentage,\r\n sp.name AS sprint_name\r\nFROM\r\n\tissues i\r\nJOIN\r\n\tsprint_issues si ON si.issue_id = i.id\r\nJOIN\t\r\n\tsprints sp ON si.sprint_id = sp.id\r\nWHERE\r\n\t(i.original_type IN (${type}) OR i.type IN (${type}))\r\n\tAND\r\n\tsp.id IN (${sprint_id})\r\n\tAND\r\n i.original_status != 'cancelled'\r\nGROUP BY sp.name", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Issues Delivered Over Sprint In Percentage", + "type": "barchart" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 110, + "panels": [], + "title": "2. Cycle Time", + "type": "row" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 14 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 0, + "y": 14 + }, + "id": 139, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^value$/", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "dataset": "devlake", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\n\tavg(cycle_lead_time_seconds/86400) AS value\nFROM (\n\tSELECT\n\t\tDISTINCT(issue_key) AS issue_key,\n\t\tMIN(issue_start_date) AS issue_start_date,\n\t\tMAX(issue_resolve_date) AS issue_resolve_date,\n\t\tTIMESTAMPDIFF(SECOND,MIN(issue_start_date),MAX(issue_resolve_date)) AS cycle_lead_time_seconds\n\t\t-- MIN(issue_key) AS issue_key\n\tFROM (\n\t\tSELECT\n\t\t\ti.id,\n\t\t\ti.issue_key,\n\t\t\t(CASE WHEN jci.to_string IN ('In Progress','Developing') THEN jc.created END) AS issue_start_date,\n\t\t\t(i.resolution_date) AS issue_resolve_date,\n\t\t\tjci.to_string AS to_string\n\t\tFROM\n\t\t\tissues i\n\t\tJOIN sprint_issues si ON si.issue_id = i.id\n\t\tJOIN sprints sp ON si.sprint_id = sp.id\n\t\tJOIN _tool_jira_issue_changelog_items jci on i._raw_data_id = jci._raw_data_id\n\t\tJOIN _tool_jira_issue_changelogs jc on jc.changelog_id = jci.changelog_id\n\t\tWHERE\n\t\t\t(i.original_type IN (${type}) or i.type IN (${type}))\n\t\t\tAND\n\t\t\tsp.id IN (${sprint_id})\n\t\t\tAND\n\t\t\ti.status = 'DONE'\n\t\t\tAND\n\t\t\ti.original_status != 'cancelled'\n\t-- AND\n\t\n\t\tORDER BY issue_start_date asc) issues_der\n\tWHERE \n\t\tto_string IN ('In Progress','Developing')\n\tGROUP BY issue_key\n) cycle_lead_time_der", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Mean Cycle Time in Days [Issues Resolved in Select Time Range]", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 14 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 4, + "y": 14 + }, + "id": 143, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^value$/", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "dataset": "devlake", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\n\tAVG(CASE WHEN _rank <= 0.8 THEN (cycle_lead_time_seconds/86400) END) AS value\nFROM (\n\tSELECT\n\t\tDISTINCT(issue_key) AS issue_key,\n\t\tMIN(issue_start_date) AS issue_start_date,\n\t\tMAX(issue_resolve_date) AS issue_resolve_date,\n\t\tTIMESTAMPDIFF(SECOND,MIN(issue_start_date),MAX(issue_resolve_date)) AS cycle_lead_time_seconds,\n PERCENT_RANK() OVER (ORDER BY (TIMESTAMPDIFF(SECOND,MIN(issue_start_date),MAX(issue_resolve_date)))) AS _rank\n\tFROM (\n\t\tSELECT\n\t\t\ti.id,\n\t\t\ti.issue_key,\n\t\t\t(CASE WHEN jci.to_string IN ('In Progress','Developing') THEN jc.created END) AS issue_start_date,\n\t\t\t(i.resolution_date) AS issue_resolve_date,\n\t\t\tjci.to_string AS to_string\n\t\tFROM\n\t\t\tissues i\n\t\tJOIN sprint_issues si ON si.issue_id = i.id\n\t\tJOIN sprints sp ON si.sprint_id = sp.id\n\t\tJOIN _tool_jira_issue_changelog_items jci on i._raw_data_id = jci._raw_data_id\n\t\tJOIN _tool_jira_issue_changelogs jc on jc.changelog_id = jci.changelog_id\n\t\tWHERE\n\t\t\t(i.original_type IN (${type}) or i.type IN (${type}))\n\t\t\tAND\n\t\t\tsp.id IN (${sprint_id})\n\t\t\tAND\n\t\t\ti.status = 'DONE'\n\t\t\tAND\n\t\t\ti.original_status != 'cancelled'\n\t\tORDER BY issue_start_date asc) issues_der\n\tWHERE \n\t\tto_string IN ('In Progress','Developing')\n\tGROUP BY issue_key\n) cycle_lead_time_der", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "80% Issues' Cycle Time are less than # days [Issues Resolved in Select Time Range]", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "fillOpacity": 80, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 16, + "x": 8, + "y": 14 + }, + "id": 147, + "options": { + "barRadius": 0, + "barWidth": 0.97, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "auto", + "stacking": "normal", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": -45, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "dataset": "devlakeschema", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\r\n\tsprint_name,\r\n\tavg(cycle_lead_time_seconds/86400) AS mean_lead_time\r\nFROM (\r\n\tSELECT\r\n\t\tDISTINCT(issue_key) AS issue_key,\r\n\t\tMIN(issue_start_date) AS issue_start_date,\r\n\t\tMAX(issue_resolve_date) AS issue_resolve_date,\r\n\t\tTIMESTAMPDIFF(SECOND,MIN(issue_start_date),MAX(issue_resolve_date)) AS cycle_lead_time_seconds,\r\n\t\tMIN(sprint_name) AS sprint_name\r\n\t\t-- MIN(issue_key) AS issue_key\r\n\tFROM (\r\n\t\tSELECT\r\n\t\t\ti.id,\r\n\t\t\ti.issue_key,\r\n\t\t\t(CASE WHEN jci.to_string = 'In Progress' THEN jc.created END) AS issue_start_date,\r\n\t\t\t(i.resolution_date) AS issue_resolve_date,\r\n\t\t\tjci.to_string AS to_string,\r\n\t\t\tsp.name AS sprint_name\r\n\t\tFROM\r\n\t\t\tissues i\r\n\t\tJOIN sprint_issues si ON si.issue_id = i.id\r\n\t\tJOIN sprints sp ON si.sprint_id = sp.id\r\n\t\tJOIN _tool_jira_issue_changelog_items jci on i._raw_data_id = jci._raw_data_id\r\n\t\tJOIN _tool_jira_issue_changelogs jc on jc.changelog_id = jci.changelog_id\r\n\t\tWHERE\r\n\t\t\t(i.original_type IN (${type}) or i.type IN (${type}))\r\n\t\t\tAND\r\n\t\t\tsp.id IN (${sprint_id})\r\n\t\t\tAND\r\n\t\t\ti.status = 'DONE'\r\n\t\t\tAND\r\n\t\t\ti.original_status != 'cancelled'\r\n\t-- AND\r\n\t\r\n\t\tORDER BY issue_start_date asc) issues_der\r\n\tWHERE \r\n\t\tto_string IN ('In Progress')\r\n\tGROUP BY issue_key\r\n) cycle_lead_time_der\r\nGROUP BY sprint_name", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Mean Cycle Time Over Sprint", + "type": "barchart" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 135, + "panels": [], + "title": "3. Issue Lead Time", + "type": "row" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 14 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 0, + "y": 21 + }, + "id": 137, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^value$/", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n avg(lead_time_minutes)/1440 AS value\r\nFROM\r\n\tissues i\r\nJOIN\r\n\tsprint_issues si ON si.issue_id = i.id\r\nJOIN\t\r\n\tsprints sp ON si.sprint_id = sp.id\r\nWHERE\r\n\t(i.original_type IN (${type}) OR i.type IN (${type}))\r\n\tAND\r\n\tsp.id IN (${sprint_id})\r\n\tAND\r\n\ti.status = 'DONE'\r\n AND\r\n i.original_status != 'cancelled'", + "refId": "A", + "select": [ + [ + { + "params": [ + "progress" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "ca_analysis", + "timeColumn": "create_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Mean Issue Lead Time in Days [Issues Resolved in Select Time Range]", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 14 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 4, + "y": 21 + }, + "id": 138, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\nAVG(CASE WHEN _rank <= 0.8 THEN lead_time_minutes END)/1440 AS value\r\nFROM (\r\n\tSELECT\r\n\t\tDISTINCT(issue_key),\r\n\t\tlead_time_minutes,\r\n\t\tPERCENT_RANK() OVER (ORDER BY lead_time_minutes) AS _rank\r\n\tFROM\r\n\t\tissues i\r\n\tJOIN\r\n\t\tsprint_issues si ON si.issue_id = i.id\r\n\tJOIN\t\r\n\t\tsprints sp ON si.sprint_id = sp.id\r\n\tWHERE\r\n\t\t(i.original_type IN (${type}) OR i.type IN (${type}))\r\n\t\tAND\r\n\t\tsp.id IN (${sprint_id})\r\n\t\tAND\r\n\t\ti.status = 'DONE'\r\n\t\t\tAND\r\n\t\t\ti.original_status != 'cancelled'\r\n\t) mean_lead_time_der", + "refId": "A", + "select": [ + [ + { + "params": [ + "progress" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "ca_analysis", + "timeColumn": "create_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "80% Issues' Cycle Lead Time are less than # days [Issues Resolved in Select Time Range]", + "type": "stat" + }, + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "fillOpacity": 80, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 16, + "x": 8, + "y": 21 + }, + "id": 148, + "options": { + "barRadius": 0, + "barWidth": 0.97, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "auto", + "stacking": "normal", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": -45, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "dataset": "devlakeschema", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\r\n\t\tDISTINCT(sp.name) AS sprint_name,\r\n avg(lead_time_minutes)/1440 AS mean_lead_time\r\nFROM\r\n\tissues i\r\nJOIN\r\n\tsprint_issues si ON si.issue_id = i.id\r\nJOIN\t\r\n\tsprints sp ON si.sprint_id = sp.id\r\nWHERE\r\n\t(i.original_type IN (${type}) OR i.type IN (${type}))\r\n\tAND\r\n\tsp.id IN (${sprint_id})\r\n\tAND\r\n\ti.status = 'DONE'\r\n AND\r\n i.original_status != 'cancelled'\r\nGROUP BY sprint_name", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Mean Cycle Lead Time Over Sprint", + "type": "barchart" + }, + { + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 130, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "
\n\nThis dashboard is created based on this [data schema](https://devlake.apache.org/docs/DataModels/DevLakeDomainLayerSchema). Want to add more metrics? Please follow the [guide](https://devlake.apache.org/docs/Configuration/Dashboards/GrafanaUserGuide).", + "mode": "markdown" + }, + "pluginVersion": "11.3.0", + "type": "text" + } + ], + "refresh": "", + "schemaVersion": 40, + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "definition": "SELECT id AS __value, name AS __text\nFROM boards\nWHERE\nid like ('%jira%')\n-- Below where clause must be used to get data from specific boards\n-- AND name IN ('board-name-1','board-name-2')\n", + "includeAll": true, + "label": "Board", + "multi": true, + "name": "board_id", + "options": [], + "query": "SELECT id AS __value, name AS __text\nFROM boards\nWHERE\nid like ('%jira%')\n-- Below where clause must be used to get data from specific boards\n-- AND name IN ('board-name-1','board-name-2')\n", + "refresh": 1, + "regex": "", + "sort": 1, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL}" + }, + "definition": "SELECT\ns.id AS __value,\ns.name AS __text\nFROM\nboards AS b JOIN\nboard_sprints AS bs JOIN\nsprints AS s\nON\nb.id = bs.board_id AND\ns.id = bs.sprint_id\nWHERE b.id IN (${board_id})", + "description": "", + "includeAll": true, + "label": "Sprint", + "multi": true, + "name": "sprint_id", + "options": [], + "query": "SELECT\ns.id AS __value,\ns.name AS __text\nFROM\nboards AS b JOIN\nboard_sprints AS bs JOIN\nsprints AS s\nON\nb.id = bs.board_id AND\ns.id = bs.sprint_id\nWHERE b.id IN (${board_id})", + "refresh": 1, + "regex": "", + "sort": 3, + "type": "query" + }, + { + "current": { + "text": [ + "$__all" + ], + "value": [ + "$__all" + ] + }, + "includeAll": true, + "label": "Issue Type", + "multi": true, + "name": "type", + "options": [ + { + "selected": false, + "text": "REQUIREMENT", + "value": "REQUIREMENT" + }, + { + "selected": false, + "text": "STORY", + "value": "STORY" + }, + { + "selected": false, + "text": "ENABLER", + "value": "ENABLER" + }, + { + "selected": false, + "text": "SPIKE", + "value": "SPIKE" + }, + { + "selected": false, + "text": "EPIC", + "value": "EPIC" + }, + { + "selected": false, + "text": "SAGA", + "value": "SAGA" + }, + { + "selected": false, + "text": "IMPROVEMENT", + "value": "IMPROVEMENT" + }, + { + "selected": false, + "text": "INITIATIVE", + "value": "INITIATIVE" + }, + { + "selected": false, + "text": "BUG", + "value": "BUG" + }, + { + "selected": false, + "text": "DEFECT", + "value": "DEFECT" + }, + { + "selected": false, + "text": "INCIDENT", + "value": "INCIDENT" + } + ], + "query": "REQUIREMENT,STORY,ENABLER,SPIKE,EPIC,SAGA,IMPROVEMENT,INITIATIVE,BUG,DEFECT,INCIDENT", + "type": "custom" + } + ] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": { + "hidden": true + }, + "timezone": "Asia/Kolkata", + "title": "Jira", + "uid": "c662f7fb-6c02-40d1-85a3-e9164d0366be", + "version": 2, + "weekStart": "" +} \ No newline at end of file