Page MenuHomePhabricator

Fix those slightly incorrect numbers in "Phabricator monthly statistics" email
Closed, InvalidPublic

Description says
"TODO: Numbers which refer to closed tasks might not be correct, as described in T1003."

Now that I've played a bit more with Phab's database, let's see if that is fixable in operations/puppet/modules/phabricator/templates/

Event Timeline

Aklapper claimed this task.
Aklapper raised the priority of this task from to Low.
Aklapper updated the task description. (Show Details)
Aklapper subscribed.

Changing the status of a task does not create an entry in phabricator_maniphest.edge (because statuses are simply a part of a task and not any other entity like an account or project) but just updates phabricator_maniphest.maniphest_task.status and phabricator_maniphest.maniphest_task.dateModified.

So SELECT COUNT(id) FROM maniphest_task WHERE (status="duplicate" OR status="resolved" ...) AND FROM_UNIXTIME(maniphest_transaction.dateModified,'%Y%m')=date_format(NOW() - INTERVAL 1 MONTH,'%Y%m'); would not work either because dateModified can refer to any action, not just the status change (e.g. also to a change of the task title after the task got already closed).

Looks like we really need to query the huge transaction log, like we currently do. Meh.

Aklapper removed a project: ECT-March-2015.
Aklapper set Security to None.

The Phabricator monthly statistics emails on wikitech-l still say

TODO: Numbers which refer to closed tasks might not be correct, as
described in .

Is this still relevant? As there hasn't been any discussion at that task (or here) for a very long time, it might be nice to update that message to something more relevant.

In T91406#2681509, @TTO wrote:

Is this still relevant?

Yes, until someone comes up with a way more complex but also more exact query. :)

Fair enough :)

Could I suggest to update the text at the bottom of the email with something more accurate then? The link to T1007 is more confusing than anything else.

Okay but what else to write? Or link? T91406 ? :P