[MediaWiki-commits] [Gerrit] Weekly Phabricator email: List archived projects with open t... - change (operations/puppet)

2016-05-31 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Weekly Phabricator email: List archived projects with open tasks
..


Weekly Phabricator email: List archived projects with open tasks

Bug: T133649
Change-Id: Ic2b23d843d08c0f2e8329fb36f1ea6a7447e17f5
---
M modules/phabricator/templates/project_changes.sh.erb
1 file changed, 36 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/phabricator/templates/project_changes.sh.erb 
b/modules/phabricator/templates/project_changes.sh.erb
index dfa2d04..8e1791f 100644
--- a/modules/phabricator/templates/project_changes.sh.erb
+++ b/modules/phabricator/templates/project_changes.sh.erb
@@ -72,6 +72,38 @@
 END
 )
 
+#echo "result_archived_projects_open_tasks"
+# see https://phabricator.wikimedia.org/T133649
+result_archived_projects_open_tasks=$(MYSQL_PWD=${sql_pass} /usr/bin/mysql -h 
$sql_host -u$sql_user $sql_name << END
+
+SELECT p.name, count(p.name) AS n
+FROM phabricator_maniphest.edge edg
+JOIN phabricator_maniphest.maniphest_task t
+JOIN phabricator_project.project p
+WHERE edg.dst LIKE 'PHID-PROJ-%'
+AND edg.src LIKE 'PHID-TASK-%'
+AND p.phid = edg.dst
+AND p.status = 100
+AND t.phid = edg.src
+AND (t.status = "open" OR t.status = "stalled")
+AND edg.src NOT IN
+(SELECT edg2.src
+FROM phabricator_maniphest.edge edg2
+JOIN phabricator_maniphest.maniphest_task t2
+JOIN phabricator_project.project p2
+WHERE edg2.dst LIKE 'PHID-PROJ-%'
+AND edg2.src LIKE 'PHID-TASK-%'
+AND edg2.dst != "PHID-PROJ-onnxucoedheq3jevknyr"
+AND p2.phid = edg2.dst
+AND p2.status = 0
+AND t2.phid = edg2.src
+AND (t2.status = "open" OR t2.status = "stalled"))
+GROUP BY p.name
+ORDER BY n DESC;
+
+END
+)
+
 #echo "result_single_workboard_column"
 # see https://phabricator.wikimedia.org/T105865
 result_single_workboard_column=$(MYSQL_PWD=${sql_pass} /usr/bin/mysql -h 
$sql_host -u$sql_user $sql_name << END
@@ -112,6 +144,10 @@
 ${result_column_changes}
 
 
+ARCHIVED PROJECTS WITH OPEN TASKS:
+${result_archived_projects_open_tasks}
+
+
 PROJECT WORKBOARDS WITH A SINGLE COLUMN ONLY:
 ${result_single_workboard_column}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/291781
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2b23d843d08c0f2e8329fb36f1ea6a7447e17f5
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aklapper 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Weekly Phabricator email: List archived projects with open t... - change (operations/puppet)

2016-05-30 Thread Aklapper (Code Review)
Aklapper has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/291781

Change subject: Weekly Phabricator email: List archived projects with open tasks
..

Weekly Phabricator email: List archived projects with open tasks

Bug: T133649
Change-Id: Ic2b23d843d08c0f2e8329fb36f1ea6a7447e17f5
---
M modules/phabricator/templates/project_changes.sh.erb
1 file changed, 36 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/291781/1

diff --git a/modules/phabricator/templates/project_changes.sh.erb 
b/modules/phabricator/templates/project_changes.sh.erb
index a60e402..e08fc1b 100644
--- a/modules/phabricator/templates/project_changes.sh.erb
+++ b/modules/phabricator/templates/project_changes.sh.erb
@@ -73,6 +73,38 @@
 END
 )
 
+#echo "result_archived_projects_open_tasks"
+# see https://phabricator.wikimedia.org/T133649
+result_archived_projects_open_tasks=$(MYSQL_PWD=${sql_pass} /usr/bin/mysql -h 
$sql_host -u$sql_user $sql_name << END
+
+SELECT p.name, count(p.name) AS n
+FROM phabricator_maniphest.edge edg
+JOIN phabricator_maniphest.maniphest_task t
+JOIN phabricator_project.project p
+WHERE edg.dst LIKE 'PHID-PROJ-%'
+AND edg.src LIKE 'PHID-TASK-%'
+AND p.phid = edg.dst
+AND p.status = 100
+AND t.phid = edg.src
+AND (t.status = "open" OR t.status = "stalled")
+AND edg.src NOT IN
+(SELECT edg2.src
+FROM phabricator_maniphest.edge edg2
+JOIN phabricator_maniphest.maniphest_task t2
+JOIN phabricator_project.project p2
+WHERE edg2.dst LIKE 'PHID-PROJ-%'
+AND edg2.src LIKE 'PHID-TASK-%'
+AND edg2.dst != "PHID-PROJ-onnxucoedheq3jevknyr"
+AND p2.phid = edg2.dst
+AND p2.status = 0
+AND t2.phid = edg2.src
+AND (t2.status = "open" OR t2.status = "stalled"))
+GROUP BY p.name
+ORDER BY n DESC;
+
+END
+)
+
 #echo "result_single_workboard_column"
 # see https://phabricator.wikimedia.org/T105865
 result_single_workboard_column=$(MYSQL_PWD=${sql_pass} /usr/bin/mysql -h 
$sql_host -u$sql_user $sql_name << END
@@ -113,6 +145,10 @@
 ${result_column_changes}
 
 
+ARCHIVED PROJECTS WITH OPEN TASKS:
+${result_archived_projects_open_tasks}
+
+
 PROJECT WORKBOARDS WITH A SINGLE COLUMN ONLY:
 ${result_single_workboard_column}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/291781
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2b23d843d08c0f2e8329fb36f1ea6a7447e17f5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aklapper 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits