Page MenuHomePhabricator

AbuseFilter list not sorted correctly when ordered by Status
Open, Needs TriagePublic

Description

Steps to reproduce:

  • Go to Special:AbuseFilter.
  • Select "Include deleted filters" and update search.
  • Click status in the table header to order it by status.

While all enabled filters are together, disabled and deleted ones are mixed.

(screenshot link)

Details

Related Gerrit Patches:
mediawiki/extensions/AbuseFilter : masterUse af_deleted as secondary sorting for af_enabled

Event Timeline

Restricted Application added subscribers: Scoopfinder, Aklapper. · View Herald TranscriptApr 7 2018, 12:48 PM
Daimona added a subscriber: Daimona.EditedApr 7 2018, 1:22 PM

Confirmed. The reason is pretty simple to explain: the 'status' column puts together af_enabled and af_deleted, which are completely separated in the DB. The sorting is performed on af_enabled, which of course doesn't take into account af_deleted. The solution might be to add a condition to ORDER BY so that the two values are handled separately, but this requires overriding something from parent (TablePager/IndexPager). I'll give it a look.

Change 445932 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Use af_deleted as secondary sorting for af_enabled

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

Daimona claimed this task.Jul 15 2018, 11:58 PM

Change 445932 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Use af_deleted as secondary sorting for af_enabled

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

Hm, apparently the results aren't mixed anymore. However, some results are missing -- specifically, if I click "next page" on the first page I go straight to the last page. The weird thing is, apparently it was already broken without the patches above.

Daimona moved this task from Backlog to Nextish on the User-Daimona board.