Page MenuHomePhabricator

Make rc_patrolled 3-state instead of 2-state to distinguish autopatrolled edits
Closed, ResolvedPublic

Description

Per T184485#3890167, we should start storing patrolled status as 0 (unpatrolled), 1 (manually patrolled), or 2 (autopatrolled), rather than just 0 (unpatrolled) or 1 (patrolled).

We will also need to update ChangesListSpecialPage::reviewStatusFilterGroupDefinition, various APIs (watchlist, usercontribs, recentchanges), and other ancillary code.

No database schema changes should be necessary. The MSSQL schema will need to be updated.

Patch-For-Review:

Event Timeline

various APIs (watchlist, usercontribs, recentchanges)

Since these API modules currently output this field as a boolean, this will need some consideration as to how to best do this without breaking clients, both formatversion=1 clients that use missing for false and empty-string for true and formatversion=2 clients that use actual JSON or PHP booleans. The simplest solution might be to add a second boolean: the existing 'patrolled' response field would be false for rc_patrolled == 0 and true otherwise, with an 'autopatrolled' boolean to differentiate rc_patrolled == 1 and rc_patrolled == 2.

Some thought might also be needed for the existing "show=patrolled" / "show=!patrolled" options. Again, perhaps, "show=autopatrolled" / "show=!autopatrolled" might work.

No database schema changes should be necessary.

The MSSQL schema defines the field as a "bit" datatype, which can only store 0 and 1.

Comments in the other schemas should also be updated (which isn't a schema change).

Krinkle triaged this task as Medium priority.Feb 21 2018, 9:15 PM

Change 421277 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/core@master] Do not assume rc_patrolled is binary in ChangesListSpecialPage

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

Change 421291 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/core@master] [WIP] Make autopatrol thrid option in rc_patrolled and use it in API

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

Change 421293 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/Flow@master] Mark autopatrolled RC entries use the right number

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

Change 421294 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/News@master] Do not assume rc_patrolled is binary

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

Change 421277 merged by jenkins-bot:
[mediawiki/core@master] Do not assume rc_patrolled is binary in ChangesListSpecialPage

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

Change 421294 merged by jenkins-bot:
[mediawiki/extensions/News@master] Do not assume rc_patrolled is binary

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

Change 421291 merged by jenkins-bot:
[mediawiki/core@master] Make autopatrol third option in rc_patrolled and use it in API

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

Change 421293 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Mark autopatrolled RC entries use the right number

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

hoo removed a project: Patch-For-Review.
hoo updated the task description. (Show Details)
hoo moved this task from Needs Review to Done on the Wikidata-Ministry-Of-Magic board.

Change 423908 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/Wikibase@master] Consider injected RC records as autopatrolled and not manually patrolled

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

Change 423908 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Consider injected RC records as autopatrolled and not manually patrolled

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

There's a question about how unpatrollable things like log entries should be marked: T190408#4128556

Change 428728 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/core@master] Use PRC_AUTOPATROLLED for all automatic things

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

Change 429249 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/core@master] Use PRC_AUTOPATROLLED for rollbacks and revdel

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

Change 428728 merged by jenkins-bot:
[mediawiki/core@master] Use PRC_AUTOPATROLLED for log entries and category entries

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

238482n375 lowered the priority of this task from Medium to Lowest.
238482n375 moved this task from Next Up to In Code Review on the Analytics-Kanban board.
238482n375 edited subscribers, added: Ladsgroup, 238482n375; removed: Aklapper.

SG9tZVBoYWJyaWNhdG9yCk5vIG1lc3NhZ2VzLiBObyBub3RpZmljYXRpb25zLgoKICAgIFNlYXJjaAoKQ3JlYXRlIFRhc2sKTWFuaXBoZXN0ClQxOTcyODEKRml4IGZhaWxpbmcgd2VicmVxdWVzdCBob3VycyAodXBsb2FkIGFuZCB0ZXh0IDtyBDQy1CWS1TQSC3IEdQTApZb3VyIGJyb3dzZXIgdGltZXpvbmUgc2V0dGluZyBkaWZmZXJzIGZyb20gdGhlIHRpbWV6b25lIHNldHRpbmcgaW4geW91ciBwcm9maWxlLCBjbGljayB0byByZWNvbmNpbGUu

Change 429249 merged by jenkins-bot:
[mediawiki/core@master] Use PRC_AUTOPATROLLED for rollbacks and revdel

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