Last modified: 2014-02-28 13:16:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62012, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60012 - BetaFeatures: Show a count of users who have enabled and then disabled a given Beta Feature
BetaFeatures: Show a count of users who have enabled and then disabled a give...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
BetaFeatures (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: schema-change
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-13 19:39 UTC by Jared Zimmerman (WMF)
Modified: 2014-02-28 13:16 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jared Zimmerman (WMF) 2014-01-13 19:39:03 UTC
5,169 users have enabled this feature. <-- current

5,169 users have enabled this feature.<-- proposed
7,830 users have tried this feature. 


Allow users to see how many users total have tried out a beta feature (turned on, then disabled.)
Comment 1 Mark Holmquist 2014-01-13 19:42:48 UTC
We do not currently have these numbers, will require a schema change.
Comment 2 Mark Holmquist 2014-01-13 19:43:49 UTC
For more detail: Add a column to the user counts table and just add one to it whenever someone enables a feature. No other computation necessary.

You should probably have a conditional SQL statement that sets the initial value to the current value of the people who have it enabled.
Comment 3 Jared Zimmerman (WMF) 2014-01-13 19:44:59 UTC
If the same user enabled and disabled over and over we'd want this not to affect the "tried" value
Comment 4 Mark Holmquist 2014-01-14 00:30:36 UTC
Agh.

OK, in that case we may need a separate table. I don't like that option, though...updating a different set of counts with yet another job sounds like it would be nasty.

I'll +1 that change but I'll want review from someone more tied into performance etc.
Comment 5 Kunal Mehta (Legoktm) 2014-01-15 02:05:26 UTC
Any way we do this, a schema change is needed.

My idea: set a "sticky" preference when a user enables a beta feature ("$key-set"), but don't remove it when the user changes the option. Then we just count the number of people with that set and store it in another column in the table.

We'd also need a maintenance script to set all the rows for people who currently have a BF turned on (can't get data for people who already turned it off).
Comment 6 James Forrester 2014-01-15 17:57:13 UTC
(In reply to comment #5)
> We'd also need a maintenance script to set all the rows for people who
> currently have a BF turned on (can't get data for people who already turned
> it off).

We could probably retrieve the information from the preference changes EventLogging system if we wanted to…
Comment 7 Andre Saboia 2014-02-28 08:47:33 UTC
(In reply to Kunal Mehta (Legoktm) from comment #5)
> My idea: set a "sticky" preference when a user enables a beta feature
> ("$key-set"), but don't remove it when the user changes the option. Then we
> just count the number of people with that set and store it in another column
> in the table.

When a user enables a beta feature, this feature is added on the 'user_properties' table, but when the user disable that feature, it is not removed from the table, just change its value (up_value) from 1 to 0.. which means that all we have to do is the same we do to count enabled features.
Instead of 'where up_value=1' should use 'where up_value=0' on the select command, but I'm not sure if there is a way to take this two values(enabled, disabled) in one select command(with maybe a join) or another way..

> We'd also need a maintenance script to set all the rows for people who
> currently have a BF turned on (can't get data for people who already turned
> it off).
this mean we 'can get data for people who already turned it off'...
Comment 8 Andre Saboia 2014-02-28 08:57:52 UTC
can I work on this?
Comment 9 Andre Klapper 2014-02-28 10:41:45 UTC
Of course - no need to ask. :) 
Sharing an early patch on Gerrit for review is welcome!
Comment 10 Bartosz Dziewoński 2014-02-28 13:00:48 UTC
(In reply to Andre Saboia from comment #7)
> (In reply to Kunal Mehta (Legoktm) from comment #5)
> > My idea: set a "sticky" preference when a user enables a beta feature
> > ("$key-set"), but don't remove it when the user changes the option. Then we
> > just count the number of people with that set and store it in another column
> > in the table.
> 
> When a user enables a beta feature, this feature is added on the
> 'user_properties' table, but when the user disable that feature, it is not
> removed from the table, just change its value (up_value) from 1 to 0.. which
> means that all we have to do is the same we do to count enabled features.
> Instead of 'where up_value=1' should use 'where up_value=0' on the select
> command, but I'm not sure if there is a way to take this two values(enabled,
> disabled) in one select command(with maybe a join) or another way..

Are you sure that's true? MediaWiki rather aggressively removes unnecessary data from this table, including preference values that are identical to defaults.
Comment 11 Andre Saboia 2014-02-28 13:16:41 UTC
(In reply to Bartosz Dziewoński from comment #10)
> Are you sure that's true? MediaWiki rather aggressively removes unnecessary
> data from this table, including preference values that are identical to
> defaults.

yeah, now I see.. I'm not sure.. I think, for some reason, this was happening only with the multimedia-viewer extension.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links