blob: 7e33ce8222af5371dc7937a537897d9d0deb6096 [file] [log] [blame]
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 13,
"iteration": 1681785827220,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 3,
"w": 24,
"x": 0,
"y": 0
},
"id": 28,
"options": {
"content": "- Use Cases: This dashboard can be used to track bugs with metrics such as [Bug Age](https://devlake.apache.org/docs/Metrics/BugAge).\n- Data Source Required: GitHub ([transformation](https://devlake.apache.org/docs/UserManuals/ConfigUI/GitHub#step-3---adding-transformation-rules-optional) required) or Jira ([transformation](https://devlake.apache.org/docs/UserManuals/ConfigUI/Jira#step-3---adding-transformation-rules-optional) required). Transformation is the configuration for you to tell DevLake what is a bug.",
"mode": "markdown"
},
"pluginVersion": "8.0.6",
"targets": [
{
"queryType": "randomWalk",
"refId": "A"
}
],
"title": "Dashboard Introduction",
"type": "text"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 0,
"y": 3
},
"id": 6,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select\n count(*)\nfrom\n lake.issues as i\n join lake.board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($board_id)",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Previous Week New Bug Count",
"type": "stat"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": []
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 6,
"y": 3
},
"id": 26,
"options": {
"displayLabels": [
"name",
"value"
],
"legend": {
"displayMode": "list",
"placement": "bottom",
"values": [
"percent",
"value"
]
},
"pieType": "donut",
"reduceOptions": {
"calcs": [],
"fields": "",
"values": true
},
"tooltip": {
"mode": "multi"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select\n priority,\n count(*) as 'Issue Number'\nfrom\n lake.issues as i\n join lake.board_issues bi on i.id = bi.issue_id\n join boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($board_id)\ngroup by 1",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Previous Week New Bug Count by Priority",
"type": "piechart"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "url"
},
"properties": [
{
"id": "links"
}
]
},
{
"matcher": {
"id": "byName",
"options": "number"
},
"properties": [
{
"id": "custom.width",
"value": 343
}
]
},
{
"matcher": {
"id": "byName",
"options": "title"
},
"properties": [
{
"id": "custom.width",
"value": 753
}
]
},
{
"matcher": {
"id": "byName",
"options": "url"
},
"properties": [
{
"id": "links",
"value": [
{
"targetBlank": true,
"title": "URL",
"url": "${__value.raw}"
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Issue Number"
},
"properties": [
{
"id": "custom.width",
"value": 124
}
]
},
{
"matcher": {
"id": "byName",
"options": "Title"
},
"properties": [
{
"id": "custom.width",
"value": 640
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 3
},
"id": 4,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select\n i.issue_key as 'Issue Number',\n i.title as 'Title',\n i.url as 'Url'\nfrom\n lake.issues as i\n\tjoin lake.board_issues bi on i.id = bi.issue_id\n\tjoin lake.boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and date(i.created_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($board_id)",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Last Week's New Bugs",
"type": "table"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 0,
"y": 11
},
"id": 8,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select\n count(*)\nfrom\n lake.issues as i\n join board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and status = 'DONE'\n and date(i.resolution_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($board_id)",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Last Week's Fixed Bugs Count",
"type": "stat"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 14
},
{
"color": "red",
"value": 21
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 6,
"y": 11
},
"id": 24,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select\n avg(lead_time_minutes / 1440)\nfrom\n lake.issues as i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and status = 'DONE'\n and date(i.resolution_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($board_id)",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Average Lead Time of Last Week's Resolved Bugs in Days",
"type": "stat"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 21
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Issue Number"
},
"properties": [
{
"id": "custom.width",
"value": 125
}
]
},
{
"matcher": {
"id": "byName",
"options": "Title"
},
"properties": [
{
"id": "custom.width",
"value": 541
}
]
},
{
"matcher": {
"id": "byName",
"options": "Url"
},
"properties": [
{
"id": "custom.width",
"value": 414
}
]
},
{
"matcher": {
"id": "byName",
"options": "Lead Time in Days"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-text"
}
]
}
]
},
"gridPos": {
"h": 16,
"w": 12,
"x": 12,
"y": 11
},
"id": 10,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select\n i.issue_key as 'Issue Number',\n i.title as 'Title',\n lead_time_minutes/1440 as 'Lead Time in Days',\n i.url as 'Url'\nfrom\n lake.issues as i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and status = 'DONE'\n and date(i.resolution_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($board_id)",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Last Week's Fixed Bugs",
"type": "table"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"decimals": 1,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 19
},
"id": 23,
"options": {
"barWidth": 0.3,
"groupWidth": 0.7,
"legend": {
"calcs": [
"mean"
],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "horizontal",
"showValue": "auto",
"text": {},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select\n concat('#',i.issue_key, ' ', i.title) as issue_key,\n lead_time_minutes/1440 as lead_time\nfrom\n lake.issues as i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and status = 'DONE'\n and date(i.resolution_date) BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 DAY\n and b.id in ($board_id)\norder by lead_time desc",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Lead Time Distribution [Last Week's Resolved Bugs in Days]",
"type": "barchart"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 6,
"x": 0,
"y": 27
},
"id": 16,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select\n count(*)\nfrom \n lake.issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and i.status != 'DONE'\n and b.id in ($board_id)",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Total Number of Outstanding Bugs",
"type": "stat"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 30
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 6,
"x": 6,
"y": 27
},
"id": 25,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select \n avg((TIMESTAMPDIFF(MINUTE, i.created_date,NOW()))/1440)\nfrom \n lake.issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and i.status != 'DONE'\n and b.id in ($board_id)",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Average Age of Outstanding Bugs in Days",
"type": "stat"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 30
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Queue Time"
},
"properties": [
{
"id": "custom.width",
"value": 150
}
]
},
{
"matcher": {
"id": "byName",
"options": "Issue Number"
},
"properties": [
{
"id": "custom.width",
"value": 121
}
]
},
{
"matcher": {
"id": "byName",
"options": "Queue Time in Days"
},
"properties": [
{
"id": "custom.width",
"value": 152
}
]
},
{
"matcher": {
"id": "byName",
"options": "Title"
},
"properties": [
{
"id": "custom.width",
"value": 547
}
]
},
{
"matcher": {
"id": "byName",
"options": "Queue Time in Days"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-text"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Url"
},
"properties": [
{
"id": "custom.width",
"value": null
}
]
}
]
},
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 27
},
"id": 14,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select \n i.issue_key as 'Issue Number',\n i.title as 'Title',\n (TIMESTAMPDIFF(MINUTE, i.created_date,NOW()))/1440 as 'Queue Time in Days',\n i.url as 'Url',\n priority\nfrom \n lake.issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and i.status != 'DONE'\n and b.id in ($board_id)\n and priority in ($priority)\norder by 'Queue Time' desc",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Outstanding Bugs Sort by Queue Time [All History]",
"type": "table"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Queue Time in Days",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 21
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 36
},
"id": 18,
"options": {
"barWidth": 0.3,
"groupWidth": 0.7,
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "always",
"text": {
"valueSize": 12
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select \n concat('#', i.issue_key) as issue_key,\n (TIMESTAMPDIFF(MINUTE, i.created_date,NOW()))/1440 as 'Queue Time in Days'\nfrom \n lake.issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and i.status != 'DONE'\n and b.id in ($board_id)\norder by 2 desc",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Distribution of Bug Queue Time in Days [Outstanding Bugs]",
"type": "barchart"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 7
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Issue Number"
},
"properties": [
{
"id": "custom.width",
"value": 121
}
]
},
{
"matcher": {
"id": "byName",
"options": "Queue Time in Days"
},
"properties": [
{
"id": "custom.width",
"value": 152
}
]
},
{
"matcher": {
"id": "byName",
"options": "Title"
},
"properties": [
{
"id": "custom.width",
"value": 547
}
]
},
{
"matcher": {
"id": "byName",
"options": "Queue Time in Days"
},
"properties": [
{
"id": "custom.displayMode",
"value": "color-text"
}
]
}
]
},
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 36
},
"id": 31,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "select \n i.issue_key as 'Issue Number',\n i.title as 'Title',\n (TIMESTAMPDIFF(MINUTE, i.created_date,NOW()))/1440 as 'Queue Time in Days',\n i.url as 'Url'\nfrom \n lake.issues i\n\tjoin board_issues bi on i.id = bi.issue_id\n\tjoin boards b on bi.board_id = b.id\nwhere\n i.type in ($issue_type)\n and i.status != 'DONE'\n and i.assignee_name = ''\n and b.id in ($board_id)\norder by 'Queue Time' desc",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Bugs to be Triaged Sort by Queue Time [All History]",
"type": "table"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 46,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 24,
"x": 0,
"y": 45
},
"id": 2,
"options": {
"barWidth": 0.71,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"text": {
"valueSize": 12
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with bugs as ( \n select \n DATE_ADD(date(i.created_date), INTERVAL -WEEKDAY(date(i.created_date)) DAY) as time,\n count(*) as bug_count\n from\n lake.issues as i\n\t join lake.board_issues bi on i.id = bi.issue_id\n\t join lake.boards b on bi.board_id = b.id\n where \n i.type in ($issue_type)\n and $__timeFilter(i.created_date)\n and b.id in ($board_id)\n group by time\n order by time desc\n),\n\ncalendar_date as(\n\tSELECT CAST((SYSDATE()-INTERVAL (H+T+U) DAY) AS date) d\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT 50 UNION ALL SELECT 60\n\t\t\tUNION ALL SELECT 70 UNION ALL SELECT 80 UNION ALL SELECT 90\n\t\t) T CROSS JOIN ( SELECT 0 U\n\t\t\tUNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3\n\t\t\tUNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6\n\t\t\tUNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9\n\t\t) U\n\tWHERE\n\t\t(SYSDATE()-INTERVAL (H+T+U) DAY) >= (SYSDATE()-INTERVAL 6 MONTH)\n),\n\ncalendar_weeks as(\n select \n \tdistinct date(DATE_ADD(date(d), INTERVAL -WEEKDAY(date(d)) DAY)) as start_of_week\n FROM calendar_date\n ORDER BY 1 asc\n)\n\n\nselect \n concat(date_format(cw.start_of_week,'%m/%d'), ' - ', date_format(DATE_ADD(cw.start_of_week, INTERVAL +6 DAY),'%m/%d')) as week,\n case when bug_count is not null then bug_count else 0 end as 'Weekly New Bugs'\nfrom calendar_weeks cw left join bugs b on cw.start_of_week = b.time\norder by cw.start_of_week asc\n",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Weekly New Bugs [Selected Time Range]",
"type": "barchart"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 46,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 54
},
"id": 20,
"options": {
"barWidth": 0.71,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"text": {
"valueSize": 12
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with bugs as (\n select \n DATE_ADD(date(i.resolution_date), INTERVAL -WEEKDAY(date(i.resolution_date)) DAY) as time,\n count(*) as bug_count\n from\n lake.issues as i\n\t join lake.board_issues bi on i.id = bi.issue_id\n\t join lake.boards b on bi.board_id = b.id\n where \n i.type in ($issue_type)\n and status = 'DONE'\n and $__timeFilter(i.resolution_date)\n and b.id in ($board_id)\n group by time\n order by time desc\n),\n\ncalendar_date as(\n\tSELECT CAST((SYSDATE()-INTERVAL (H+T+U) DAY) AS date) d\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT 50 UNION ALL SELECT 60\n\t\t\tUNION ALL SELECT 70 UNION ALL SELECT 80 UNION ALL SELECT 90\n\t\t) T CROSS JOIN ( SELECT 0 U\n\t\t\tUNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3\n\t\t\tUNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6\n\t\t\tUNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9\n\t\t) U\n\tWHERE\n\t\t(SYSDATE()-INTERVAL (H+T+U) DAY) >= (SYSDATE()-INTERVAL 6 MONTH)\n),\n\ncalendar_weeks as(\n select \n \tdistinct date(DATE_ADD(date(d), INTERVAL -WEEKDAY(date(d)) DAY)) as start_of_week\n FROM calendar_date\n ORDER BY 1 asc\n)\n\nselect \n concat(date_format(cw.start_of_week,'%m/%d'), ' - ', date_format(DATE_ADD(cw.start_of_week, INTERVAL +6 DAY),'%m/%d')) as week,\n case when bug_count is not null then bug_count else 0 end as 'Weekly Closed Bugs'\nfrom calendar_weeks cw left join bugs b on cw.start_of_week = b.time\norder by cw.start_of_week asc",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Weekly Closed Bugs [Selected Time Range]",
"type": "barchart"
},
{
"datasource": "mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 46,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 64
},
"id": 21,
"options": {
"barWidth": 0.71,
"groupWidth": 0.7,
"legend": {
"calcs": [
"mean"
],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"text": {
"valueSize": 12
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
"rawSql": "with calendar_date as(\n\tSELECT CAST((SYSDATE()-INTERVAL (H+T+U) DAY) AS date) d\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT 50 UNION ALL SELECT 60\n\t\t\tUNION ALL SELECT 70 UNION ALL SELECT 80 UNION ALL SELECT 90\n\t\t) T CROSS JOIN ( SELECT 0 U\n\t\t\tUNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3\n\t\t\tUNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6\n\t\t\tUNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9\n\t\t) U\n\tWHERE\n\t\t(SYSDATE()-INTERVAL (H+T+U) DAY) >= (SYSDATE()-INTERVAL 6 MONTH)\n),\n\ncalendar_weeks as(\n select \n \tdistinct date(DATE_ADD(date(d), INTERVAL -WEEKDAY(date(d)) DAY)) as start_of_week\n FROM calendar_date\n ORDER BY 1 asc\n),\n\ncreated_bugs as ( \n select \n DATE_ADD(date(i.created_date), INTERVAL -WEEKDAY(date(i.created_date)) DAY) as time,\n count(*) as bug_count\n from\n lake.issues as i\n\t join lake.board_issues bi on i.id = bi.issue_id\n\t join lake.boards b on bi.board_id = b.id\n where \n i.type in ($issue_type)\n and $__timeFilter(i.created_date)\n and b.id in ($board_id)\n group by time\n order by time desc\n),\n\nresolved_bugs as (\n select \n DATE_ADD(date(i.resolution_date), INTERVAL -WEEKDAY(date(i.resolution_date)) DAY) as time,\n count(*) as bug_count\n from\n lake.issues as i\n\t join lake.board_issues bi on i.id = bi.issue_id\n\t join lake.boards b on bi.board_id = b.id\n where \n i.type in ($issue_type)\n and status = 'DONE'\n and $__timeFilter(i.resolution_date)\n and b.id in ($board_id)\n group by time\n order by time desc\n),\n\nweekly_new_bug as(\n select\n cw.start_of_week as week,\n case when bug_count is not null then bug_count else 0 end as weekly_new_bug\n from calendar_weeks cw left join created_bugs cb on cw.start_of_week = cb.time\n),\n\nweekly_closed_bug as(\n select\n cw.start_of_week as week,\n case when bug_count is not null then bug_count else 0 end as weekly_closed_bug\n from calendar_weeks cw left join resolved_bugs cb on cw.start_of_week = cb.time\n),\n\nweekly_updates as(\n SELECT t1.week, weekly_new_bug, weekly_closed_bug FROM weekly_new_bug t1\n LEFT JOIN weekly_closed_bug t2 ON t1.week = t2.week\n UNION\n SELECT t1.week, weekly_new_bug, weekly_closed_bug FROM weekly_new_bug t1\n RIGHT JOIN weekly_closed_bug t2 ON t1.week = t2.week\n),\n\n\noriginal_open_bugs as (\n SELECT \n count(distinct i.id) as original_open_bug_count\n FROM\n lake.issues as i\n\t join lake.board_issues bi on i.id = bi.issue_id\n\t join lake.boards b on bi.board_id = b.id\n where \n i.type in ($issue_type)\n and i.created_date < $__timeFrom()\n and (i.status != 'DONE' or $__timeFilter(i.resolution_date))\n and b.id in ($board_id)\n),\n\nweekly_updated_without_null as(\n SELECT \n week, \n COALESCE(weekly_new_bug,0) as weekly_new_bug, \n COALESCE(weekly_closed_bug,0) as weekly_closed_bug,\n original_open_bug_count\n from weekly_updates, original_open_bugs\n where week is not null\n),\n\nweekly_delta as(\n SELECT \n *,\n (weekly_new_bug - weekly_closed_bug) as weekly_delta\n from weekly_updated_without_null\n order by week asc\n),\n\nfinal_data as(\n SELECT \n *,\n concat(date_format(week,'%m/%d'), ' - ', date_format(DATE_ADD(week, INTERVAL +6 DAY),'%m/%d')) as _week,\n sum(weekly_delta) over(order by week asc) as weekly_accumulated\n from weekly_delta\n)\n\nSELECT \n _week,\n (original_open_bug_count + weekly_accumulated) as \"Total No. of Outstanding Bugs By the End of Week\" from final_data",
"refId": "A",
"select": [
[
{
"params": [
"script_version"
],
"type": "column"
}
]
],
"table": "_devlake_migration_history",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "Total Outstanding Bug Count by Week [Selected Time Range]",
"type": "barchart"
},
{
"datasource": null,
"gridPos": {
"h": 2,
"w": 24,
"x": 0,
"y": 74
},
"id": 30,
"options": {
"content": "<br/>\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/UserManuals/Dashboards/GrafanaUserGuide).",
"mode": "markdown"
},
"pluginVersion": "8.0.6",
"targets": [
{
"queryType": "randomWalk",
"refId": "A"
}
],
"type": "text"
}
],
"schemaVersion": 30,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": "mysql",
"definition": "select concat(name, '-', id) as text from boards",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "Board",
"multi": false,
"name": "board_id",
"options": [],
"query": "select concat(name, '-', id) as text from boards",
"refresh": 1,
"regex": "/^(?<text>.*)-(?<value>.*)$/",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": null,
"current": {
"selected": false,
"text": "BUG",
"value": "BUG"
},
"datasource": "mysql",
"definition": "select distinct type from issues",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "Issue Type",
"multi": false,
"name": "issue_type",
"options": [],
"query": "select distinct type from issues",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": null,
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": "mysql",
"definition": "select distinct priority from issues",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "Priority",
"multi": true,
"name": "priority",
"options": [],
"query": "select distinct priority from issues",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-6M",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Weekly Bug Retro",
"uid": "-5EKA5w7k",
"version": 23
}