Commit Graph
1 Commits
Author SHA1 Message Date
Lauri Ojansivu bc699ab43b Add quick-add-card bracket label syntax, e.g. [Fedora] Do a thing.
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,
2026-09-10 20:06:23 +03:00