mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Try to fix Trello import Attachment and links not defined.
Thanks to akhudushin, hatl, 2447254731 and xet7 ! Fixes #4418
This commit is contained in:
parent
e7a11c5733
commit
5eca3de00f
1 changed files with 17 additions and 13 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
import Attachments from "./attachments";
|
||||||
|
|
||||||
const DateString = Match.Where(function(dateAsString) {
|
const DateString = Match.Where(function(dateAsString) {
|
||||||
check(dateAsString, String);
|
check(dateAsString, String);
|
||||||
return moment(dateAsString, moment.ISO_8601).isValid();
|
return moment(dateAsString, moment.ISO_8601).isValid();
|
||||||
|
|
@ -452,20 +454,22 @@ export class TrelloCreator {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (links.length) {
|
if (links !== undefined) {
|
||||||
let desc = cardToCreate.description.trim();
|
if (links.length !== undefined) {
|
||||||
if (desc) {
|
let desc = cardToCreate.description.trim();
|
||||||
desc += '\n\n';
|
if (desc) {
|
||||||
|
desc += '\n\n';
|
||||||
|
}
|
||||||
|
desc += `## ${TAPi18n.__('links-heading')}\n`;
|
||||||
|
links.forEach(link => {
|
||||||
|
desc += `* ${link}\n`;
|
||||||
|
});
|
||||||
|
Cards.direct.update(cardId, {
|
||||||
|
$set: {
|
||||||
|
description: desc,
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
desc += `## ${TAPi18n.__('links-heading')}\n`;
|
|
||||||
links.forEach(link => {
|
|
||||||
desc += `* ${link}\n`;
|
|
||||||
});
|
|
||||||
Cards.direct.update(cardId, {
|
|
||||||
$set: {
|
|
||||||
description: desc,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.push(cardId);
|
result.push(cardId);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue