This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/devlake.git
The following commit(s) were added to refs/heads/main by this push:
new e217c670a fix(dashboards): fix string team/user ID filtering in MySQL
dashboards (#8926)
e217c670a is described below
commit e217c670a1b0d495e02bf76aadb576474aff24d3
Author: bujjibabukatta <[email protected]>
AuthorDate: Thu Jul 30 12:12:59 2026 -0400
fix(dashboards): fix string team/user ID filtering in MySQL dashboards
(#8926)
---
grafana/dashboards/mysql/dora-by-team.json | 18 +++++------
...eering-throughput-and-cycle-time-team-view.json | 36 +++++++++++-----------
grafana/dashboards/mysql/work-logs.json | 30 +++++++++---------
3 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/grafana/dashboards/mysql/dora-by-team.json
b/grafana/dashboards/mysql/dora-by-team.json
index d31c6a6f1..e799f9722 100644
--- a/grafana/dashboards/mysql/dora-by-team.json
+++ b/grafana/dashboards/mysql/dora-by-team.json
@@ -206,7 +206,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 1: Deployment Frequency\nwith
last_few_calendar_months as(\n -- construct the last few calendar months
within the selected time period in the top-right corner\n SELECT\n
CAST(($__timeTo() - INTERVAL (H + T + U) DAY) AS date) day\n FROM\n (\n
SELECT\n 0 H\n UNION\n ALL\n SELECT\n 100\n
UNION\n ALL\n SELECT\n 200\n UNION\n ALL\n
SELECT\n 300\n ) H\n CROSS JOIN (\n [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nwith
last_few_calendar_months as(\n -- construct the last few calendar months
within the selected time period in the top-right corner\n SELECT\n
CAST(($__timeTo() - INTERVAL (H + T + U) DAY) AS date) day\n FROM\n (\n
SELECT\n 0 H\n UNION\n ALL\n SELECT\n 100\n
UNION\n ALL\n SELECT\n 200\n UNION\n ALL\n
SELECT\n 300\n ) H\n CROSS JOIN (\n [...]
"refId": "A",
"sql": {
"columns": [
@@ -325,7 +325,7 @@
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "-- Metric 1: Deployment Frequency\nwith
last_few_calendar_months as(\n-- construct the last few calendar months within
the selected time period in the top-right corner\n\tSELECT
CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) day\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 [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nwith
last_few_calendar_months as(\n-- construct the last few calendar months within
the selected time period in the top-right corner\n\tSELECT
CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) day\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 [...]
"refId": "A",
"select": [
[
@@ -462,7 +462,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 2: median lead time for changes\nwith _pr_stats
as (\n-- get the cycle time of PRs deployed by the deployments finished in the
selected period\n\tSELECT\n\t\tdistinct
pr.id,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin
user_accounts ua on pr.author_id = ua.account_id\n \tjoin users u on
ua.user_id = u.id\n \tjoin team_users tu on u.id = tu.user_id\n \tjoin
teams t on tu.team_id = t.id\n\t\tjoin project_pr_metrics ppm on ppm.id = p
[...]
+ "rawSql": "-- Metric 2: median lead time for changes\nwith _pr_stats
as (\n-- get the cycle time of PRs deployed by the deployments finished in the
selected period\n\tSELECT\n\t\tdistinct
pr.id,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin
user_accounts ua on pr.author_id = ua.account_id\n \tjoin users u on
ua.user_id = u.id\n \tjoin team_users tu on u.id = tu.user_id\n \tjoin
teams t on tu.team_id = t.id\n\t\tjoin project_pr_metrics ppm on ppm.id = p
[...]
"refId": "A",
"sql": {
"columns": [
@@ -579,7 +579,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 4: change failure rate\nwith _deployments as
(\n -- When deploying multiple commits in one pipeline, GitLab and BitBucket
may generate more than one deployment. However, DevLake consider these
deployments as ONE production deployment and use the last one's finished_date
as the finished date.\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n
max(cdc.finished_date) as deployment_finished_date\n FROM\n
cicd_deployment_commits cdc\n JOIN comm [...]
+ "rawSql": "-- Metric 4: change failure rate\nwith _deployments as
(\n -- When deploying multiple commits in one pipeline, GitLab and BitBucket
may generate more than one deployment. However, DevLake consider these
deployments as ONE production deployment and use the last one's finished_date
as the finished date.\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n
max(cdc.finished_date) as deployment_finished_date\n FROM\n
cicd_deployment_commits cdc\n JOIN comm [...]
"refId": "A",
"sql": {
"columns": [
@@ -697,7 +697,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed
deployment recovery time\nwith _deployments as (\n SELECT\n
cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as
deployment_finished_date\n FROM \n cicd_deployment_commits
cdc\n\t\tJOIN commits c on cdc.commit_sha = c.sha\n join user_accounts
ua on c.author_id = ua.account_id\n join users u on ua.user_id = u.id\n
join team_users tu on u.id = tu.user_id [...]
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed
deployment recovery time\nwith _deployments as (\n SELECT\n
cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as
deployment_finished_date\n FROM \n cicd_deployment_commits
cdc\n\t\tJOIN commits c on cdc.commit_sha = c.sha\n join user_accounts
ua on c.author_id = ua.account_id\n join users u on ua.user_id = u.id\n
join team_users tu on u.id = tu.user_id [...]
"refId": "A",
"sql": {
"columns": [
@@ -804,7 +804,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 1: Number of deployments per month\nwith
_deployments as(\n-- When deploying multiple commits in one pipeline, GitLab
and BitBucket may generate more than one deployment. However, DevLake consider
these deployments as ONE production deployment and use the last one's
finished_date as the finished date.\n\tSELECT
\n\t\tdate_format(deployment_finished_date,'%y/%m') as
month,\n\t\tcount(cicd_deployment_id) as deployment_count\n\tFROM
(\n\t\tSELECT\n\t\t\tcdc.ci [...]
+ "rawSql": "-- Metric 1: Number of deployments per month\nwith
_deployments as(\n-- When deploying multiple commits in one pipeline, GitLab
and BitBucket may generate more than one deployment. However, DevLake consider
these deployments as ONE production deployment and use the last one's
finished_date as the finished date.\n\tSELECT
\n\t\tdate_format(deployment_finished_date,'%y/%m') as
month,\n\t\tcount(cicd_deployment_id) as deployment_count\n\tFROM
(\n\t\tSELECT\n\t\t\tcdc.ci [...]
"refId": "A",
"sql": {
"columns": [
@@ -909,7 +909,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 2: median change lead time per month\nwith
_pr_stats as (\n-- get the cycle time of PRs deployed by the deployments
finished each month\n\tSELECT\n\t\tdistinct
pr.id,\n\t\tdate_format(cdc.finished_date,'%y/%m') as
month,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin
user_accounts ua on pr.author_id = ua.account_id\n \tjoin users u on
ua.user_id = u.id\n \tjoin team_users tu on u.id = tu.user_id\n \tjoin
teams t on tu.team_id = t.id [...]
+ "rawSql": "-- Metric 2: median change lead time per month\nwith
_pr_stats as (\n-- get the cycle time of PRs deployed by the deployments
finished each month\n\tSELECT\n\t\tdistinct
pr.id,\n\t\tdate_format(cdc.finished_date,'%y/%m') as
month,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin
user_accounts ua on pr.author_id = ua.account_id\n \tjoin users u on
ua.user_id = u.id\n \tjoin team_users tu on u.id = tu.user_id\n \tjoin
teams t on tu.team_id = t.id [...]
"refId": "A",
"sql": {
"columns": [
@@ -1033,7 +1033,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- Metric 4: change failure rate per month\nwith
_deployments as (\n -- When deploying multiple commits in one pipeline, GitLab
and BitBucket may generate more than one deployment. However, DevLake consider
these deployments as ONE production deployment and use the last one's
finished_date as the finished date.\n SELECT\n cdc.cicd_deployment_id as
deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n
FROM\n cicd_deployment_commits cdc\n [...]
+ "rawSql": "-- Metric 4: change failure rate per month\nwith
_deployments as (\n -- When deploying multiple commits in one pipeline, GitLab
and BitBucket may generate more than one deployment. However, DevLake consider
these deployments as ONE production deployment and use the last one's
finished_date as the finished date.\n SELECT\n cdc.cicd_deployment_id as
deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n
FROM\n cicd_deployment_commits cdc\n [...]
"refId": "A",
"sql": {
"columns": [
@@ -1143,7 +1143,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed
deployment recovery time\nwith _deployments as (\n SELECT\n
cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as
deployment_finished_date\n FROM\n cicd_deployment_commits cdc\n JOIN
commits c on cdc.commit_sha = c.sha\n join user_accounts ua on c.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t on tu.team [...]
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed
deployment recovery time\nwith _deployments as (\n SELECT\n
cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as
deployment_finished_date\n FROM\n cicd_deployment_commits cdc\n JOIN
commits c on cdc.commit_sha = c.sha\n join user_accounts ua on c.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t on tu.team [...]
"refId": "A",
"sql": {
"columns": [
diff --git
a/grafana/dashboards/mysql/engineering-throughput-and-cycle-time-team-view.json
b/grafana/dashboards/mysql/engineering-throughput-and-cycle-time-team-view.json
index 1a9c99c27..175b18b61 100644
---
a/grafana/dashboards/mysql/engineering-throughput-and-cycle-time-team-view.json
+++
b/grafana/dashboards/mysql/engineering-throughput-and-cycle-time-team-view.json
@@ -210,7 +210,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.url,\n
pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t on tu.team_id = t.id\n join
project_mapping pm on pr.base_repo_id = pm.row_id and [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.url,\n
pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t on tu.team_id = t.id\n join
project_mapping pm on pr.base_repo_id = pm.row_id and [...]
"refId": "A",
"select": [
[
@@ -380,7 +380,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.url,\n
pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.url,\n
pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t [...]
"refId": "A",
"select": [
[
@@ -533,7 +533,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.url,\n
pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.url,\n
pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t [...]
"refId": "A",
"select": [
[
@@ -686,7 +686,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.url,\n
pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.url,\n
pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n join teams t [...]
"refId": "A",
"select": [
[
@@ -866,7 +866,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _issues as(\n SELECT\n i.id,\n i.url,\n
i.created_date,\n i.status,\n i.assignee_id,\n i.story_point,\n
i.priority,\n u.id as user_id,\n u.name as user_name,\n t.id as
team_id,\n t.name as team\n FROM issues i\n\t join board_issues bi on i.id
= bi.issue_id\n\t join boards b on bi.board_id = b.id\n\t join
project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts ua on
i.assignee_id = ua.account_id\n join users u on ua [...]
+ "rawSql": "with _issues as(\n SELECT\n i.id,\n i.url,\n
i.created_date,\n i.status,\n i.assignee_id,\n i.story_point,\n
i.priority,\n u.id as user_id,\n u.name as user_name,\n t.id as
team_id,\n t.name as team\n FROM issues i\n\t join board_issues bi on i.id
= bi.issue_id\n\t join boards b on bi.board_id = b.id\n\t join
project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts ua on
i.assignee_id = ua.account_id\n join users u on ua [...]
"refId": "A",
"select": [
[
@@ -1037,7 +1037,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _issues as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join user [...]
+ "rawSql": "with _issues as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join user [...]
"refId": "A",
"select": [
[
@@ -1234,7 +1234,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _issues as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join user [...]
+ "rawSql": "with _issues as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join user [...]
"refId": "A",
"select": [
[
@@ -1405,7 +1405,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _issues as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join user [...]
+ "rawSql": "with _issues as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join user [...]
"refId": "A",
"select": [
[
@@ -1602,7 +1602,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _merged_prs as(\n SELECT\n distinct pr.id,\n
pr.url,\n pr.created_date,\n pr.merged_date,\n pr.author_id,\n
prc.id as comment_id,\n u.id as user_id,\n u.name as user_name,\n t.id
as team_id,\n t.name as team\n FROM pull_requests pr\n join
project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n
left join pull_request_comments prc on pr.id = prc.pull_request_id\n join
user_accounts ua on pr.author_id = u [...]
+ "rawSql": "with _merged_prs as(\n SELECT\n distinct pr.id,\n
pr.url,\n pr.created_date,\n pr.merged_date,\n pr.author_id,\n
prc.id as comment_id,\n u.id as user_id,\n u.name as user_name,\n t.id
as team_id,\n t.name as team\n FROM pull_requests pr\n join
project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n
left join pull_request_comments prc on pr.id = prc.pull_request_id\n join
user_accounts ua on pr.author_id = u [...]
"refId": "A",
"select": [
[
@@ -1773,7 +1773,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n distinct pr.id,\n
pr.url,\n pr.created_date,\n pr.merged_date,\n pr.author_id,\n
pr.merge_commit_sha,\n c.additions + c.deletions as loc,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n left join commits c on
pr.merge_commit_sha = c.sha\n join user_accounts ua on pr [...]
+ "rawSql": "with _prs as(\n SELECT\n distinct pr.id,\n
pr.url,\n pr.created_date,\n pr.merged_date,\n pr.author_id,\n
pr.merge_commit_sha,\n c.additions + c.deletions as loc,\n u.id as
user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as team\n
FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n left join commits c on
pr.merge_commit_sha = c.sha\n join user_accounts ua on pr [...]
"refId": "A",
"select": [
[
@@ -1970,7 +1970,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _bugs as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join users [...]
+ "rawSql": "with _bugs as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join users [...]
"refId": "A",
"select": [
[
@@ -2141,7 +2141,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _bugs as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join users [...]
+ "rawSql": "with _bugs as(\n SELECT\n distinct i.id,\n
i.url,\n i.created_date,\n i.status,\n i.assignee_id,\n
i.story_point,\n i.priority,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM issues i\n\t join
board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id =
b.id\n\t join project_mapping pm on b.id = pm.row_id\n \tjoin user_accounts
ua on i.assignee_id = ua.account_id\n join users [...]
"refId": "A",
"select": [
[
@@ -2335,7 +2335,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no cycle_time to make
sure cycle_time equals the sum of the four metrics
below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time,\n\t\tpr.author_id,\n
u.id as user_id,\n u.name as user_name,\n t.id as team_id,\n t.name
as team\n FROM pull_requests pr\n join project_mapping pm on
pr.base_repo_id = pm.row_id and pm.table = 'repos' \n\t\tlef [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no cycle_time to make
sure cycle_time equals the sum of the four metrics
below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time,\n\t\tpr.author_id,\n
u.id as user_id,\n u.name as user_name,\n t.id as team_id,\n t.name
as team\n FROM pull_requests pr\n join project_mapping pm on
pr.base_repo_id = pm.row_id and pm.table = 'repos' \n\t\tlef [...]
"refId": "A",
"select": [
[
@@ -2502,7 +2502,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no coding_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_coding_time/60,0) as
coding_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table =
'repos' \n\t\tle [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no coding_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_coding_time/60,0) as
coding_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table =
'repos' \n\t\tle [...]
"refId": "A",
"select": [
[
@@ -2669,7 +2669,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no pickup_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_pickup_time/60,0) as
pickup_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table =
'repos' \n\t\tle [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no pickup_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_pickup_time/60,0) as
pickup_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table =
'repos' \n\t\tle [...]
"refId": "A",
"select": [
[
@@ -2836,7 +2836,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no review_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_review_time/60,0) as
review_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table =
'repos' \n\t\tle [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no review_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_review_time/60,0) as
review_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table =
'repos' \n\t\tle [...]
"refId": "A",
"select": [
[
@@ -3003,7 +3003,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no deploy_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_deploy_time/60,0) as
deploy_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table =
'repos' \n\t\tle [...]
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.merged_date
as pr_merged_date,\n -- convert null to 0 if a PR has no deploy_time to make
sure cycle_time equals the sum of the four
sub-metrics\n\t\tcoalesce(prm.pr_deploy_time/60,0) as
deploy_time,\n\t\tpr.author_id,\n u.id as user_id,\n u.name as
user_name,\n t.id as team_id,\n t.name as team\n FROM pull_requests pr\n
join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table =
'repos' \n\t\tle [...]
"refId": "A",
"select": [
[
@@ -3196,7 +3196,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _merged_prs as(\n SELECT\n distinct pr.id,\n
pr.url,\n pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id
as user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as
team\n FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n [...]
+ "rawSql": "with _merged_prs as(\n SELECT\n distinct pr.id,\n
pr.url,\n pr.created_date,\n pr.merged_date,\n pr.author_id,\n u.id
as user_id,\n u.name as user_name,\n t.id as team_id,\n t.name as
team\n FROM pull_requests pr\n join project_mapping pm on pr.base_repo_id =
pm.row_id and pm.table = 'repos' \n join user_accounts ua on pr.author_id =
ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on
u.id = tu.user_id\n [...]
"refId": "A",
"select": [
[
diff --git a/grafana/dashboards/mysql/work-logs.json
b/grafana/dashboards/mysql/work-logs.json
index df6d88baa..63112aca1 100644
--- a/grafana/dashboards/mysql/work-logs.json
+++ b/grafana/dashboards/mysql/work-logs.json
@@ -216,7 +216,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n_activities as (\n SELECT \n *,\n ROW_NUMBER() OVER
(PARTITION BY `Date` ORDER BY `Time` desc) AS _row_number\n FROM (\n SELECT
DATE_FORMAT(created_date, '%Y-%m-%d | %W') as Date, created_date as Time,
'Create an issue' as Activity, concat('#', [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n_activities as (\n SELECT \n *,\n
ROW_NUMBER() OVER (PARTITION BY `Date` ORDER BY `Time` desc) AS _row_number\n
FROM (\n SELECT DATE_FORMAT(created_date, '%Y-%m-%d | %W') as Date,
created_date as Time, 'Create an issue' as Activity [...]
"refId": "A",
"sql": {
"columns": [
@@ -359,7 +359,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n_activities as (\n SELECT \n *,\n ROW_NUMBER() OVER
(PARTITION BY `Date` ORDER BY `Time` desc) AS _row_number\n FROM (\n SELECT
DATE(created_date) as Date, created_date as Time, 'Create an issue' as
Activity, concat('#', issue_key, ' ', title) a [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n_activities as (\n SELECT \n *,\n
ROW_NUMBER() OVER (PARTITION BY `Date` ORDER BY `Time` desc) AS _row_number\n
FROM (\n SELECT DATE(created_date) as Date, created_date as Time, 'Create an
issue' as Activity, concat('#', issue_key, [...]
"refId": "A",
"sql": {
"columns": [
@@ -580,7 +580,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n_activities as (\n SELECT \n *,\n ROW_NUMBER() OVER
(PARTITION BY `Date` ORDER BY `Time` desc) AS _row_number\n FROM (\n SELECT
DATE(created_date) as Date, created_date as Time, 'Create an issue' as
Activity, concat('#', issue_key, ' ', title) a [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n_activities as (\n SELECT \n *,\n
ROW_NUMBER() OVER (PARTITION BY `Date` ORDER BY `Time` desc) AS _row_number\n
FROM (\n SELECT DATE(created_date) as Date, created_date as Time, 'Create an
issue' as Activity, concat('#', issue_key, [...]
"refId": "A",
"sql": {
"columns": [
@@ -716,7 +716,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n\n_issues as (\n SELECT DATE_FORMAT(created_date, '%d/%m/%Y')
as Date, created_date as Time, 'Create an issue' as Activity, concat('#',
issue_key, ' ', title) as Details, status, a.name as Name\n FROM issues i\n
join _accounts a on i.creator_id = a.acco [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n\n_issues as (\n SELECT
DATE_FORMAT(created_date, '%d/%m/%Y') as Date, created_date as Time, 'Create an
issue' as Activity, concat('#', issue_key, ' ', title) as Details, status,
a.name as Name\n FROM issues i\n join _accounts a on i.creat [...]
"refId": "A",
"sql": {
"columns": [
@@ -787,7 +787,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name, a.email\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n)\n\nSELECT count(distinct c.sha)\nFROM commits c\njoin _accounts a
on c.author_id = a.email\nwhere $__timeFilter(authored_date)\n",
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name, u.email\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n)\n\nSELECT count(distinct c.sha)\nFROM commits
c\njoin _accounts a on c.author_id = a.email\nwhere
$__timeFilter(authored_date)\n",
"refId": "A",
"sql": {
"columns": [
@@ -859,7 +859,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n\n_commits as (\n SELECT distinct DATE_FORMAT(authored_date,
'%d/%m/%Y') as Date, authored_date as Time, 'Finish a commit' as Activity,
concat(message, ' #', sha) as Details, a.name as Name, c.additions,
c.deletions\n FROM commits c\n join _accounts a o [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n\n_commits as (\n SELECT distinct
DATE_FORMAT(authored_date, '%d/%m/%Y') as Date, authored_date as Time, 'Finish
a commit' as Activity, concat(message, ' #', sha) as Details, a.name as Name,
c.additions, c.deletions\n FROM commits c\n join [...]
"refId": "A",
"sql": {
"columns": [
@@ -931,7 +931,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n\n_prs as (\n SELECT pr.id as pr_id, pr.merged_date,
concat('#', pr.pull_request_key, ' ', pr.title) as details, prc.id as
comment_id, prc.created_date as comment_date, a.name, prc.type as
comment_type\n FROM pull_requests pr\n left join pull_request_co [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n\n_prs as (\n SELECT pr.id as pr_id,
pr.merged_date, concat('#', pr.pull_request_key, ' ', pr.title) as details,
prc.id as comment_id, prc.created_date as comment_date, a.name, prc.type as
comment_type\n FROM pull_requests pr\n left join p [...]
"refId": "A",
"sql": {
"columns": [
@@ -1003,7 +1003,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n\n_prs as (\n SELECT distinct DATE_FORMAT(created_date,
'%d/%m/%Y') as Date, created_date as Time, 'Open a PR' as Activity, concat('#',
pull_request_key, ' ', title) as Details, a.name as Name, pr.id,
pr.merged_date\n FROM pull_requests pr\n join _accou [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n\n_prs as (\n SELECT distinct
DATE_FORMAT(created_date, '%d/%m/%Y') as Date, created_date as Time, 'Open a
PR' as Activity, concat('#', pull_request_key, ' ', title) as Details, a.name
as Name, pr.id, pr.merged_date\n FROM pull_requests pr\ [...]
"refId": "A",
"sql": {
"columns": [
@@ -1121,7 +1121,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n_prs as (\n SELECT \n DATE_ADD(date(created_date), INTERVAL
-DAY(date(created_date))+1 DAY) as time,\n count(distinct pr.id) as
pr_count\n FROM pull_requests pr\n join _accounts a on pr.author_id =
a.account_id\n where \n $__timeFilter(created [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n_prs as (\n SELECT \n
DATE_ADD(date(created_date), INTERVAL -DAY(date(created_date))+1 DAY) as
time,\n count(distinct pr.id) as pr_count\n FROM pull_requests pr\n join
_accounts a on pr.author_id = a.account_id\n where \n $__time [...]
"refId": "A",
"select": [
[
@@ -1226,7 +1226,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n\n_commits as (\n SELECT distinct DATE_FORMAT(authored_date,
'%d/%m/%Y') as Date, authored_date as Time, 'Finish a commit' as Activity,
concat(message, ' #', sha) as Details, a.name as Name, c.additions,
c.deletions, c.sha\n FROM commits c\n join _accou [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n\n_commits as (\n SELECT distinct
DATE_FORMAT(authored_date, '%d/%m/%Y') as Date, authored_date as Time, 'Finish
a commit' as Activity, concat(message, ' #', sha) as Details, a.name as Name,
c.additions, c.deletions, c.sha\n FROM commits c\ [...]
"refId": "A",
"sql": {
"columns": [
@@ -1298,7 +1298,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n),\n\n\n_prs as (\n SELECT DATE_FORMAT(prc.created_date, '%d/%m/%Y')
as Date, prc.created_date as Time, 'Comment on PR' as Activity, concat('#',
pr.pull_request_key, ' ', pr.title) as Details, a.name as Name, pr.id as pr_id,
prc.id as prc_id\n FROM pull_reques [...]
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n),\n\n\n_prs as (\n SELECT
DATE_FORMAT(prc.created_date, '%d/%m/%Y') as Date, prc.created_date as Time,
'Comment on PR' as Activity, concat('#', pr.pull_request_key, ' ', pr.title) as
Details, a.name as Name, pr.id as pr_id, prc.id as prc_id\n FR [...]
"refId": "A",
"sql": {
"columns": [
@@ -1371,7 +1371,7 @@
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
($users)\n)\n\n\nSELECT
avg(TIMESTAMPDIFF(Minute,pr.created_date,pr.merged_date)/60) as 'Time to
merge'\nFROM \n pull_requests pr\n join _accounts a on pr.author_id =
a.account_id\nWHERE \n $__timeFilter(pr.created_date)\n",
+ "rawSql": "with _accounts as (\n select ua.account_id, ua.user_id,
u.name\n from accounts a \n join user_accounts ua on a.id =
ua.account_id\n join users u on ua.user_id = u.id\n where ua.user_id in
(${users:singlequote})\n)\n\n\nSELECT
avg(TIMESTAMPDIFF(Minute,pr.created_date,pr.merged_date)/60) as 'Time to
merge'\nFROM \n pull_requests pr\n join _accounts a on pr.author_id =
a.account_id\nWHERE \n $__timeFilter(pr.created_date)\n",
"refId": "A",
"sql": {
"columns": [
@@ -1436,15 +1436,15 @@
"$__all"
]
},
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "definition": "select concat(users.name, '--', users.id) from users
left join team_users on users.id = team_users.user_id where team_users.team_id
in ($team)",
+ "datasource": "mysql",
+ "definition": "select concat(users.name, '--', users.id) from users
left join team_users on users.id = team_users.user_id where team_users.team_id
in (${team:singlequote})",
"hide": 0,
"includeAll": true,
"label": "User",
"multi": true,
"name": "users",
"options": [],
- "query": "select concat(users.name, '--', users.id) from users left
join team_users on users.id = team_users.user_id where team_users.team_id in
($team)",
+ "query": "select concat(users.name, '--', users.id) from users left
join team_users on users.id = team_users.user_id where team_users.team_id in
(${team:singlequote})",
"refresh": 1,
"regex": "/^(?<text>.*)--(?<value>.*)$/",
"skipUrlSync": false,