Page MenuHomePhabricator

Support multiple values for the tagfilter parameter in the ChangesList backend
Closed, ResolvedPublic1 Estimated Story Points

Description

Currently the tagfilter query string parameter only accepts one value, but for T161650: Replace "Tag filter" input with a dropdown+lookup widget in RCFilters we need it to accept multiple values. This should be an OR of tags (not an AND).

Related Objects

Event Timeline

Change 351363 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/core@master] RC Filters: Support multiple tag filters

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

Change 351363 merged by jenkins-bot:
[mediawiki/core@master] RC Filters: Support multiple tag filters

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

Change 352542 had a related patch set uploaded (by Mattflaschen; owner: Mattflaschen):
[mediawiki/core@master] Change delimiter for multiple namespaces and tags to semi-colon

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

Change 352733 had a related patch set uploaded (by Mattflaschen; owner: Mattflaschen):
[mediawiki/extensions/AbuseFilter@master] Check tags with ChangeTags::canCreateTag

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

@SBisson noted that I should check into existing tags using semi-colon. I wrote a quick script to check (P5403). It turns out there are a small number of existing tags using semi-colon (2), slash (15) (another character that is already forbidden), or both:

P5401:

mrwiki:  'कोण म्हणते/समजते/मानते,कसे उमजते ?; संदर्भ आहेत ना ? ' contains ';'
outreachwiki:  'pattern bot; redundant' contains ';'

The mrwiki has 1 change and the outreachwiki has 0. Both are also disabled. (See https://mr.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:%E0%A4%96%E0%A5%82%E0%A4%A3%E0%A4%BE?uselang=en and https://outreach.wikimedia.org/wiki/Special:Tags).

I confirmed (via AbuseFilterHooks::onListDefinedTags) that both of the semi-colon ones are from AbuseFilter.

I changed AbuseFilter https://gerrit.wikimedia.org/r/352733 to enforce these rules on tag names.

I don't think we have to worry about the existing ones, because they're disabled, and if they try to enable them, they'll have to change the tag name (the check runs on all edits as well).

P5402:

bgwiki:  'етикет: премахнати източници/бележки' contains '/'
enwikibooks:  'newbie external link/email' contains '/'
frwikinews:  'PU/PdD créée par un compte non titulaire' contains '/'
huwiki:  'Анна Озерова/Anna Jarvinen' contains '/'
mediawikiwiki:  'newbie external link/email' contains '/'
mrwiki:  'कोण म्हणते/समजते/मानते,कसे उमजते ?; संदर्भ आहेत ना ? ' contains '/'
rowiki:  'modificare legătură imagine și/sau descriere' contains '/'
scowiki:  'Changin hicht/wicht in an infobox' contains '/'
sgwiki:  'newbie external link/email' contains '/'
simplewiki:  'copy/paste from another Wikipedia?' contains '/'
skwiki:  'emotikony/ideogramy' contains '/'
testwiki:  'Edit Adding/Removing Only Numbers' contains '/'
thwiki:  'แก้ไขผิดปกติ FA/GA' contains '/'
urwiki:  'اضافہ مواد نقل شدہ از کتاب/ویب سائٹ' contains '/'
wikidatawiki:  'adding potentially mistaken label/description/alias' contains '/'

I think many/all of the slash ones are also from AbuseFilter, but I didn't need to check that.

Change 352733 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Check tags with ChangeTags::canCreateTag

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

But I guess it would break this one case when we try to do Special:Contributions.

As a result, I decided to use pipe. That one is clean: P5405 .

Change 352542 merged by jenkins-bot:
[mediawiki/core@master] Change delimiter for multiple namespaces and tags

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

Checked in enwiki betalabs - tags are accepted with pipe, e.g. &tagfilter=visualeditor%7Cmobile+edit%7Cvisualeditor-switched.

The result set is filtered according to the selected tags.