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

abeizn pushed a commit to branch release-v0.16
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.16 by this push:
     new 3ebafbdb5 fix: gitlab case inconsistency in dashboard sql (#4999)
3ebafbdb5 is described below

commit 3ebafbdb53e8fbec90df83cb87d8c0cb55c0afc1
Author: abeizn <[email protected]>
AuthorDate: Fri Apr 21 19:41:35 2023 +0800

    fix: gitlab case inconsistency in dashboard sql (#4999)
---
 grafana/dashboards/Gitlab.json | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/grafana/dashboards/Gitlab.json b/grafana/dashboards/Gitlab.json
index fc6162128..b0f084126 100644
--- a/grafana/dashboards/Gitlab.json
+++ b/grafana/dashboards/Gitlab.json
@@ -16,7 +16,7 @@
   "gnetId": null,
   "graphTooltip": 0,
   "id": 26,
-  "iteration": 1682063010710,
+  "iteration": 1677590524546,
   "links": [],
   "panels": [
     {
@@ -306,7 +306,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n  author_name,\n\tcount(*) as 
merged_pull_request_count\nfrom \n\tpull_requests pr\nwhere\n  
$__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\tand pr.status 
in ('CLOSED', 'MERGED') and pr.merged_date is not null\ngroup by 1\norder by 2 
desc\nlimit 20\n",
+          "rawSql": "select\n  author_name,\n\tcount(*) as 
merged_pull_request_count\nfrom \n\tpull_requests pr\nwhere\n  
$__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\tand pr.status 
in ('closed', 'merged') and pr.merged_date is not null\ngroup by 1\norder by 2 
desc\nlimit 20\n",
           "refId": "A",
           "select": [
             [
@@ -401,7 +401,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n  count(distinct case when status in ('CLOSED', 
'MERGED') and merged_date is null then id else null end)/count(distinct case 
when status in ('CLOSED', 'MERGED') then id else null end) as ratio\nfrom 
\n\tpull_requests pr\nwhere\n  $__timeFilter(created_date)\n\tand base_repo_id 
in ($repo_id)",
+          "rawSql": "select\n  count(distinct case when status in ('closed', 
'merged') and merged_date is null then id else null end)/count(distinct case 
when status in ('closed', 'merged') then id else null end) as ratio\nfrom 
\n\tpull_requests pr\nwhere\n  $__timeFilter(created_date)\n\tand base_repo_id 
in ($repo_id)",
           "refId": "A",
           "select": [
             [
@@ -504,7 +504,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "SELECT\n  DATE_ADD(date(created_date), INTERVAL 
-DAYOFMONTH(date(created_date))+1 DAY) as time,\n  count(distinct case when 
status not in ('CLOSED', 'MERGED') then id else null end) as \"PR: Open\",\n  
count(distinct case when status in ('CLOSED', 'MERGED') and merged_date is null 
then id else null end) as \"PR: Closed without merging\",\n  count(distinct 
case when status in ('CLOSED', 'MERGED') and merged_date is not null then id 
else null end) as \"PR: Merged\"\nFR [...]
+          "rawSql": "SELECT\n  DATE_ADD(date(created_date), INTERVAL 
-DAYOFMONTH(date(created_date))+1 DAY) as time,\n  count(distinct case when 
status not in ('closed','merged') then id else null end) as \"PR: Open\",\n  
count(distinct case when status in ('closed', 'merged') and merged_date is null 
then id else null end) as \"PR: Closed without merging\",\n  count(distinct 
case when status in ('closed', 'merged') and merged_date is not null then id 
else null end) as \"PR: Merged\"\nFRO [...]
           "refId": "A",
           "select": [
             [
@@ -586,7 +586,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "select\n\tcount(*) as merged_pull_request_count\nfrom 
\n\tpull_requests pr\nwhere\n  $__timeFilter(created_date)\n\tand base_repo_id 
in ($repo_id)\n\tand pr.status in ('CLOSED', 'MERGED') and pr.merged_date is 
null",
+          "rawSql": "select\n\tcount(*) as merged_pull_request_count\nfrom 
\n\tpull_requests pr\nwhere\n  $__timeFilter(created_date)\n\tand base_repo_id 
in ($repo_id)\n\tand pr.status in ('closed', 'merged') and pr.merged_date is 
null",
           "refId": "A",
           "select": [
             [
@@ -693,7 +693,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "SELECT\n  DATE_ADD(date(created_date), INTERVAL 
-DAYOFMONTH(date(created_date))+1 DAY) as time,\n  count(distinct case when 
status in ('CLOSED', 'MERGED') and merged_date is null then id else null 
end)/count(distinct case when status in ('CLOSED', 'MERGED') and merged_date is 
not null then id else null end) as ratio\nFROM pull_requests\nWHERE\n  
$__timeFilter(created_date)\n  and base_repo_id in ($repo_id)\ngroup by 1\n",
+          "rawSql": "SELECT\n  DATE_ADD(date(created_date), INTERVAL 
-DAYOFMONTH(date(created_date))+1 DAY) as time,\n  count(distinct case when 
status in ('closed', 'merged') and merged_date is null then id else null 
end)/count(distinct case when status in ('closed', 'merged') and merged_date is 
not null then id else null end) as ratio\nFROM pull_requests\nWHERE\n  
$__timeFilter(created_date)\n  and base_repo_id in ($repo_id)\ngroup by 1\n",
           "refId": "A",
           "select": [
             [
@@ -952,7 +952,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": 
"select\n\tavg(TIMESTAMPDIFF(Minute,created_date,closed_date)/1440) as 
time_to_close\nfrom \n\tpull_requests\nwhere \n  
$__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\tand status in 
('CLOSED', 'MERGED')\n\n\n",
+          "rawSql": 
"select\n\tavg(TIMESTAMPDIFF(Minute,created_date,closed_date)/1440) as 
time_to_close\nfrom \n\tpull_requests\nwhere \n  
$__timeFilter(created_date)\n\tand base_repo_id in ($repo_id)\n\tand status in 
('closed', 'merged')\n\n\n",
           "refId": "A",
           "select": [
             [
@@ -1049,7 +1049,7 @@
           "hide": false,
           "metricColumn": "none",
           "rawQuery": true,
-          "rawSql": "with _prs as(\n  SELECT\n    DATE_ADD(date(created_date), 
INTERVAL -DAY(date(created_date))+1 DAY) as time,\n    
avg(TIMESTAMPDIFF(Minute,created_date,closed_date)/1440) as time_to_close\n  
FROM pull_requests\n  WHERE\n    $__timeFilter(created_date)\n    and 
base_repo_id in ($repo_id)\n    and status in ('CLOSED', 'MERGED')\n    and 
created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 
DAY), INTERVAL +1 MONTH)\n  group by 1\n)\n\nSELECT \n  [...]
+          "rawSql": "with _prs as(\n  SELECT\n    DATE_ADD(date(created_date), 
INTERVAL -DAY(date(created_date))+1 DAY) as time,\n    
avg(TIMESTAMPDIFF(Minute,created_date,closed_date)/1440) as time_to_close\n  
FROM pull_requests\n  WHERE\n    $__timeFilter(created_date)\n    and 
base_repo_id in ($repo_id)\n    and status in ('closed', 'merged')\n    and 
created_date >= DATE_ADD(DATE_ADD($__timeFrom(), INTERVAL -DAY($__timeFrom())+1 
DAY), INTERVAL +1 MONTH)\n  group by 1\n)\n\nSELECT \n  [...]
           "refId": "A",
           "select": [
             [
@@ -1143,5 +1143,5 @@
   "timezone": "",
   "title": "GitLab",
   "uid": "msSjEq97z",
-  "version": 11
+  "version": 10
 }
\ No newline at end of file

Reply via email to