Make rc_patrolled 3-state instead of 2-state to distinguish autopatrolled edits
Open, NormalPublic

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.

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.Wed, Jan 31, 12:44 PM
Krinkle triaged this task as Normal priority.Wed, Feb 21, 9:15 PM