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:

kaldari created this task.Jan 12 2018, 10:54 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 12 2018, 10:54 AM
Krinkle added a project: MediaWiki-API.
Krinkle moved this task from Unsorted to Needs Code on the MediaWiki-API board.
Anomie added a subscriber: Anomie.Jan 16 2018, 3:18 PM

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).

Nirmos added a subscriber: Nirmos.Jan 31 2018, 12:44 PM
Krinkle triaged this task as Normal priority.Feb 21 2018, 9:15 PM
kaldari updated the task description. (Show Details)Mar 5 2018, 11:24 PM
Ladsgroup moved this task from Tasks to In Progress on the Wikidata-Ministry-Of-Magic board.
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptMar 22 2018, 12:52 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

hoo updated the task description. (Show Details)Mar 28 2018, 12:55 PM

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 closed this task as Resolved.Apr 3 2018, 5:25 PM
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 Normal to Lowest.Jun 15 2018, 8:03 AM
238482n375 removed Ladsgroup as the assignee of this task.
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