Files
wekan/docs/Features/Cards/Attachments
Lauri Ojansivu 32fa89fdc3 Attach a card to a card, as Trello's card attachments, and import them from Trello.
A card can now have other cards attached to it, beside its files. In the
card's Attachments, + offers "Attach card": type part of a card title on
this board and pick it, or paste a card link (Copy card link gives one) to a
card on any board you can read. An attached card shows its title, board and
list, opens that card, and can be removed again.

- Data: cards.attachedCardIds, the attached cards' ids, at most 100
  (models/lib/attachedCards.js).
- Methods (server/models/attachedCards.js): attachCardToCard and
  detachCardFromCard need the right to edit the card, and only a card the
  user can read can be attached - its board's read rule and, for an
  assigned-only member, a card assigned to them. Any other is refused as
  "not found", the same as a card that does not exist. attachedCardsInfo
  shows an attached card's title only to a viewer who can read it; anybody
  else sees that one is there.
- Trello import: an attachment that links to a Trello card of the same
  export becomes an attached card; a link to a card of another board stays
  in the description under Links, as attached links always did.
- WeKan import: attached cards follow the cards that came in the same
  export to their new ids; the rest are dropped.

Tests: tests/attachedCards.test.cjs (the module, the permission rules and
the wiring), server/lib/tests/attachedCards.tests.js (attaching across
boards, refusing unreadable and assigned-only cards, a non-editor, and
hiding what a viewer cannot read) and tests/playwright/specs/attached-cards.e2e.js
(attach by title, refuse a hidden card, open, remove; and a Trello import).
Docs: docs/Features/Cards/Attachments/Attached-Cards.md.

Thanks to ricardoboss and xet7 !

Fixes #3257.
2026-10-10 14:24:44 +03:00
..