Page MenuHomePhorge

Restrict maximum task title length to 255 characters
ClosedPublic

Authored by aklapper on Aug 1 2024, 14:56.

Details

Summary

A task title is supposed to summarize a task. For long novels, there is the task description.

Closes T15898

Test Plan

Go to http://phorge.localhost/maniphest/task/edit/form/default/ and enter a task title with multi-byte characters above the threshold, press "Enter".

Diff Detail

Repository
rP Phorge
Branch
T15898taskTitleLength
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1492
Build 1492: arc lint + arc unit

Event Timeline

aklapper requested review of this revision.Aug 1 2024, 14:56

Correct off-by-one error :P

Seems super-reasonable. Please save that 255 in a variable and re-use in pht("Bla bla %d bla", $title_max_length) or similar, so it's easier to customize without invalidating translations

Edited: also please show to the end user the same number, using some semantic pirouettes

Move max task title length into a variable

Thanks. Also please show to the end user the same number, using some semantic pirouettes. So this limit is easier to be found.

This revision is now accepted and ready to land.Aug 2 2024, 09:46

Thanks. Also please show to the end user the same number, using some semantic pirouettes. So this limit is easier to be found.

I could rephrase from Task title must be less than %d characters. (<256) to Task title must have %d characters or less. (255) but I think that is less clear to read.

I don't think end users need to find this limit, while developers can grep for this very error string?

The title cannot exceed %d characters :D

Borrow a short sentence from Valerio as his English skills in the morning are much much better than mine