Page MenuHomePhabricator

Allow check user to specify time range for Special:Investigate
Closed, ResolvedPublic2 Estimated Story PointsJun 16 2020

Description

Goal

We should allow check users to specify a time range for their investigations. This is in keeping with Special:CheckUser and allows them to focus their investigations, e.g. if there are too many results (following T245499, which imposes limits).

Mocks
Initial formDropdown
Screenshot 2020-03-03 at 10.30.56 AM.png (620×1 px, 61 KB)
Screenshot 2020-03-03 at 10.30.48 AM.png (626×1 px, 69 KB)
FiltersDropdown
Screenshot 2020-05-07 at 5.07.57 PM.png (586×1 px, 46 KB)
Screenshot 2020-05-07 at 5.08.04 PM.png (812×1 px, 70 KB)
Acceptance criteria:
  • Add an OOUI dropdown for Duration in the input form and in the Compare tab filters with the same options as currently in CheckUser:
    • All
    • Last week
    • Last 2 weeks
    • Last 30 days
  • When the user picks a time window, the results are generated for that time window only.
  • Default time period is All.
Notes:
  • Should we allow a user to change the investigation time period from the results (Preliminary check/Compare/Timeline) page or will they have to start a new investigation if they want to do that?
    • Not for now - maybe a follow up ticket.

Details

Event Timeline

@Prtksxna Adding this to your column. FYI in the current checkuser the Duration dropdown looks like:

image.png (368×884 px, 138 KB)

I don't think any users have requested a custom time range till now (@Niharika correct me if I am wrong). We might not need the added complexity of Two DateTimeInputWidgets. Let's keep the duration field with the normal OOUI dropdown:

Screenshot 2020-03-03 at 10.30.56 AM.png (620×1 px, 61 KB)
Screenshot 2020-03-03 at 10.30.48 AM.png (626×1 px, 69 KB)

@Prtksxna The need for this arose because results for investigations on a narrower time window would be faster to fetch. It would help add in the time option for cases when there are a lot of results so we can prompt the user to choose a shorter time window to get it to work faster.

Niharika updated the task description. (Show Details)

@Prtksxna Added a couple questions in the task description. Please take a look.

@Prtksxna The need for this arose because results for investigations on a narrower time window would be faster to fetch. It would help add in the time option for cases when there are a lot of results so we can prompt the user to choose a shorter time window to get it to work faster.

Yes, absolutely! I meant that I don't think anyone has yet asked for specific custom time ranges like from 3 Feb - 17 Feb, and thus Duration should be enough.

From the description:

What should the default time period be?

I think should go with the longest time period. Is the 90 day limit applicable to all wikis, or does the number change on any wiki? If it is the same we could make All (Last 90 days) the default selected option.

From the description:

Should we allow a user to change the investigation time period from the results (Preliminary check/Compare/Timeline) page or will they have to start a new investigation if they want to do that?

This will depend on:

  1. Whether or not we are showing the Investigate form on these pages
  2. If we are considering any changes to the form (not just duration) as a new investigation that is logged separately.

@Prtksxna In our estimation meeting @dbarratt brought up the point that this can be a filter alongside the other filters rather than be on the main form. What do you think about that?

Adding a time filter to the the compare and especially timeline views might makes sense, but I am not sure if that should replace it in the initial form. My understanding is that CheckUsers always want to retrieve and log the minimum amount of information required to run the investigation. If we only provide this as a filter it would still get logged as if they saw the entire 90 days.

@Prtksxna True, but we don't use the time limit for that purpose. The only reason we would use a shorter time limit in the current tool is if we run a check on an IP address or range, and get the error that there were more than 5000 edits within the 90 day window. (In fact, the current log doesn't even show what time limit we chose.)

@Prtksxna True, but we don't use the time limit for that purpose. The only reason we would use a shorter time limit in the current tool is if we run a check on an IP address or range, and get the error that there were more than 5000 edits within the 90 day window. (In fact, the current log doesn't even show what time limit we chose.)

Ah, thanks for that insight @ST47! I am going to think a bit more about this then.

@Prtksxna True, but we don't use the time limit for that purpose. The only reason we would use a shorter time limit in the current tool is if we run a check on an IP address or range, and get the error that there were more than 5000 edits within the 90 day window. (In fact, the current log doesn't even show what time limit we chose.)

This makes it clear that we don't need to add time or duration in the filters section and having it in the original form would suffice. Current acceptance criteria holds.

ARamirez_WMF set the point value for this task to 2.Apr 29 2020, 5:04 PM
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".

@Prtksxna based on the previous meetings, is the acceptance criteria still accurate?

@Prtksxna based on the previous meetings, is the acceptance criteria still accurate?

@dbarratt We estimated this for adding it in the input form alone. I will create a follow-up task to also expose it as a filter.

Scratch that. Prateek added the mocks here so I updated the task description to add the "Duration" as both a filter and in the input form.
We can check-in next week if we should update the estimate on this.

Niharika changed Due Date from May 12 2020, 4:00 AM to May 19 2020, 4:00 AM.May 7 2020, 3:32 PM
Niharika changed Due Date from May 19 2020, 4:00 AM to May 19 2020, 7:00 PM.

Change 596534 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/extensions/CheckUser@master] Add support for duration to Special:Investigate

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

ARamirez_WMF changed Due Date from May 19 2020, 7:00 PM to Jun 2 2020, 7:00 PM.May 21 2020, 3:13 AM

@Niharika @Prtksxna The current implementation allows a user to specify an arbitrary start time via the query string (e.g. 3 days). Is this something we want? If so, should we allow them to specify an arbitrary time via the form too?

@Niharika @Prtksxna The current implementation allows a user to specify an arbitrary start time via the query string (e.g. 3 days). Is this something we want? If so, should we allow them to specify an arbitrary time via the form too?

No, we want it to be a dropdown with the predefined options like in the current Checkuser. Is there a confusion with the acceptance criteria?

@Niharika @Prtksxna The current implementation allows a user to specify an arbitrary start time via the query string (e.g. 3 days). Is this something we want? If so, should we allow them to specify an arbitrary time via the form too?

Sorry, I think I misunderstood what you meant. By "query string" do you mean the URL? If so, that is fine. I don't see many users going to the trouble of doing that. They might get a timeout or something but it's on them then.

By "query string" do you mean the URL?

Yes, so it looks like the patch is working the way we want.

Sorry, I think I misunderstood what you meant. By "query string" do you mean the URL? If so, that is fine. I don't see many users going to the trouble of doing that. They might get a timeout or something but it's on them then.

@Niharika Actually there is something we're not sure about. The form reflects the user's filters - e.g. if the user has set the duration to "last week", then "last week" is selected in the form. However, if the user can filter arbitrarily via the URL, then what should be displayed in the form if the URL filter is not an option in the form? The current patch displays "All" if the URL filter is not on the list - e.g. if the URL filter is 3 days, the form will show "All". Is that acceptable?

Sorry, I think I misunderstood what you meant. By "query string" do you mean the URL? If so, that is fine. I don't see many users going to the trouble of doing that. They might get a timeout or something but it's on them then.

@Niharika Actually there is something we're not sure about. The form reflects the user's filters - e.g. if the user has set the duration to "last week", then "last week" is selected in the form. However, if the user can filter arbitrarily via the URL, then what should be displayed in the form if the URL filter is not an option in the form? The current patch displays "All" if the URL filter is not on the list - e.g. if the URL filter is 3 days, the form will show "All". Is that acceptable?

Yeah, I think that's fine. If the user is intentionally doing something odd that we aren't explicitly supporting, they should expect things to not be perfect. I expect very few users to actually be doing something like this.

@Niharika & @Prtksxna When the user specifies a duration on the intitial form, should the duration filter be applied to the results in the Timeline tab or not? If so, should there be an indication somewhere that it's being filtered? I added the form field to this page since that provided some indication of what was going on and also allowed the user to change the value. However this would also be the same value for the Compare tab, which based on T253327 may be confusing.

Another way to fix this problem is to remove the filter from the initial form and use this ticket to only add it on the Compare tab which makes it clear what is being filtered and how to change it.

@Niharika & @Prtksxna When the user specifies a duration on the intitial form, should the duration filter be applied to the results in the Timeline tab or not? If so, should there be an indication somewhere that it's being filtered?

Yes and yes. I've updated T253327 with details. Let me know if I've missed something!

ARamirez_WMF changed Due Date from Jun 2 2020, 7:00 PM to Jun 17 2020, 7:00 PM.Jun 9 2020, 3:28 PM
ARamirez_WMF changed Due Date from Jun 17 2020, 7:00 PM to Jun 16 2020, 7:00 PM.Jun 9 2020, 8:26 PM

Change 596534 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Add support for duration to Special:Investigate

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

dom_walden subscribed.
  • Add an OOUI dropdown for Duration in the input form and in the Compare tab filters with the same options as currently in CheckUser:

Yep.

  • When the user picks a time window, the results are generated for that time window only.

Extracting the SQL from the logs for the Timeline and Compare tabs, a condition of the form (cuc_timestamp >= '<time_interval>') is added to the query (or to each subquery in the case of Compare).

When I compare the output of these SQL queries to my own scripts, I get the same results.

  • Default time period is All.

Yep. All is preselected in the Special:Investigate form.

Notes:

  • Should we allow a user to change the investigation time period from the results (Preliminary check/Compare/Timeline) page or will they have to start a new investigation if they want to do that?

In the middle of an investigation, you can change the time range from the Filter form.