Page MenuHomePhabricator

Monthly metrics email: "Projects which had at least one task moved from one column to another on their workboard" is 0
Closed, ResolvedPublic

Description

The last Phabricator statistics mail read:

From: communitymetrics@wikimedia.org
Subject: Phabricator monthly statistics - 2016-05
Newsgroups: gmane.science.linguistics.wikipedia.technical
To: wikitech-l@lists.wikimedia.org
Date: Wed, 01 Jun 2016 00:00:10 +0000 (2 hours, 49 minutes ago)
Reply-To: Wikimedia developers <wikitech-l@lists.wikimedia.org>


Hi Community Metrics team,

This is your automatic monthly Phabricator statistics mail.

[…]

Projects which had at least one task moved from one column to another on
their workboard in (2016-05): 0

[…]

This looks wrong to me.

Event Timeline

Aklapper triaged this task as Medium priority.

Thanks for catching this.

The old query was:

[phabricator_maniphest]> SELECT COUNT(DISTINCT (edge.dst)) FROM edge INNER JOIN maniphest_transaction WHERE FROM_UNIXTIME(maniphest_transaction.dateModified,'%Y%m')=date_format(NOW() - INTERVAL 1 MONTH,'%Y%m') AND maniphest_transaction.transactionType = "projectcolumn" AND edge.type = 41 AND edge.src = maniphest_transaction.objectPHID AND edge.dst = SUBSTR(maniphest_transaction.newValue, INSTR(maniphest_transaction.newValue, 'projectPHID')+14, 30);

maniphest_transaction.transactionType = "projectcolumn" seems to have been renamed to maniphest_transaction.transactionType = "core:columns", and
SUBSTR(maniphest_transaction.newValue, INSTR(maniphest_transaction.newValue, 'projectPHID')+14, 30)
does not work as that prefix has changed, should be something like
SUBSTR(maniphest_transaction.newValue, INSTR(maniphest_transaction.newValue, 'PHID-PROJ-'), 30)
but there's more that seems to have changed. :(

Change 292149 had a related patch set uploaded (by Aklapper):
Adjust "monthly Phab community metrics" SQL query to upstream changes

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

Aklapper renamed this task from "Projects which had at least one task moved from one column to another on their workboard" is 0 to Monthly metrics email: "Projects which had at least one task moved from one column to another on their workboard" is 0.Jun 1 2016, 2:57 PM

Change 292149 merged by Dzahn:
Adjust "monthly Phab community metrics" SQL query to upstream changes

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

Dzahn subscribed.

Merged, ran puppet on iridium, ran script manually without sending mail. it now says:

Projects which had at least one task moved from one column to another on
their workboard in (2016-05): 247