Page MenuHomePhabricator

Standardise the Special:CheckUser and Special:Investigate reason limit
Closed, ResolvedPublic

Description

Summary

Special:CheckUser has a limit for the reason field at 150 characters and Special:Investigate does not have any limit. These should be standardised to the maximum comment length

Background

  • For T405653: Suggested investigations: Prefill the reason for a check for links to Special:CheckUser and Special:Investigate, we want the prefilled Special:CheckUser and Special:Investigate links to also contain a prefilled reason
    • This prefilled reason needs to contain a link to the suggested investigations case, which means that the overall length of the reason will usually be over ~100 characters and may exceed 150 characters (even though the around half of that is the link to the case which is not shown in Special:CheckUserLog)
  • The Special:CheckUser page has a limit of 150 characters for the reason and the Special:Investigate page has no limit
    • We should apply a consistent limit between these pages
  • We can choose the maximum number of UTF-8 characters that can be stored in the "comment" table as defined by CommentStore::COMMENT_CHARACTER_LIMIT
  • If we increase the limit on Special:CheckUser to CommentStore::COMMENT_CHARACTER_LIMIT, then we can be sure that the prefilled link will never be too long and will also leave extra space for the user to append to the prefilled reason before running their check

Acceptance criteria

  • The maximum length for the "reason" field on both Special:CheckUser and Special:Investigate is set as the value of CommentStore::COMMENT_CHARACTER_LIMIT

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1207210 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Set max limit for CheckUser reason field at comment store limit

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

Change #1207210 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Set max limit for CheckUser reason field at comment store limit

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