Since #3986 a new card's title starting with [Text] followed by more
text lost the prefix and got the label Text, created on the board when
it had none - for everybody, without a hint. Titles pasted from ticket
systems, mails and monitoring tools ([Follower] #123456 - ...,
[EXTERNAL] ...) were changed and filled the board with unwanted labels.
It is a Member Settings switch now, Turn [label] at the start of a new
card title into a label (profile.titleBracketLabel), off by default: a
title is kept as typed. Who wants #3986's behaviour turns it on. Both
texts are translated in every language; low confidence for the
constructed and rarest ones (tlh, vo and some 35 others).
Thanks to jullbo and xet7 !
Fixes#6810.
Typing a title starting with "[LabelName] " in the quick-add-card composer
at the bottom of a list now applies that label to the new card - creating
the label on the board first, with the same default-color pick "Add label"
uses, when no label with that name exists yet (case-insensitive match).
Only a single bracket prefix at the very start of the title is parsed; an
empty bracket, nested brackets, or a bracket with nothing left after it is
left as literal title text.
The parsing and label-resolution logic lives in the new pure module
models/lib/quickAddCardLabel.js (parseQuickAddCardLabel,
findExistingLabelIdByName, pickDefaultLabelColor), wired into addCard in
client/components/lists/listBody.js. tests/quickAddCardLabel.test.cjs covers
the parser (including the empty/nested-bracket/no-rest negative cases), the
case-insensitive label lookup, and the default-color fallback.
Thanks to mattdm and xet7 !
Closes#3986,