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
- CommentStore::COMMENT_CHARACTER_LIMIT is used by several other pages to define a limit for a summary or reason field, such as the edit summary and other fields (https://codesearch.wmcloud.org/search/?q=CommentStore%3A%3ACOMMENT_CHARACTER_LIMIT&files=&excludeFiles=&repos=)
- 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