This is an automated email from the ASF dual-hosted git repository.

zky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 2683321f3 fix: issue created on Sunday are not being considered (#6682)
2683321f3 is described below

commit 2683321f34eadae8f7189474ee93ade999b9142c
Author: abeizn <[email protected]>
AuthorDate: Thu Dec 21 16:23:17 2023 +0800

    fix: issue created on Sunday are not being considered (#6682)
---
 grafana/dashboards/WeeklyBugRetro.json       | 14 ++++++------
 grafana/dashboards/WeeklyCommunityRetro.json | 34 ++++++++++++++--------------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/grafana/dashboards/WeeklyBugRetro.json 
b/grafana/dashboards/WeeklyBugRetro.json
index 8108a3c49..1623b1074 100644
--- a/grafana/dashboards/WeeklyBugRetro.json
+++ b/grafana/dashboards/WeeklyBugRetro.json
@@ -112,7 +112,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  count(*)\nfrom\n  issues as i\n  join 
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)",
+          "rawSql": "select\n  count(*)\nfrom\n  issues as i\n  join 
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()) DAY\n  and b.id in ($board_id)",
           "refId": "A",
           "select": [
             [
@@ -198,7 +198,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  priority,\n  count(*) as 'Issue Number'\nfrom\n 
 issues as i\n  join 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",
+          "rawSql": "select\n  priority,\n  count(*) as 'Issue Number'\nfrom\n 
 issues as i\n  join 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()) DAY\n  and b.id in ($board_id)\ngroup 
by 1",
           "refId": "A",
           "select": [
             [
@@ -363,7 +363,7 @@
           "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  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 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)",
+          "rawSql": "select\n  i.issue_key as 'Issue Number',\n  i.title as 
'Title',\n  i.url as 'Url'\nfrom\n  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 date(i.created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate()) DAY\n  and 
b.id in ($board_id)",
           "refId": "A",
           "select": [
             [
@@ -445,7 +445,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  count(*)\nfrom\n  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)",
+          "rawSql": "select\n  count(*)\nfrom\n  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()) DAY\n  and b.id in ($board_id)",
           "refId": "A",
           "select": [
             [
@@ -532,7 +532,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  avg(lead_time_minutes / 1440)\nfrom\n  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)",
+          "rawSql": "select\n  avg(lead_time_minutes / 1440)\nfrom\n  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()) DAY\n  and b.id in ($board_id)",
           "refId": "A",
           "select": [
             [
@@ -670,7 +670,7 @@
           "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  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)",
+          "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  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()) DAY\n  and b.id in ($board_id)",
           "refId": "A",
           "select": [
             [
@@ -783,7 +783,7 @@
           "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  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",
+          "rawSql": "select\n  concat('#',i.issue_key, ' ', i.title) as 
issue_key,\n  lead_time_minutes/1440 as lead_time\nfrom\n  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()) DAY\n  and b.id in 
($board_id)\norder by lead_time desc",
           "refId": "A",
           "select": [
             [
diff --git a/grafana/dashboards/WeeklyCommunityRetro.json 
b/grafana/dashboards/WeeklyCommunityRetro.json
index e2d5bd6d7..92c34d020 100644
--- a/grafana/dashboards/WeeklyCommunityRetro.json
+++ b/grafana/dashboards/WeeklyCommunityRetro.json
@@ -138,7 +138,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  count(*)\nfrom\n  issues as i\n  join 
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 ($repo_id)",
+          "rawSql": "select\n  count(*)\nfrom\n  issues as i\n  join 
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()) DAY\n  and b.id in ($repo_id)",
           "refId": "A",
           "select": [
             [
@@ -220,7 +220,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  count(*)\nfrom\n  issues as i\n  join 
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 ($repo_id)\n  and i.creator_id not in 
(select distinct id from accounts where organization in ($org))",
+          "rawSql": "select\n  count(*)\nfrom\n  issues as i\n  join 
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()) DAY\n  and b.id in ($repo_id)\n  and i.creator_id not in 
(select distinct id from accounts where organization in ($org))",
           "refId": "A",
           "select": [
             [
@@ -303,7 +303,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  sum(case when i.creator_id not in (select 
distinct id from accounts where organization in ($org)\n    ) then 1 else 0 
end)/count(*) as community_issue_ratio\nfrom\n  issues as i\n  join 
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 ($repo_id)",
+          "rawSql": "select\n  sum(case when i.creator_id not in (select 
distinct id from accounts where organization in ($org)\n    ) then 1 else 0 
end)/count(*) as community_issue_ratio\nfrom\n  issues as i\n  join 
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()) DAY\n  and b.id in ($repo_id)",
           "refId": "A",
           "select": [
             [
@@ -389,7 +389,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  distinct i.creator_name\nfrom\n  issues as i\n  
join 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 ($repo_id)\n  and i.creator_name not in 
(select distinct creator_name from issues where created_date < curdate() - 
INTERVAL WEEKDAY(curdate())+7 DAY a [...]
+          "rawSql": "select\n  distinct i.creator_name\nfrom\n  issues as i\n  
join 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()) DAY\n  and b.id in ($repo_id)\n  and i.creator_name not in 
(select distinct creator_name from issues where created_date < curdate() - 
INTERVAL WEEKDAY(curdate())+7 DAY and [...]
           "refId": "A",
           "select": [
             [
@@ -476,7 +476,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "with issue_comment_list as(\n  select\n    i.id as 
issue_id,\n    i.url,\n    i.title,\n    ic.id as comment_id,\n    
ic.created_date as comment_date,\n    ic.body,\n    case when ic.id is not null 
then rank() over (partition by i.id order by ic.created_date asc) else null end 
as comment_rank\n  from\n    issues i\n    join board_issues bi on i.id = 
bi.issue_id\n    join boards b on bi.board_id = b.id\n    left join 
issue_comments ic on i.id = ic.issue_id\n  where\n  [...]
+          "rawSql": "with issue_comment_list as(\n  select\n    i.id as 
issue_id,\n    i.url,\n    i.title,\n    ic.id as comment_id,\n    
ic.created_date as comment_date,\n    ic.body,\n    case when ic.id is not null 
then rank() over (partition by i.id order by ic.created_date asc) else null end 
as comment_rank\n  from\n    issues i\n    join board_issues bi on i.id = 
bi.issue_id\n    join boards b on bi.board_id = b.id\n    left join 
issue_comments ic on i.id = ic.issue_id\n  where\n  [...]
           "refId": "A",
           "select": [
             [
@@ -639,7 +639,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "with issue_comment_list as(\n  select\n    i.id as 
issue_id,\n    i.url,\n    i.issue_key,\n    i.title,\n    i.creator_name,\n    
i.created_date as issue_created_date,\n    i.status,\n    ic.id as 
comment_id,\n    ic.created_date as comment_date,\n    ic.body,\n    case when 
ic.id is not null then rank() over (partition by i.id order by ic.created_date 
asc) else null end as comment_rank\n  from\n    issues i\n    join board_issues 
bi on i.id = bi.issue_id\n    join  [...]
+          "rawSql": "with issue_comment_list as(\n  select\n    i.id as 
issue_id,\n    i.url,\n    i.issue_key,\n    i.title,\n    i.creator_name,\n    
i.created_date as issue_created_date,\n    i.status,\n    ic.id as 
comment_id,\n    ic.created_date as comment_date,\n    ic.body,\n    case when 
ic.id is not null then rank() over (partition by i.id order by ic.created_date 
asc) else null end as comment_rank\n  from\n    issues i\n    join board_issues 
bi on i.id = bi.issue_id\n    join  [...]
           "refId": "A",
           "select": [
             [
@@ -743,7 +743,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "with issue_comment_list as(\n  select\n    i.id as 
issue_id,\n    i.url,\n    i.title,\n    i.created_date as 
issue_created_date,\n    ic.id as comment_id,\n    ic.created_date as 
comment_date,\n    ic.body,\n    case when ic.id is not null then rank() over 
(partition by i.id order by ic.created_date asc) else null end as 
comment_rank\n  from\n    issues i\n    join board_issues bi on i.id = 
bi.issue_id\n    join boards b on bi.board_id = b.id\n    left join issue_co 
[...]
+          "rawSql": "with issue_comment_list as(\n  select\n    i.id as 
issue_id,\n    i.url,\n    i.title,\n    i.created_date as 
issue_created_date,\n    ic.id as comment_id,\n    ic.created_date as 
comment_date,\n    ic.body,\n    case when ic.id is not null then rank() over 
(partition by i.id order by ic.created_date asc) else null end as 
comment_rank\n  from\n    issues i\n    join board_issues bi on i.id = 
bi.issue_id\n    join boards b on bi.board_id = b.id\n    left join issue_co 
[...]
           "refId": "A",
           "select": [
             [
@@ -911,7 +911,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "with issue_comment_list as(\n  select\n    
SUBSTRING_INDEX(i.url, '/', -1) as issue_number,\n    i.url,\n    
i.issue_key,\n    i.title,\n    i.creator_name,\n    i.created_date as 
issue_created_date,\n    ic.id as comment_id,\n    ic.created_date as 
comment_date,\n    ic.body,\n    case when ic.id is not null then rank() over 
(partition by i.id order by ic.created_date asc) else null end as 
comment_rank\n  from\n    issues i\n    join board_issues bi on i.id = bi.iss 
[...]
+          "rawSql": "with issue_comment_list as(\n  select\n    
SUBSTRING_INDEX(i.url, '/', -1) as issue_number,\n    i.url,\n    
i.issue_key,\n    i.title,\n    i.creator_name,\n    i.created_date as 
issue_created_date,\n    ic.id as comment_id,\n    ic.created_date as 
comment_date,\n    ic.body,\n    case when ic.id is not null then rank() over 
(partition by i.id order by ic.created_date asc) else null end as 
comment_rank\n  from\n    issues i\n    join board_issues bi on i.id = bi.iss 
[...]
           "refId": "A",
           "select": [
             [
@@ -1037,7 +1037,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n\tcount(*) as pull_request_count\nfrom 
\n\tpull_requests pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 
DAY\n\tand base_repo_id in ($repo_id)\n\t\n\n",
+          "rawSql": "select\n\tcount(*) as pull_request_count\nfrom 
\n\tpull_requests pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate()) DAY\n\tand 
base_repo_id in ($repo_id)\n\t\n\n",
           "refId": "A",
           "select": [
             [
@@ -1120,7 +1120,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n\tcount(*) as pull_request_count\nfrom 
\n\tpull_requests pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 
DAY\n\tand base_repo_id in ($repo_id)\n\tand author_id not in (select distinct 
id from accounts where organization in ($org))",
+          "rawSql": "select\n\tcount(*) as pull_request_count\nfrom 
\n\tpull_requests pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate()) DAY\n\tand 
base_repo_id in ($repo_id)\n\tand author_id not in (select distinct id from 
accounts where organization in ($org))",
           "refId": "A",
           "select": [
             [
@@ -1203,7 +1203,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  sum(case when author_id not in (select distinct 
id from accounts where organization in ($org))\n  then 1 else 0 end)/count(*) 
as community_pr_ratio\nfrom\n  pull_requests pr\nwhere\n  date(created_date) 
BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL 
WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)",
+          "rawSql": "select\n  sum(case when author_id not in (select distinct 
id from accounts where organization in ($org))\n  then 1 else 0 end)/count(*) 
as community_pr_ratio\nfrom\n  pull_requests pr\nwhere\n  date(created_date) 
BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL 
WEEKDAY(curdate()) DAY\n\tand base_repo_id in ($repo_id)",
           "refId": "A",
           "select": [
             [
@@ -1286,7 +1286,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n\tcount(*) as merged_pull_request_count\nfrom 
\n\tpull_requests pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 
DAY\n\tand base_repo_id in ($repo_id)\n\tand merged_date is not null\n\tand 
author_id not in (select distinct id from accounts where organization in 
($org))",
+          "rawSql": "select\n\tcount(*) as merged_pull_request_count\nfrom 
\n\tpull_requests pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate()) DAY\n\tand 
base_repo_id in ($repo_id)\n\tand merged_date is not null\n\tand author_id not 
in (select distinct id from accounts where organization in ($org))",
           "refId": "A",
           "select": [
             [
@@ -1370,7 +1370,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": 
"select\n\tavg(TIMESTAMPDIFF(Minute,created_date,merged_date)/1440)\nfrom 
\n\tpull_requests\nwhere \n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 
DAY\n\tand base_repo_id in ($repo_id)\n\tand merged_date is not null\n\tand 
author_id not in (select distinct id from accounts where organization in 
($org))",
+          "rawSql": 
"select\n\tavg(TIMESTAMPDIFF(Minute,created_date,merged_date)/1440)\nfrom 
\n\tpull_requests\nwhere \n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate()) DAY\n\tand 
base_repo_id in ($repo_id)\n\tand merged_date is not null\n\tand author_id not 
in (select distinct id from accounts where organization in ($org))",
           "refId": "A",
           "select": [
             [
@@ -1458,7 +1458,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n  distinct author_name\nfrom \n\tpull_requests 
pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 
DAY\n\tand merged_date is not null\n\tand base_repo_id in ($repo_id)\n\tand 
author_name not in (select distinct author_name from pull_requests where 
created_date < curdate() - INTERVAL WEEKDAY(curdate())+7 DAY and author_name is 
not null)",
+          "rawSql": "select\n  distinct author_name\nfrom \n\tpull_requests 
pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate()) DAY\n\tand 
merged_date is not null\n\tand base_repo_id in ($repo_id)\n\tand author_name 
not in (select distinct author_name from pull_requests where created_date < 
curdate() - INTERVAL WEEKDAY(curdate())+7 DAY and author_name is not null)",
           "refId": "A",
           "select": [
             [
@@ -1563,7 +1563,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n\tsum(case when merged_date is not null then 1 
else 0 end)/ count(*) as merged_pull_request_ratio\nfrom \n\tpull_requests 
pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 
DAY\n\tand base_repo_id in ($repo_id)\n\tand author_id not in (select distinct 
id from accounts where organization in ($org))",
+          "rawSql": "select\n\tsum(case when merged_date is not null then 1 
else 0 end)/ count(*) as merged_pull_request_ratio\nfrom \n\tpull_requests 
pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate()) DAY\n\tand 
base_repo_id in ($repo_id)\n\tand author_id not in (select distinct id from 
accounts where organization in ($org))",
           "refId": "A",
           "select": [
             [
@@ -1679,7 +1679,7 @@
           "metricColumn": "none",
           "queryType": "randomWalk",
           "rawQuery": true,
-          "rawSql": "select\n  pull_request_key,\n  title,\n  status,\n  
author_name,\n  created_date,\n  (TIMESTAMPDIFF(MINUTE, 
created_date,curdate()))/1440 as queue_time_in_days,\n  url\nfrom 
\n\tpull_requests pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate())+1 
DAY\n\tand base_repo_id in ($repo_id)\n\tand merged_date is null\n  and 
author_id not in (select distinct id from accounts where organization in 
($org))",
+          "rawSql": "select\n  pull_request_key,\n  title,\n  status,\n  
author_name,\n  created_date,\n  (TIMESTAMPDIFF(MINUTE, 
created_date,curdate()))/1440 as queue_time_in_days,\n  url\nfrom 
\n\tpull_requests pr\nwhere\n  date(created_date) BETWEEN curdate() - INTERVAL 
WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL WEEKDAY(curdate()) DAY\n\tand 
base_repo_id in ($repo_id)\n\tand merged_date is null\n  and author_id not in 
(select distinct id from accounts where organization in ($org))",
           "refId": "A",
           "select": [
             [
@@ -1811,7 +1811,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n  author_name,\n\tcount(*) as 
pull_request_count\nfrom \n\tpull_requests pr\nwhere\n  date(created_date) 
BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL 
WEEKDAY(curdate())+1 DAY\n\tand base_repo_id in ($repo_id)\n\tand merged_date 
is not NULL\n\tand author_id not in (select distinct id from accounts where 
organization in ($org))\ngroup by 1\norder by 2 desc\nlimit 20\n",
+          "rawSql": "select\n  author_name,\n\tcount(*) as 
pull_request_count\nfrom \n\tpull_requests pr\nwhere\n  date(created_date) 
BETWEEN curdate() - INTERVAL WEEKDAY(curdate())+7 DAY AND curdate() - INTERVAL 
WEEKDAY(curdate()) DAY\n\tand base_repo_id in ($repo_id)\n\tand merged_date is 
not NULL\n\tand author_id not in (select distinct id from accounts where 
organization in ($org))\ngroup by 1\norder by 2 desc\nlimit 20\n",
           "refId": "A",
           "select": [
             [

Reply via email to