- The General/ level is gone: its 109 files moved up into the folders of the same name, and its topic table is the "Shared topics" section of Features.md. - Accessibility is one folder, docs/Features/Accessibility/, with the Admin Panel's accessibility page in it. - Every folder's main page is README.md (110 X/X.md pages renamed with git mv, five merged with an existing README.md, 26 index pages added for folders that had none), so a folder opened on GitHub shows its page. - The 73 "# Moved" forwarding pages are deleted, with the folders that held only them; every link that went to one goes to its final page. - docs/Features/README.md has the website's "Features in WeKan" overview, each feature linking to its page here. 1,129 Markdown links in 262 files and 352 doc paths in code, tests, compose, snap and release files follow. tests/docsFeaturesLayout.test.cjs fails when General/ or a "# Moved" page comes back, a folder has no README.md, or a relative link in the docs or README.md does not resolve. Thanks to xet7 !
8.6 KiB
Card menu / Move Card
What it is
Card menu (☰ in the opened card's header, Card Actions) → Move Card
moves the card to another place on this board or to another board
(moveCardPopup in client/components/cards/cardDetails.jade). It does what
dragging a card does, also where dragging cannot reach: to another board, or to
an exact place in a long list.
Read more
- Kanban board and Kanban (development) on Wikipedia - a card moves through the lists as its work moves on.
- In WeKan: Copy Card, Link to board, Move to Top, Move to Bottom, Linked cards, List permissions, Moving a card to another board.
How to use it
- Open the card and click ☰ in its header (Card Actions). Under Move and copy, click Move Card - or press Shift+M on the opened card, or on the selected or hovered minicard.
- Change the Title if you like, and write a Move reason (optional).
- Choose Boards, Swimlanes and Lists.
- Choose a card under Cards and Above selected card (chosen when the popup opens) or Below selected card.
- Tick Leave a link at the original location to leave a linked card where the card was.
- Click Done. It is disabled until the destination's cards have loaded. If the move is refused, the error is shown in the popup.
| Field | What it does |
|---|---|
| Title | the card's title; a changed title is saved after the move |
| Move reason (optional) | up to 1000 characters, passed with the move |
| Boards | the active boards you are an active member of, without your Templates board |
| Swimlanes, Lists | the destination swimlane and list on that board; lists that belong to no swimlane are offered with every swimlane |
| Cards, Above selected card / Below selected card | where in the list the card goes; when the list has no cards, it goes to the bottom |
| Leave a link at the original location | off by default; when on, a linked card is left where the card was (#2719) |
| Done | moves; disabled until the destination's cards have loaded |
The destination you choose - board, swimlane, list and card - is remembered per
board in your profile (profile.moveAndCopyDialog) and offered next time
(#6901); a remembered swimlane,
list or card that is gone falls back to the first one. The same destination
picker (cardDestinationPicker) is used by
Copy Card,
Copy Template to Many Cards and
Link to board. Its Cards list is loaded for the chosen
list on its own, so it is filled also on a board whose cards load lazily
(#6917).
Who sees it
Only a board admin, and only when the menu's moving and copying entries
are offered at all (helper cardMenuWrites): to somebody who may change the
card, or to a member who is not Read only or Read assigned only.
What moves along
A card moved to another board takes its comments, reactions, text note, checklists and attachments along; see Moving a card to another board. Its labels are matched by name on the new board (a missing named label is created when you are an admin there), it takes the new board's next card number, members and watchers who are not active members of the new board are taken off it, only its custom fields of the new board are kept, and its dependencies are dropped, because they connect cards of one board only.
A list permission that refuses your role in the source or the destination list refuses the move. An error is shown in the popup.
How the numbers are calculated
- Place in the list (
relativePositionin models/lib/relativePosition.js): the card gets the number halfway between the chosen card and its neighbour on the chosen side. At the top or bottom of the list there is no neighbour, so it gets the chosen card's sort number minus 1 (above) or plus 1 (below). Only when two neighbours share one sort number (or the numbers are too close to split) are the tied cards spread out evenly between the nearest different numbers. With no cards in the list, the card gets the highest sort number plus 1, or 0. - Move reason: at most 1000 characters (
maxlengthon the field, and trimmed and cut to 1000 inmove()), stored aslastMoveReasonwhen the card changes list or board. - Card number: on another board, the board's next card number.
How it works in WeKan
- Client:
Template.moveCardPopupin client/components/cards/cardDetails.js works out the sort number (relativeCardSort, client/lib/relativeCardPosition.js), callscard.move(boardId, swimlaneId, listId, sort, reason), saves a changed title, and with the checkbox ticked callscard.link()at the original place. The dialog state isBoardSwimlaneListCardDialog(client/lib/dialogWithBoardSwimlaneListCard.js, client/lib/dialogWithBoardSwimlaneList.js); the destination's cards come from thedestinationCardspublication. - Model:
move()in models/cards.js writes only the fields that change (models/lib/cardMoveModifier.js), and on another board maps labels, custom fields, members and watchers. The server hooks inserver/models/cards.jsmove the card's comments, checklists and attachments along and remove dependencies pointing at it from the old board. - Keyboard: Shift+M is
openCardMenuActionOfOpenedCard('move')in client/lib/keyboard.js. - Tests: tests/moveCopyRemembersDestination6901.test.cjs,
tests/moveCardLeaveLinkAtOrigin2719.test.cjs,
tests/destinationCards6917.test.cjs,
tests/cardMoveModifier.test.cjs,
tests/cardCustomFieldsMove.test.cjs,
tests/cardChildrenFollowMove.test.cjs
and the Playwright specs
move-copy-remembers-destination-6901.e2e.js,move-copy-keyboard-shortcut-6904.e2e.js,card-copy-destination.e2e.jsandissue-6793-comments-follow-card-move.e2e.js.
Commits
- Card menu grouped under headings, Move Card under Move and copy
- Card shortcuts open only their popup
- Destination picker lists the cards of a lazily loaded board
- Shift+M opens Move Card
- Remember the swimlane and list chosen last time, not only the board
- Card actions menu in the maintainer's order
- Record reversible move reasons
- Leave a linked card at the original spot
- Cross-board move destinations stay reactive
- The destination picker is one shared template
- Moving a card to another board keeps its custom field ids
- Move and copy read the destination from the live selection, not the DOM
- Fix the move and copy popup's duplicate view