Page MenuHomePhabricator

Sort results by cuc_ip_hex in Special:Investigate
Closed, ResolvedPublic

Description

In the 'IPs and User agents' tab, the results are grouped and sorted by cuc_user_text, cuc_ip, cuc_agent. The use of cuc_ip leads to incorrect sorting:

We should instead use cuc_ip_hex.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 12 2020, 8:51 PM
Tchanders updated the task description. (Show Details)Jun 12 2020, 8:52 PM

Change 605318 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/CheckUser@master] Sort Special:Investigate results by cuc_ip_hex instead of cuc_ip

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

Huji added a subscriber: Huji.Jun 12 2020, 10:05 PM

I generally try to stay away from CU 2.0 tasks but I want to point out that some of the development on it, including this task, may conflict with T233004

Tchanders added subscribers: dmaza, dbarratt.

Thanks @Huji, that's helpful to know.

@dmaza @dbarratt I don't think T233004 should affect this task, but we might need to update our queries at some point, including the one that this task touches.

Change 605318 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Sort Special:Investigate results by cuc_ip_hex instead of cuc_ip

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

dom_walden added a subscriber: dom_walden.

I created some test data on my local vagrant (MediaWiki 1.35.0-alpha (c0a0483)).

  • Every IP in the range 192.168.121.0/24
  • A sample of IPs from the range 192.168.0.0/16.
  • Random IPv6 address from lots of different ranges.

I checked the sorting for the initial sorting order, and after clicking the header to sort ascending and descending.

(For IPv6 I only checked initial sorting order, as the asc/desc will be fixed in T255694.)

They all appear in the correct order (i.e. numerical order).

Example of the now correct initial sorting (compare to the screenshot in the description):

Example from IPv6. 2001:df0:8b:6a1:225c:3a92:cacd:b6c3 now correctly comes before 2001:df0:8b:5c4d:9f4e:741d:ebc8:f374, because the former is implicitly 2001:df0:8b:06a1:225c:3a92:cacd:b6c3:

Niharika closed this task as Resolved.Jul 27 2020, 6:09 PM