Page MenuHomePhabricator

A couple of Bugzilla SQL requests for Community Metrics
Closed, ResolvedPublic

Description

Author: qgil@wikimedia.org

Description:

Hi, I'm publishing a monthly report on Wikimedia tech community metrics
[1] and I want to start including some Bugzilla data. Most of it can be
retrieved by anybody through the web interface, but there are a couple
of exceptions:
* How many accounts created in the past month, and in the past 12 months.
https://bugzilla.wikimedia.org/editusers.cgi?action=list&matchvalue=login_name&matchstr=&matchtype=substr&groupid=6
can be run to know the total number of accounts. The monthly difference
could also be measured manually, but if there is a more straightforward
way to query...
* How many users have been active in the past month, and in the past 12
months.
A script exists at
http://wiki.meego.com/Metrics/Bugzilla_queries#BZ_active_users_last_month but
I haven't tested it, neither I have seen its results/.
If you have questions just ask me via email or at WMF SF 3rd floor.
Thank you!
[1] https://www.mediawiki.org/wiki/Community_metrics
--
Quim Gil
Technical Contributor Coordinator
Wikimedia Foundation

Refers To:
{T80752}
{T81903}

Referred To By:
{T81221}

Details

Reference
rt3962

Event Timeline

• rtimport raised the priority of this task from to Medium.Dec 18 2014, 1:25 AM
• rtimport added a project: ops-core.
• rtimport set Reference to rt3962.

As of today the number for the "how many were active" question would be:
"active this month" = 411
Per the script linked above. Had to change "${last_month}" to NOW() for it to
work though.
As to the "how many have been created". Unfortunately the "profiles" table does
not have any "date_created" action.
So we can just check for activity... and if a user is created without doing
anything we might not get that:
15:53 < simon_afk> There is the audit_logs table, but unfortunately that has
only existing in Bugzilla 4.2 and beyond.
15:53 < simon_afk> The only thing I can recommend is look at the oldest entry
in bugs_activity, attachments, bugs.creations_ts and longdescs
15:56 < mutante> it should be ok as long as the creation of a user itself is an
activity
15:57 < mutante> (but it may not be, after all it is not activity _on a bug_..
shrug)
...etc

Status changed from 'new' to 'open' by RT_System

<qgil at wikimedia> wrote:

Hi, that was a fast answer!
Do you mind sending the data on Friday afternoon = end of November?
Thank you.
On 11/26/2012 03:53 PM, Daniel Zahn via RT wrote:

As of today the number for the "how many were active" question would be:

"active this month" = 411

Per the script linked above. Had to change "${last_month}" to NOW() for it to
work though.

Is it still taking the number of users active in the past month, or "NOW"?

As to the "how many have been created". Unfortunately the "profiles" table does
not have any "date_created" action.

Ok, then we will simply take the total number of accounts on November,
the total on December and do the basic math.

So we can just check for activity... and if a user is created without doing
anything we might not get that:

Do you mean that we could get the amount of users created AND active in
the past month? That would be also useful, if it's not a pain.
--
Quim

On Tue Nov 27 23:06:55 2012, <qgil at wikimedia> "date_format(NOW(),'%Y%m')-1"

Do you mean that we could get the amount of users created AND active
in
the past month? That would be also useful, if it's not a pain.

I think we can get ONLY active users within a month but we don't really know
when they have been created, besides
if we keep the info from last month somewhere and "manually" compare with the
results of this month.

Reference by ticket #3172 added by dzahn

<qgil at wikimedia> wrote:

On 11/27/2012 03:17 PM, Daniel Zahn via RT wrote:

On Tue Nov 27 23:06:55 2012, <qgil at wikimedia> wrote:

Do you mind sending the data on Friday afternoon = end of November?
Thank you.

Sure, that was the plan. yes, no problem.

Ok. :)

Do you mean that we could get the amount of users created AND active
in
the past month? That would be also useful, if it's not a pain.

I think we can get ONLY active users within a month but we don't really know
when they have been created, besides
if we keep the info from last month somewhere and "manually" compare with the
results of this month.

Then I have enough with the number of active users in the past month,
thank you. We will see over time which other feasible data points are
useful.
Thank you again!
--
Quim

On Tue Nov 27 23:35:33 2012, <qgil at wikimedia> wrote:

On 11/27/2012 03:17 PM, Daniel Zahn via RT wrote:

On Tue Nov 27 23:06:55 2012, <qgil at wikimedia> wrote:

Do you mind sending the data on Friday afternoon = end of November?

The number of active users in November is now 441.
<root at db9:~# mysql bugzilla3 < /root/bugzilla-active-last-month>
count(distinct userid)
441

<root at db9:~# mysql bugzilla3 < /root/bugzilla-active-last-month>
count(distinct userid)
441

root@db9:~# date
Fri Nov 30 23:31:45 UTC 2012

file renamed to bugzilla-active-users-this-month.sql in /root/ on db9, because
this is what it does now, not "last" month. so run on last day of months. todo:
add to cron to mail this out automatically every last day of month.. via puppet

Queue changed from ops-requests to core-ops by lcarr

Reference to ticket #2577 added by dzahn

Reference to ticket #4173 added by dzahn

Bash script:
https://gerrit.wikimedia.org/r/#/c/39497/3/files/misc/bugzilla_community_metrics.sh
Puppet class:
https://gerrit.wikimedia.org/r/#/c/39497/3/manifests/misc/bugzilla.pp
applied on kaulen in site.pp

merged, applied on kaulen. works for me. This should now mail
<communitymetrics at wikimedia> every first of a month. That alias currently
just points to <qgil at wikimedia> and called class
misc::bugzilla::communitymetrics.

Status changed from 'open' to 'resolved' by dzahn

<qgil at wikimedia> wrote:

Hi, I'm on holidays until July 31 and then I'm flying to Hong Kong for
Wikimania on August 1-2. I'm checking email occasionally, but only
answering to
URGENT EMAILS WITH UPPER CASE SUBJECT
For really urgent matters you might want to consider contacting my
manager, Sumana Harihareswara -
http://www.mediawiki.org/wiki/User:Sharihareswara_(WMF)
--
Quim Gil
Technical Contributor Coordinator @ Wikimedia Foundation
http://www.mediawiki.org/wiki/User:Qgil

Status changed from 'resolved' to 'open' by RT_System

Status changed from 'open' to 'resolved' by dzahn

<www-data at muzilla> wrote:

Hi Community Metrics team,
this is your automatic monthly Bugzilla statistics mail.
The number of active users in Bugzilla in the last month (2013-11) was:
Yours sincerely,
Bugs Zilla
(via bugzilla_community_metrics.sh on muzilla at Sun Dec 1 00:00:01 UTC 2013)

Status changed from 'resolved' to 'open' by RT_System

Status changed from 'open' to 'resolved' by dzahn

<qgil at wikimedia> wrote:

On 12/02/2013 10:51 AM, Quim Gil wrote:

Note that there is no value provided...

Never mind. A previous email included "508". Thank you!

On 11/30/2013 04:00 PM, www-data via RT wrote:

Hi Community Metrics team,

this is your automatic monthly Bugzilla statistics mail.

The number of active users in Bugzilla in the last month (2013-11) was:

Yours sincerely,

Bugs Zilla

(via bugzilla_community_metrics.sh on muzilla at Sun Dec 1 00:00:01 UTC 2013)

--
Quim Gil
Technical Contributor Coordinator @ Wikimedia Foundation
http://www.mediawiki.org/wiki/User:Qgil

Status changed from 'resolved' to 'open' by RT_System

<qgil at wikimedia> wrote:

Note that there is no value provided...
On 11/30/2013 04:00 PM, www-data via RT wrote:

Hi Community Metrics team,

this is your automatic monthly Bugzilla statistics mail.

The number of active users in Bugzilla in the last month (2013-11) was:

Yours sincerely,

Bugs Zilla

(via bugzilla_community_metrics.sh on muzilla at Sun Dec 1 00:00:01 UTC 2013)

--
Quim Gil
Technical Contributor Coordinator @ Wikimedia Foundation
http://www.mediawiki.org/wiki/User:Qgil

On Mon, 2013-12-02 at 10:51 -0800, Quim Gil wrote:

Note that there is no value provided...

(via bugzilla_community_metrics.sh on muzilla at Sun Dec 1 00:00:01 UTC 2013)

Note that this email did not come from the production Bugzilla on kaulen
but from a test instance called "muzilla" on Labs, hence the confusion.
andre
--
Andre Klapper | Wikimedia Bugwrangler
http://blogs.gnome.org/aklapper/

<root at muzilla> wrote:

Hi Community Metrics team,
this is your automatic monthly Bugzilla statistics mail.
The number of active users in Bugzilla in the last month (2013-11) was:
Yours sincerely,
Bugs Zilla
(via bugzilla_community_metrics.sh on muzilla at Tue Dec 3 02:20:48 UTC 2013)

<www-data at muzilla> wrote:

Hi Community Metrics team,
this is your automatic monthly Bugzilla statistics mail.
The number of active users in Bugzilla in the last month (2013-11) was:
Yours sincerely,
Bugs Zilla
(via bugzilla_community_metrics.sh on muzilla at Wed Dec 4 00:00:01 UTC 2013)

<www-data at muzilla> wrote:

Hi Community Metrics team,
this is your automatic monthly Bugzilla statistics mail.
The number of active users in Bugzilla in the last month (2013-11) was:
Yours sincerely,
Bugs Zilla
(via bugzilla_community_metrics.sh on muzilla at Thu Dec 5 00:00:01 UTC 2013)

<www-data at muzilla> wrote:

Hi Community Metrics team,
this is your automatic monthly Bugzilla statistics mail.
The number of active users in Bugzilla in the last month (2013-11) was:
Yours sincerely,
Bugs Zilla
(via bugzilla_community_metrics.sh on muzilla at Fri Dec 6 00:00:01 UTC 2013)

<www-data at muzilla> wrote:

Hi Community Metrics team,
this is your automatic monthly Bugzilla statistics mail.
The number of active users in Bugzilla in the last month (2013-11) was:
Yours sincerely,
Bugs Zilla
(via bugzilla_community_metrics.sh on muzilla at Sat Dec 7 00:00:01 UTC 2013)

<www-data at muzilla> wrote:

Hi Community Metrics team,
this is your automatic monthly Bugzilla statistics mail.
The number of active users in Bugzilla in the last month (2013-11) was:
Yours sincerely,
Bugs Zilla
(via bugzilla_community_metrics.sh on muzilla at Sun Dec 8 00:00:01 UTC 2013)

Requestor <qgil at wikimedia> deleted by dzahn

Cc aklapper deleted by dzahn

AdminCc aklapper added by dzahn

Andre, same here, after recent fixes to the puppet class for this and the mail
command, they should just work fine again. Though, i have not changed the
recipient back to community metrics yet. doing so now.

https://gerrit.wikimedia.org/r/#/c/109646/

Status changed from 'open' to 'resolved' by dzahn

Dzahn changed the visibility from "WMF-NDA (Project)" to "Public (No Login Required)".Jun 13 2017, 2:29 AM
Dzahn changed the edit policy from "WMF-NDA (Project)" to "All Users".