summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md14
-rw-r--r--Stackerfile.yml2
-rw-r--r--client/components/cards/cardDetails.js8
-rw-r--r--client/components/lists/listBody.jade4
-rw-r--r--client/components/lists/listBody.js17
-rw-r--r--i18n/ar.i18n.json2
-rw-r--r--i18n/bg.i18n.json2
-rw-r--r--i18n/br.i18n.json2
-rw-r--r--i18n/ca.i18n.json2
-rw-r--r--i18n/cs.i18n.json2
-rw-r--r--i18n/da.i18n.json2
-rw-r--r--i18n/de.i18n.json2
-rw-r--r--i18n/el.i18n.json2
-rw-r--r--i18n/en-GB.i18n.json2
-rw-r--r--i18n/en.i18n.json2
-rw-r--r--i18n/eo.i18n.json2
-rw-r--r--i18n/es-AR.i18n.json2
-rw-r--r--i18n/es.i18n.json2
-rw-r--r--i18n/eu.i18n.json2
-rw-r--r--i18n/fa.i18n.json2
-rw-r--r--i18n/fi.i18n.json2
-rw-r--r--i18n/fr.i18n.json2
-rw-r--r--i18n/gl.i18n.json2
-rw-r--r--i18n/he.i18n.json2
-rw-r--r--i18n/hi.i18n.json2
-rw-r--r--i18n/hu.i18n.json2
-rw-r--r--i18n/hy.i18n.json2
-rw-r--r--i18n/id.i18n.json2
-rw-r--r--i18n/ig.i18n.json2
-rw-r--r--i18n/it.i18n.json2
-rw-r--r--i18n/ja.i18n.json2
-rw-r--r--i18n/ka.i18n.json2
-rw-r--r--i18n/km.i18n.json2
-rw-r--r--i18n/ko.i18n.json2
-rw-r--r--i18n/lv.i18n.json2
-rw-r--r--i18n/mk.i18n.json2
-rw-r--r--i18n/mn.i18n.json2
-rw-r--r--i18n/nb.i18n.json2
-rw-r--r--i18n/nl.i18n.json2
-rw-r--r--i18n/pl.i18n.json2
-rw-r--r--i18n/pt-BR.i18n.json2
-rw-r--r--i18n/pt.i18n.json2
-rw-r--r--i18n/ro.i18n.json2
-rw-r--r--i18n/ru.i18n.json2
-rw-r--r--i18n/sr.i18n.json2
-rw-r--r--i18n/sv.i18n.json2
-rw-r--r--i18n/sw.i18n.json2
-rw-r--r--i18n/ta.i18n.json2
-rw-r--r--i18n/th.i18n.json2
-rw-r--r--i18n/tr.i18n.json2
-rw-r--r--i18n/uk.i18n.json2
-rw-r--r--i18n/vi.i18n.json2
-rw-r--r--i18n/zh-CN.i18n.json2
-rw-r--r--i18n/zh-TW.i18n.json2
-rw-r--r--models/boards.js3
-rw-r--r--models/cards.js32
-rw-r--r--models/lists.js13
-rw-r--r--models/swimlanes.js8
-rw-r--r--package.json2
-rw-r--r--sandstorm-pkgdef.capnp4
60 files changed, 126 insertions, 79 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f87199c1..6d50c383 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,17 @@
+# v2.31 2019-02-28 Wekan release
+
+This release fixes the following bugs related to [Template features](https://github.com/wekan/wekan/issues/2209), thanks to GitHub user andresmanelli:
+
+- [Fix copy card](https://github.com/wekan/wekan/issues/2210).
+
+# v2.30 2019-02-28 Wekan release
+
+This release adds the following new [Template features](https://github.com/wekan/wekan/issues/2209), thanks to GitHub user andresmanelli:
+
+- [Fix popup title. Add element title modification](https://github.com/wekan/wekan/commit/888e1ad5d3e32be53283aa32198057f669f3d706);
+- [Copy template attachments](https://github.com/wekan/wekan/commit/abb71083215462d91b084c4de13af0b130638e4d);
+- [Standarize copy functions. Match labels by name](https://github.com/wekan/wekan/commit/da21a2a410c9b905de89d66236748e0c8f5357ea).
+
# v2.29 2019-02-27 Wekan release
This release adds the following new features:
diff --git a/Stackerfile.yml b/Stackerfile.yml
index 031953fe..8ee99ee8 100644
--- a/Stackerfile.yml
+++ b/Stackerfile.yml
@@ -1,5 +1,5 @@
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
-appVersion: "v2.29.0"
+appVersion: "v2.31.0"
files:
userUploads:
- README.md
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 73a7a67d..4df42586 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -460,11 +460,11 @@ Template.copyCardPopup.events({
'click .js-done'() {
const card = Cards.findOne(Session.get('currentCard'));
const lSelect = $('.js-select-lists')[0];
- card.listId = lSelect.options[lSelect.selectedIndex].value;
+ listId = lSelect.options[lSelect.selectedIndex].value;
const slSelect = $('.js-select-swimlanes')[0];
- card.swimlaneId = slSelect.options[slSelect.selectedIndex].value;
+ const swimlaneId = slSelect.options[slSelect.selectedIndex].value;
const bSelect = $('.js-select-boards')[0];
- card.boardId = bSelect.options[bSelect.selectedIndex].value;
+ const boardId = bSelect.options[bSelect.selectedIndex].value;
const textarea = $('#copy-card-title');
const title = textarea.val().trim();
// insert new card to the bottom of new list
@@ -473,7 +473,7 @@ Template.copyCardPopup.events({
if (title) {
card.title = title;
card.coverId = '';
- const _id = card.copy();
+ const _id = card.copy(boardId, swimlaneId, listId);
// In case the filter is active we need to add the newly inserted card in
// the list of exceptions -- cards that are not filtered. Otherwise the
// card will disappear instantly.
diff --git a/client/components/lists/listBody.jade b/client/components/lists/listBody.jade
index 9a9c322a..876b43d6 100644
--- a/client/components/lists/listBody.jade
+++ b/client/components/lists/listBody.jade
@@ -90,6 +90,10 @@ template(name="linkCardPopup")
input.primary.confirm.js-done(type="button" value="{{_ 'link'}}")
template(name="searchElementPopup")
+ form
+ label
+ | {{_ 'title'}}
+ input.js-element-title(type="text" placeholder="{{_ 'title'}}" autofocus required)
unless isTemplateSearch
label {{_ 'boards'}}:
.link-board-wrapper
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 04c7eede..7d767011 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -616,20 +616,21 @@ BlazeComponent.extendComponent({
},
'click .js-minicard'(evt) {
// 0. Common
+ const title = $('.js-element-title').val().trim();
+ if (!title)
+ return;
const element = Blaze.getData(evt.currentTarget);
+ element.title = title;
let _id = '';
if (!this.isTemplateSearch || this.isCardTemplateSearch) {
// Card insertion
// 1. Common
- element.boardId = this.boardId;
- element.listId = this.listId;
- element.swimlaneId = this.swimlaneId;
element.sort = Lists.findOne(this.listId).cards().count();
// 1.A From template
if (this.isTemplateSearch) {
element.type = 'cardType-card';
element.linkedId = '';
- _id = element.copy();
+ _id = element.copy(this.boardId, this.swimlaneId, this.listId);
// 1.B Linked card
} else {
delete element._id;
@@ -640,21 +641,19 @@ BlazeComponent.extendComponent({
Filter.addException(_id);
// List insertion
} else if (this.isListTemplateSearch) {
- element.boardId = this.boardId;
element.sort = Swimlanes.findOne(this.swimlaneId).lists().count();
element.type = 'list';
- _id = element.copy(this.swimlaneId);
+ _id = element.copy(this.boardId, this.swimlaneId);
} else if (this.isSwimlaneTemplateSearch) {
- element.boardId = this.boardId;
element.sort = Boards.findOne(this.boardId).swimlanes().count();
element.type = 'swimlalne';
- _id = element.copy();
+ _id = element.copy(this.boardId);
} else if (this.isBoardTemplateSearch) {
board = Boards.findOne(element.linkedId);
board.sort = Boards.find({archived: false}).count();
board.type = 'board';
+ board.title = element.title;
delete board.slug;
- delete board.members;
_id = board.copy();
}
Popup.close();
diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json
index 5f407569..d576e0e4 100644
--- a/i18n/ar.i18n.json
+++ b/i18n/ar.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "نسخ رابط البطاقة إلى الحافظة",
"linkCardPopup-title": "ربط البطاقة",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "بحث",
"copyCardPopup-title": "نسخ البطاقة",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/bg.i18n.json b/i18n/bg.i18n.json
index d776b9e3..46c4848d 100644
--- a/i18n/bg.i18n.json
+++ b/i18n/bg.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Сигурни ли сте, че искате да изтриете този чеклист?",
"copy-card-link-to-clipboard": "Копирай връзката на картата в клипборда",
"linkCardPopup-title": "Свържи картата",
- "searchCardPopup-title": "Търсене на карта",
+ "searchElementPopup-title": "Търсене",
"copyCardPopup-title": "Копирай картата",
"copyChecklistToManyCardsPopup-title": "Копирай чеклисти в други карти",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json
index e54f57b0..cf52a343 100644
--- a/i18n/br.i18n.json
+++ b/i18n/br.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json
index 9cc36323..cb2e0822 100644
--- a/i18n/ca.i18n.json
+++ b/i18n/ca.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copia l'enllaç de la ftixa al porta-retalls",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Buscar Fitxa",
+ "searchElementPopup-title": "Cerca",
"copyCardPopup-title": "Copia la fitxa",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Títols de fitxa i Descripcions de destí en aquest format JSON",
diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json
index cad46ea9..8ccedb95 100644
--- a/i18n/cs.i18n.json
+++ b/i18n/cs.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Opravdu chcete smazat tento checklist?",
"copy-card-link-to-clipboard": "Kopírovat adresu karty do mezipaměti",
"linkCardPopup-title": "Propojit kartu",
- "searchCardPopup-title": "Hledat Kartu",
+ "searchElementPopup-title": "Hledat",
"copyCardPopup-title": "Kopírovat kartu",
"copyChecklistToManyCardsPopup-title": "Kopírovat checklist do více karet",
"copyChecklistToManyCardsPopup-instructions": "Názvy a popisy cílové karty v tomto formátu JSON",
diff --git a/i18n/da.i18n.json b/i18n/da.i18n.json
index b54634c5..8278d389 100644
--- a/i18n/da.i18n.json
+++ b/i18n/da.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json
index 39188c0a..a07b9ad0 100644
--- a/i18n/de.i18n.json
+++ b/i18n/de.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Wollen Sie die Checkliste wirklich löschen?",
"copy-card-link-to-clipboard": "Kopiere Link zur Karte in die Zwischenablage",
"linkCardPopup-title": "Karte verknüpfen",
- "searchCardPopup-title": "Karte suchen",
+ "searchElementPopup-title": "Suche",
"copyCardPopup-title": "Karte kopieren",
"copyChecklistToManyCardsPopup-title": "Checklistenvorlage in mehrere Karten kopieren",
"copyChecklistToManyCardsPopup-instructions": "Titel und Beschreibungen der Zielkarten im folgenden JSON-Format",
diff --git a/i18n/el.i18n.json b/i18n/el.i18n.json
index 216b0c2d..69df2b0c 100644
--- a/i18n/el.i18n.json
+++ b/i18n/el.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Αναζήτηση",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json
index c9b68793..de012b33 100644
--- a/i18n/en-GB.i18n.json
+++ b/i18n/en-GB.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index 94666c16..97973f6e 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json
index 1c84bbd4..2ff3075f 100644
--- a/i18n/eo.i18n.json
+++ b/i18n/eo.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Serĉi",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/es-AR.i18n.json b/i18n/es-AR.i18n.json
index 2d6d65fe..e4a76c74 100644
--- a/i18n/es-AR.i18n.json
+++ b/i18n/es-AR.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copiar enlace a tarjeta en el portapapeles",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Buscar",
"copyCardPopup-title": "Copiar Tarjeta",
"copyChecklistToManyCardsPopup-title": "Copiar Plantilla Checklist a Muchas Tarjetas",
"copyChecklistToManyCardsPopup-instructions": "Títulos y Descripciones de la Tarjeta Destino en este formato JSON",
diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json
index ac3fd36e..87a86c26 100644
--- a/i18n/es.i18n.json
+++ b/i18n/es.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "¿Seguro que quieres eliminar la lista de verificación?",
"copy-card-link-to-clipboard": "Copiar el enlace de la tarjeta al portapapeles",
"linkCardPopup-title": "Enlazar tarjeta",
- "searchCardPopup-title": "Buscar tarjeta",
+ "searchElementPopup-title": "Buscar",
"copyCardPopup-title": "Copiar la tarjeta",
"copyChecklistToManyCardsPopup-title": "Copiar la plantilla de la lista de verificación en varias tarjetas",
"copyChecklistToManyCardsPopup-instructions": "Títulos y descripciones de las tarjetas de destino en formato JSON",
diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json
index ab54ba9e..978ffbdb 100644
--- a/i18n/eu.i18n.json
+++ b/i18n/eu.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Kopiatu txartela arbelera",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Bilatu",
"copyCardPopup-title": "Kopiatu txartela",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json
index db8eefe4..b5201842 100644
--- a/i18n/fa.i18n.json
+++ b/i18n/fa.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "مطمئنا چک لیست پاک شود؟",
"copy-card-link-to-clipboard": "درج پیوند کارت در حافظه",
"linkCardPopup-title": "ارتباط دادن کارت",
- "searchCardPopup-title": "جستجوی کارت",
+ "searchElementPopup-title": "جستجو",
"copyCardPopup-title": "کپی کارت",
"copyChecklistToManyCardsPopup-title": "کپی قالب کارت به کارت‌های متعدد",
"copyChecklistToManyCardsPopup-instructions": "عنوان و توضیحات کارت مقصد در این قالب JSON",
diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json
index a4a115ec..3fa46659 100644
--- a/i18n/fi.i18n.json
+++ b/i18n/fi.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Oletko varma että haluat poistaa tarkistuslistan?",
"copy-card-link-to-clipboard": "Kopioi kortin linkki leikepöydälle",
"linkCardPopup-title": "Linkitä kortti",
- "searchCardPopup-title": "Etsi kortti",
+ "searchElementPopup-title": "Etsi",
"copyCardPopup-title": "Kopioi kortti",
"copyChecklistToManyCardsPopup-title": "Kopioi tarkistuslistan malli monille korteille",
"copyChecklistToManyCardsPopup-instructions": "Kohde korttien otsikot ja kuvaukset JSON muodossa",
diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json
index 5c38a222..551ecddb 100644
--- a/i18n/fr.i18n.json
+++ b/i18n/fr.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Êtes-vous sûr de vouloir supprimer la checklist ?",
"copy-card-link-to-clipboard": "Copier le lien vers la carte dans le presse-papier",
"linkCardPopup-title": "Lier une Carte",
- "searchCardPopup-title": "Chercher une Carte",
+ "searchElementPopup-title": "Chercher",
"copyCardPopup-title": "Copier la carte",
"copyChecklistToManyCardsPopup-title": "Copier le modèle de checklist vers plusieurs cartes",
"copyChecklistToManyCardsPopup-instructions": "Titres et descriptions des cartes de destination dans ce format JSON",
diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json
index 617a213a..2642aa27 100644
--- a/i18n/gl.i18n.json
+++ b/i18n/gl.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json
index 81cc6210..1afedaf3 100644
--- a/i18n/he.i18n.json
+++ b/i18n/he.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "למחוק את רשימת המשימות?",
"copy-card-link-to-clipboard": "העתקת קישור הכרטיס ללוח הגזירים",
"linkCardPopup-title": "קישור כרטיס",
- "searchCardPopup-title": "חיפוש כרטיס",
+ "searchElementPopup-title": "חיפוש",
"copyCardPopup-title": "העתק כרטיס",
"copyChecklistToManyCardsPopup-title": "העתקת תבנית רשימת מטלות למגוון כרטיסים",
"copyChecklistToManyCardsPopup-instructions": "כותרות ותיאורים של כרטיסי יעד בתצורת JSON זו",
diff --git a/i18n/hi.i18n.json b/i18n/hi.i18n.json
index 7586bf45..14ea66f6 100644
--- a/i18n/hi.i18n.json
+++ b/i18n/hi.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "क्या आप वाकई जांचसूची हटाना चाहते हैं?",
"copy-card-link-to-clipboard": "कॉपी कार्ड क्लिपबोर्ड करने के लिए लिंक",
"linkCardPopup-title": "कार्ड कड़ी",
- "searchCardPopup-title": "कार्ड खोज",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "कार्ड प्रतिलिपि",
"copyChecklistToManyCardsPopup-title": "कई कार्ड के लिए जांचसूची खाके की प्रतिलिपि बनाएँ",
"copyChecklistToManyCardsPopup-instructions": "इस JSON प्रारूप में गंतव्य कार्ड शीर्षक और विवरण",
diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json
index 8f8085c8..d62c5c61 100644
--- a/i18n/hu.i18n.json
+++ b/i18n/hu.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Kártya hivatkozásának másolása a vágólapra",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Keresés",
"copyCardPopup-title": "Kártya másolása",
"copyChecklistToManyCardsPopup-title": "Ellenőrzőlista sablon másolása több kártyára",
"copyChecklistToManyCardsPopup-instructions": "A célkártyák címe és a leírások ebben a JSON formátumban",
diff --git a/i18n/hy.i18n.json b/i18n/hy.i18n.json
index 22f84286..42491ba0 100644
--- a/i18n/hy.i18n.json
+++ b/i18n/hy.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json
index 8c308e09..7874f0a6 100644
--- a/i18n/id.i18n.json
+++ b/i18n/id.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Cari",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/ig.i18n.json b/i18n/ig.i18n.json
index 37544497..d5b9d446 100644
--- a/i18n/ig.i18n.json
+++ b/i18n/ig.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json
index 1133a436..4555cbfe 100644
--- a/i18n/it.i18n.json
+++ b/i18n/it.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Sei sicuro di voler eliminare la checklist?",
"copy-card-link-to-clipboard": "Copia link della scheda sulla clipboard",
"linkCardPopup-title": "Collega scheda",
- "searchCardPopup-title": "Cerca scheda",
+ "searchElementPopup-title": "Cerca",
"copyCardPopup-title": "Copia Scheda",
"copyChecklistToManyCardsPopup-title": "Copia template checklist su più schede",
"copyChecklistToManyCardsPopup-instructions": "Titolo e la descrizione della scheda di destinazione in questo formato JSON",
diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json
index 0a432b70..9e2427f3 100644
--- a/i18n/ja.i18n.json
+++ b/i18n/ja.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "カードへのリンクをクリップボードにコピー",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "検索",
"copyCardPopup-title": "カードをコピー",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/ka.i18n.json b/i18n/ka.i18n.json
index f99663d4..06432e60 100644
--- a/i18n/ka.i18n.json
+++ b/i18n/ka.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "დარწმუნებული ხართ, რომ გსურთ კატალოგის წაშლა ? ",
"copy-card-link-to-clipboard": "დააკოპირეთ ბარათის ბმული clipboard-ზე",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "ძებნა",
"copyCardPopup-title": "ბარათის ასლი",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/km.i18n.json b/i18n/km.i18n.json
index 35197573..86fcd7d6 100644
--- a/i18n/km.i18n.json
+++ b/i18n/km.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json
index 473a699b..fea95077 100644
--- a/i18n/ko.i18n.json
+++ b/i18n/ko.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "클립보드에 카드의 링크가 복사되었습니다.",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "검색",
"copyCardPopup-title": "카드 복사",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/lv.i18n.json b/i18n/lv.i18n.json
index e0c5da5c..bdff593f 100644
--- a/i18n/lv.i18n.json
+++ b/i18n/lv.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/mk.i18n.json b/i18n/mk.i18n.json
index 2a6e6b03..dd18bcae 100644
--- a/i18n/mk.i18n.json
+++ b/i18n/mk.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Сигурни ли сте, че искате да изтриете този чеклист?",
"copy-card-link-to-clipboard": "Копирай връзката на картата в клипборда",
"linkCardPopup-title": "Свържи картата",
- "searchCardPopup-title": "Търсене на карта",
+ "searchElementPopup-title": "Търсене",
"copyCardPopup-title": "Копирай картата",
"copyChecklistToManyCardsPopup-title": "Копирай чеклисти в други карти",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/mn.i18n.json b/i18n/mn.i18n.json
index 6c8a3e41..d4b71c6c 100644
--- a/i18n/mn.i18n.json
+++ b/i18n/mn.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json
index b6615006..b0d60016 100644
--- a/i18n/nb.i18n.json
+++ b/i18n/nb.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json
index dcb354bb..1ef90372 100644
--- a/i18n/nl.i18n.json
+++ b/i18n/nl.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Kopieer kaart link naar klembord",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Zoek",
"copyCardPopup-title": "Kopieer kaart",
"copyChecklistToManyCardsPopup-title": "Checklist sjabloon kopiëren naar meerdere kaarten",
"copyChecklistToManyCardsPopup-instructions": "Doel kaart titels en omschrijvingen in dit JSON formaat",
diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json
index 3ec021e5..152c66bf 100644
--- a/i18n/pl.i18n.json
+++ b/i18n/pl.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Czy jesteś pewien, że chcesz usunąć listę zadań?",
"copy-card-link-to-clipboard": "Skopiuj łącze karty do schowka",
"linkCardPopup-title": "Podepnij kartę",
- "searchCardPopup-title": "Znajdź kartę",
+ "searchElementPopup-title": "Wyszukaj",
"copyCardPopup-title": "Skopiuj kartę",
"copyChecklistToManyCardsPopup-title": "Kopiuj szablon listy zadań do wielu kart",
"copyChecklistToManyCardsPopup-instructions": "Docelowe tytuły i opisy kart są w formacie JSON",
diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json
index 5f677275..f8102a74 100644
--- a/i18n/pt-BR.i18n.json
+++ b/i18n/pt-BR.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Tem certeza que quer excluir a lista de verificação?",
"copy-card-link-to-clipboard": "Copiar link do cartão para a área de transferência",
"linkCardPopup-title": "Ligar Cartão",
- "searchCardPopup-title": "Procurar Cartão",
+ "searchElementPopup-title": "Buscar",
"copyCardPopup-title": "Copiar o cartão",
"copyChecklistToManyCardsPopup-title": "Copiar modelo de lista de verificação para vários cartões",
"copyChecklistToManyCardsPopup-instructions": "Títulos e descrições do cartão de destino neste formato JSON",
diff --git a/i18n/pt.i18n.json b/i18n/pt.i18n.json
index bd773954..893a0fef 100644
--- a/i18n/pt.i18n.json
+++ b/i18n/pt.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json
index 25b794b9..571faa40 100644
--- a/i18n/ro.i18n.json
+++ b/i18n/ro.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Caută",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json
index 082cc006..24a35b45 100644
--- a/i18n/ru.i18n.json
+++ b/i18n/ru.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Вы уверены, что хотите удалить контрольный список?",
"copy-card-link-to-clipboard": "Копировать ссылку на карточку в буфер обмена",
"linkCardPopup-title": "Карточка-ссылка",
- "searchCardPopup-title": "Найти карточку",
+ "searchElementPopup-title": "Поиск",
"copyCardPopup-title": "Копировать карточку",
"copyChecklistToManyCardsPopup-title": "Копировать шаблон контрольного списка в несколько карточек",
"copyChecklistToManyCardsPopup-instructions": "Названия и описания целевых карт в формате JSON",
diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json
index 77a1c55a..c2a42bb2 100644
--- a/i18n/sr.i18n.json
+++ b/i18n/sr.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Pretraga",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json
index 7cf6670c..ffd9ee9f 100644
--- a/i18n/sv.i18n.json
+++ b/i18n/sv.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Är du säker på att du vill radera checklista?",
"copy-card-link-to-clipboard": "Kopiera kortlänk till urklipp",
"linkCardPopup-title": "Länka kort",
- "searchCardPopup-title": "Sök kort",
+ "searchElementPopup-title": "Sök",
"copyCardPopup-title": "Kopiera kort",
"copyChecklistToManyCardsPopup-title": "Kopiera checklist-mallen till flera kort",
"copyChecklistToManyCardsPopup-instructions": "Destinationskorttitlar och beskrivningar i detta JSON-format",
diff --git a/i18n/sw.i18n.json b/i18n/sw.i18n.json
index f68b08e8..e014412d 100644
--- a/i18n/sw.i18n.json
+++ b/i18n/sw.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json
index ef63da13..a2d312ed 100644
--- a/i18n/ta.i18n.json
+++ b/i18n/ta.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "தேடு ",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json
index ceb4e761..10a5624d 100644
--- a/i18n/th.i18n.json
+++ b/i18n/th.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "ค้นหา",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json
index 987a728a..ddf1c73a 100644
--- a/i18n/tr.i18n.json
+++ b/i18n/tr.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Kontrol listesini silmek istediğinden emin misin?",
"copy-card-link-to-clipboard": "Kartın linkini kopyala",
"linkCardPopup-title": "Bağlantı kartı",
- "searchCardPopup-title": "Kart Ara",
+ "searchElementPopup-title": "Arama",
"copyCardPopup-title": "Kartı Kopyala",
"copyChecklistToManyCardsPopup-title": "Yapılacaklar Listesi şemasını birden çok karta kopyala",
"copyChecklistToManyCardsPopup-instructions": "Hedef Kart Başlıkları ve Açıklamaları bu JSON formatında",
diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json
index 232acffe..34175c4c 100644
--- a/i18n/uk.i18n.json
+++ b/i18n/uk.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Скопіювати посилання на картку в буфер обміну",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json
index f52bd3ce..973dcb82 100644
--- a/i18n/vi.i18n.json
+++ b/i18n/vi.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
"copy-card-link-to-clipboard": "Copy card link to clipboard",
"linkCardPopup-title": "Link Card",
- "searchCardPopup-title": "Search Card",
+ "searchElementPopup-title": "Search",
"copyCardPopup-title": "Copy Card",
"copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards",
"copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format",
diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json
index 7c68f2cc..d086d518 100644
--- a/i18n/zh-CN.i18n.json
+++ b/i18n/zh-CN.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "确定要删除清单吗?",
"copy-card-link-to-clipboard": "复制卡片链接到剪贴板",
"linkCardPopup-title": "链接卡片",
- "searchCardPopup-title": "搜索卡片",
+ "searchElementPopup-title": "搜索",
"copyCardPopup-title": "复制卡片",
"copyChecklistToManyCardsPopup-title": "复制清单模板至多个卡片",
"copyChecklistToManyCardsPopup-instructions": "以JSON格式表示目标卡片的标题和描述",
diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json
index 19c1374a..4872aa04 100644
--- a/i18n/zh-TW.i18n.json
+++ b/i18n/zh-TW.i18n.json
@@ -207,7 +207,7 @@
"confirm-checklist-delete-dialog": "你確定要刪除待辦清單嗎?",
"copy-card-link-to-clipboard": "將卡片連結複製到剪貼簿",
"linkCardPopup-title": "連結卡片",
- "searchCardPopup-title": "搜尋卡片",
+ "searchElementPopup-title": "搜尋",
"copyCardPopup-title": "複製卡片",
"copyChecklistToManyCardsPopup-title": "複製待辦清單的樣板到多個卡片",
"copyChecklistToManyCardsPopup-instructions": "使用此 JSON 格式來表示目標卡片的標題和描述",
diff --git a/models/boards.js b/models/boards.js
index 0db2e48e..9a71ede8 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -326,8 +326,7 @@ Boards.helpers({
archived: false,
}).forEach((swimlane) => {
swimlane.type = 'swimlane';
- swimlane.boardId = _id;
- swimlane.copy(oldId);
+ swimlane.copy(_id);
});
},
/**
diff --git a/models/cards.js b/models/cards.js
index c733c7f8..cf64cd9b 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -272,13 +272,41 @@ Cards.allow({
});
Cards.helpers({
- copy() {
+ copy(boardId, swimlaneId, listId) {
+ const oldBoard = Boards.findOne(this.boardId);
+ const oldBoardLabels = oldBoard.labels;
+ // Get old label names
+ const oldCardLabels = _.pluck(_.filter(oldBoardLabels, (label) => {
+ return _.contains(this.labelIds, label._id);
+ }), 'name');
+
+ const newBoard = Boards.findOne(boardId);
+ const newBoardLabels = newBoard.labels;
+ const newCardLabels = _.pluck(_.filter(newBoardLabels, (label) => {
+ return _.contains(oldCardLabels, label.name);
+ }), '_id');
+
const oldId = this._id;
+ const oldCard = Cards.findOne(oldId);
+
delete this._id;
+ delete this.labelIds;
+ this.labelIds= newCardLabels;
+ this.boardId = boardId;
+ this.swimlaneId = swimlaneId;
+ this.listId = listId;
const _id = Cards.insert(this);
+ // Copy attachments
+ oldCard.attachments().forEach((att) => {
+ att.cardId = _id;
+ delete att._id;
+ return Attachments.insert(att);
+ });
+
// copy checklists
Checklists.find({cardId: oldId}).forEach((ch) => {
+ // REMOVE verify copy with arguments
ch.copy(_id);
});
@@ -286,11 +314,13 @@ Cards.helpers({
Cards.find({parentId: oldId}).forEach((subtask) => {
subtask.parentId = _id;
subtask._id = null;
+ // REMOVE verify copy with arguments instead of insert?
Cards.insert(subtask);
});
// copy card comments
CardComments.find({cardId: oldId}).forEach((cmt) => {
+ // REMOVE verify copy with arguments
cmt.copy(_id);
});
diff --git a/models/lists.js b/models/lists.js
index d76c961c..a8e597ee 100644
--- a/models/lists.js
+++ b/models/lists.js
@@ -137,12 +137,15 @@ Lists.allow({
});
Lists.helpers({
- copy(swimlaneId) {
+ copy(boardId, swimlaneId) {
const oldId = this._id;
const oldSwimlaneId = this.swimlaneId || null;
+ this.boardId = boardId;
+ this.swimlaneId = swimlaneId;
+
let _id = null;
existingListWithSameName = Lists.findOne({
- boardId: this.boardId,
+ boardId,
title: this.title,
archived: false,
});
@@ -160,11 +163,7 @@ Lists.helpers({
listId: oldId,
archived: false,
}).forEach((card) => {
- card.type = 'cardType-card';
- card.listId = _id;
- card.boardId = this.boardId;
- card.swimlaneId = swimlaneId;
- card.copy();
+ card.copy(boardId, swimlaneId, _id);
});
},
diff --git a/models/swimlanes.js b/models/swimlanes.js
index a3427fc6..1b18ba5d 100644
--- a/models/swimlanes.js
+++ b/models/swimlanes.js
@@ -101,8 +101,10 @@ Swimlanes.allow({
});
Swimlanes.helpers({
- copy(oldBoardId) {
+ copy(boardId) {
const oldId = this._id;
+ const oldBoardId = this.boardId;
+ this.boardId = boardId;
delete this._id;
const _id = Swimlanes.insert(this);
@@ -118,8 +120,8 @@ Swimlanes.helpers({
Lists.find(query).forEach((list) => {
list.type = 'list';
list.swimlaneId = oldId;
- list.boardId = this.boardId;
- list.copy(_id);
+ list.boardId = boardId;
+ list.copy(boardId, _id);
});
},
diff --git a/package.json b/package.json
index 300a52a0..81916a54 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wekan",
- "version": "v2.29.0",
+ "version": "v2.31.0",
"description": "Open-Source kanban",
"private": true,
"scripts": {
diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp
index 0d7064c5..e1ea4b81 100644
--- a/sandstorm-pkgdef.capnp
+++ b/sandstorm-pkgdef.capnp
@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "Wekan"),
# The name of the app as it is displayed to the user.
- appVersion = 231,
+ appVersion = 233,
# Increment this for every release.
- appMarketingVersion = (defaultText = "2.29.0~2019-02-27"),
+ appMarketingVersion = (defaultText = "2.31.0~2019-02-28"),
# Human-readable presentation of the app version.
minUpgradableAppVersion = 0,