Import single card: archived card

This commit is contained in:
Xavier Priour 2015-10-14 12:15:52 +02:00 committed by Maxime Quandalle
parent 68518f5497
commit 7e64c22c1a
2 changed files with 4 additions and 2 deletions

View file

@ -65,6 +65,7 @@ Template.listImportCardPopup.events({
boardId: this.boardId, boardId: this.boardId,
userId: Meteor.userId(), userId: Meteor.userId(),
sort: sortIndex, sort: sortIndex,
archived: data.closed,
}; };
// 3. map labels // 3. map labels
data.labels.forEach((current) => { data.labels.forEach((current) => {

View file

@ -194,8 +194,9 @@ Cards.mutations({
Cards.before.insert((userId, doc) => { Cards.before.insert((userId, doc) => {
doc.createdAt = new Date(); doc.createdAt = new Date();
doc.dateLastActivity = new Date(); doc.dateLastActivity = new Date();
if(!doc.hasOwnProperty('archived')){
doc.archived = false; doc.archived = false;
}
if (!doc.userId) { if (!doc.userId) {
doc.userId = userId; doc.userId = userId;
} }