Aklapper has uploaded a new change for review.

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

Change subject: Also list parent project for (sub)project creations and name 
changes
......................................................................

Also list parent project for (sub)project creations and name changes

The current output provides raw names which is not too helpful,
seeing names such as "doing" or "done" being used for milestone
projects. Furthermore, milestones are not include when using Phab's
project search, hence it's been nearly impossible to locate them to
perform potential naming corrections.

Change-Id: I1dbc554ff366c8b4da818beacd3fadcecb764261
---
M modules/phabricator/templates/project_changes.sh.erb
1 file changed, 13 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/317321/1

diff --git a/modules/phabricator/templates/project_changes.sh.erb 
b/modules/phabricator/templates/project_changes.sh.erb
index ae58475..e6fdc33 100644
--- a/modules/phabricator/templates/project_changes.sh.erb
+++ b/modules/phabricator/templates/project_changes.sh.erb
@@ -15,12 +15,20 @@
 #echo "result_creations_and_name_changes"
 result_creations_and_name_changes=$(MYSQL_PWD=${sql_pass} /usr/bin/mysql -h 
$sql_host -u $sql_user $sql_name << END
 
-SELECT project_transaction.oldValue, project_transaction.newValue, 
user.userName
-    FROM project_transaction
+SELECT project_transaction1.oldValue, project_transaction1.newValue, 
parent.name AS parentProject, user.userName
+    FROM project_transaction project_transaction1
+    LEFT OUTER JOIN
+        (SELECT project.name, project_transaction2.objectPHID, 
project_transaction2.transactionType
+        FROM project_transaction AS project_transaction2
+        JOIN project
+        WHERE project_transaction2.transactionType = "project:parent"
+        AND SUBSTRING(project_transaction2.newValue, 2,30) = project.phid
+        AND project_transaction2.dateModified > UNIX_TIMESTAMP(DATE_SUB(NOW(), 
INTERVAL 1 WEEK))) parent
+        ON parent.objectPHID = project_transaction1.objectPHID
     JOIN phabricator_user.user
-    WHERE project_transaction.transactionType = "project:name"
-    AND project_transaction.authorPHID = user.phid
-    AND project_transaction.dateModified > UNIX_TIMESTAMP(DATE_SUB(NOW(), 
INTERVAL 1 WEEK));
+    WHERE project_transaction1.transactionType = "project:name"
+    AND project_transaction1.authorPHID = user.phid
+    AND project_transaction1.dateModified > UNIX_TIMESTAMP(DATE_SUB(NOW(), 
INTERVAL 1 WEEK));
 
 END
 )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dbc554ff366c8b4da818beacd3fadcecb764261
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aklapper <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to