[PR #668] [MERGED] feat: Add ability to duplicate a card #1100

Closed
opened 2025-10-09 19:08:51 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/plankanban/planka/pull/668
Author: @mattboll
Created: 4/4/2024
Status: Merged
Merged: 4/5/2024
Merged by: @meltyshev

Base: masterHead: feature/duplicate


📝 Commits (2)

  • bec2379 feat: Add ability to duplicate a card
  • b86af05 fix: Add members and labels when duplicating, refactoring

📊 Changes

21 files changed (+505 additions, -6 deletions)

View changed files

📝 client/src/actions/cards.js (+34 -1)
📝 client/src/api/cards.js (+7 -0)
📝 client/src/components/Card/ActionsStep.jsx (+12 -0)
📝 client/src/components/Card/Card.jsx (+3 -0)
📝 client/src/components/CardModal/CardModal.jsx (+11 -0)
📝 client/src/constants/ActionTypes.js (+3 -0)
📝 client/src/constants/EntryActionTypes.js (+2 -0)
📝 client/src/containers/CardContainer.js (+1 -0)
📝 client/src/containers/CardModalContainer.js (+1 -0)
📝 client/src/entry-actions/cards.js (+14 -0)
📝 client/src/locales/en/core.js (+3 -0)
📝 client/src/locales/fr/core.js (+1 -0)
📝 client/src/models/Card.js (+54 -1)
📝 client/src/models/Task.js (+15 -0)
📝 client/src/sagas/core/services/cards.js (+70 -3)
📝 client/src/sagas/core/watchers/cards.js (+2 -0)
📝 client/src/selectors/cards.js (+42 -0)
server/api/controllers/cards/duplicate.js (+82 -0)
📝 server/api/helpers/boards/import-from-trello.js (+3 -1)
server/api/helpers/cards/duplicate-one.js (+144 -0)

...and 1 more files

📄 Description

Hi,
I really needed to duplicate some cards so I made this, I would love to see it upstream.
It's related to #48 #149 #317
It adds a button to duplicate the card, from the cardModal or the ActionsPopup

It's far from perfect but it's acceptable for my use case. I can work a little bit more on the pull request if needed.

I was not sure what could be the best way to duplicate tasks with cards, if the code is good enough I can do the same thing to duplicate labels, I'm not sure what other data would be relevant, right now it copies the card (name, description…) and tasks.

Also, the new card name is "old name (copy)"

Regards,


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/plankanban/planka/pull/668 **Author:** [@mattboll](https://github.com/mattboll) **Created:** 4/4/2024 **Status:** ✅ Merged **Merged:** 4/5/2024 **Merged by:** [@meltyshev](https://github.com/meltyshev) **Base:** `master` ← **Head:** `feature/duplicate` --- ### 📝 Commits (2) - [`bec2379`](https://github.com/plankanban/planka/commit/bec23795c2c6a4813ce9e94d0ede0dd244640946) feat: Add ability to duplicate a card - [`b86af05`](https://github.com/plankanban/planka/commit/b86af05358eac77fa8873a7d34e112a822873952) fix: Add members and labels when duplicating, refactoring ### 📊 Changes **21 files changed** (+505 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `client/src/actions/cards.js` (+34 -1) 📝 `client/src/api/cards.js` (+7 -0) 📝 `client/src/components/Card/ActionsStep.jsx` (+12 -0) 📝 `client/src/components/Card/Card.jsx` (+3 -0) 📝 `client/src/components/CardModal/CardModal.jsx` (+11 -0) 📝 `client/src/constants/ActionTypes.js` (+3 -0) 📝 `client/src/constants/EntryActionTypes.js` (+2 -0) 📝 `client/src/containers/CardContainer.js` (+1 -0) 📝 `client/src/containers/CardModalContainer.js` (+1 -0) 📝 `client/src/entry-actions/cards.js` (+14 -0) 📝 `client/src/locales/en/core.js` (+3 -0) 📝 `client/src/locales/fr/core.js` (+1 -0) 📝 `client/src/models/Card.js` (+54 -1) 📝 `client/src/models/Task.js` (+15 -0) 📝 `client/src/sagas/core/services/cards.js` (+70 -3) 📝 `client/src/sagas/core/watchers/cards.js` (+2 -0) 📝 `client/src/selectors/cards.js` (+42 -0) ➕ `server/api/controllers/cards/duplicate.js` (+82 -0) 📝 `server/api/helpers/boards/import-from-trello.js` (+3 -1) ➕ `server/api/helpers/cards/duplicate-one.js` (+144 -0) _...and 1 more files_ </details> ### 📄 Description Hi, I really needed to duplicate some cards so I made this, I would love to see it upstream. It's related to #48 #149 #317 It adds a button to duplicate the card, from the cardModal or the ActionsPopup It's far from perfect but it's acceptable for my use case. I can work a little bit more on the pull request if needed. I was not sure what could be the best way to duplicate tasks with cards, if the code is good enough I can do the same thing to duplicate labels, I'm not sure what other data would be relevant, right now it copies the card (name, description…) and tasks. Also, the new card name is "old name (copy)" Regards, --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-09 19:08:51 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#1100