mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Copy, Move, Link, More, QR code, Create board from card, Drawing, Flow fields, Flowtime and Pomodoro, Planning Poker, Linked cards and Requested/Assigned By follow one structure, checked against the code: Create board from this card is no longer hidden from members who can edit the card, a Pomodoro break ends in ready-to-start rather than the next work interval, a Pomodoro stopped during Work credits the minutes worked, and the timers have their own Board Settings / Card rows instead of depending on Time Tracking. Thanks to xet7 !
8.5 KiB
8.5 KiB
Card menu / Copy Card
What it is
Card menu (☰ in the opened card's header, Card Actions) → Copy Card
makes a copy of the card on this board or another one (copyCardPopup in
client/components/cards/cardDetails.jade). The copy is a new, independent
card: it gets its own number on the destination board and its own comments,
checklists, attachments and subtasks, copied from the original.
Read more
- Cut, copy, and paste and Kanban board on Wikipedia.
- In WeKan: Move Card (the same destination picker), Copy Template to Many Cards, Link to board, Save as Template, List permissions.
How to use it
- Open the card and click ☰ in its header (Card Actions). Under Move and copy, click Copy Card - or press Shift+C on the opened card, or on the selected or hovered minicard.
- Title: the copy's title, prefilled with the card's. An empty title copies nothing.
- Boards, Swimlanes, Lists: choose where the copy goes.
- Cards and Above selected card / Below selected card: choose the card the copy is put beside. Above selected card is chosen when the popup opens.
- Click Done. If the server refuses, the reason is shown in the popup and nothing is copied.
| Field | What it does |
|---|---|
| Title | the copy's title, prefilled with the card's; an empty title copies nothing |
| Boards, Swimlanes, Lists | the destination, as in Move Card |
| Cards, Above selected card / Below selected card | where the copy goes; when the destination list has no cards, it goes to the bottom |
| Done | copies |
The destination is remembered per board, as for Move Card. If the board is filtered, the copy is added to the filter's exceptions so it does not vanish at once (#80).
Who sees it
A user to whom the menu offers its moving and copying entries (helper
cardMenuWrites: somebody who may change the card, or a member who is not
Read only or Read assigned only), and who is not a Worker.
How the numbers are calculated
- Place in the list: the server first puts the copy at the top of the
destination list and swimlane (
sortone below the lowest sort number there,copyCardwithinsertAtTop). The client then moves it beside the chosen card: halfway between that card and its neighbour on the chosen side, or one past it at the end of the list (models/lib/relativePosition.js). Only when two cards share the same sort number are the tied ones spread out evenly. With no card in the list, it gets one more than the highest sort number, or 0. - Card number: the copy takes the destination board's next card number
(
board.getNextCardNumber()). - The copy has no other numbers of its own; its spent time, dates and the other fields are copied as they are.
How it works in WeKan
- Client:
Template.copyCardPopupin client/components/cards/cardDetails.js calls thecopyCardmethod, then moves the copy withcard.move(). The popup uses the sharedcardDestinationPickertemplate and theBoardSwimlaneListCardDialog(client/lib/dialogWithBoardSwimlaneListCard.js); the remembered destination isprofile.moveAndCopyDialogof the user. - Server checks: the copy is made by the
copyCardmethod (server/models/cards.js). It refuses when you are not signed in (recorded in Admin Panel → Problems as AuthBleed), not a member of the source board, an assigned-only member copying a card not assigned to you, without write access to the destination board, or when the destination list's permission refuses your role. Onlytitleanddescriptionmay be overridden (models/lib/cardCopyOverrides.js); any other field in the request is refused and recorded. - What is copied (
copy()in models/cards.js): the card's fields, attachments (and the cover, pointed at the copied attachment), checklists, comments, and the subtasks the copier may copy, with their checklists. Links to external Sync sources are not copied, so the copy is independent work. Dependencies are kept only when their target card is on the destination board. On another board, labels are matched by name; a named label that is missing there is created when you are an admin of that board. Only values of custom fields that belong to the destination board are kept. - Tests: tests/authBleedCopyMethods.test.cjs,
tests/cardCopyOverrides.test.cjs,
tests/cardCopyRuntimeCache.test.cjs,
tests/moveCopyRemembersDestination6901.test.cjs,
tests/destinationCards6917.test.cjs,
and the Playwright specs
card-copy-boundary.e2e.js,card-copy-destination.e2e.js,move-copy-remembers-destination-6901.e2e.jsandmove-copy-keyboard-shortcut-6904.e2e.js.
Related
Commits
- Card menu grouped under headings, Copy Card under Move and copy
- Server-side card copies ask the list's role exception
- Card shortcuts open only their popup
- Destination picker lists the cards of a lazily loaded board
- Shift+C opens Copy Card
- Remember the swimlane and list chosen last time, not only the board
- A signed-out copy attempt is recorded in Admin Panel / Problems
- Card actions menu in the maintainer's order
- A copy carries only the custom field values of its new board
- Copy only the subtasks the copier may copy
- Assigned-only members copy only their own cards
- Copy overrides restricted to title and description
- Admin-only custom fields enforced on copy
- Copied cards are independent of external Sync identities
- The destination picker is one shared template
- Copying to a board with no labels no longer throws
- Copied subtasks move to the destination board
- Copied comments move to the destination board
- Copying a card copies its subtasks' checklists
- Move and copy read the destination from the live selection, not the DOM
- Copy Card copies attachments
- Copy Card added