{"id":5316,"date":"2017-09-24T18:25:15","date_gmt":"2017-09-24T15:25:15","guid":{"rendered":"http:\/\/mummila.net\/kommentit\/?p=5316"},"modified":"2017-09-24T18:25:15","modified_gmt":"2017-09-24T15:25:15","slug":"import-from-trello-fails-if-the-board-has-a-loose-checklist","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2017\/09\/24\/import-from-trello-fails-if-the-board-has-a-loose-checklist\/","title":{"rendered":"Import from Trello fails if the board has a loose checklist"},"content":{"rendered":"<p><strong>Impacted version<\/strong>: 0.39<\/p>\n<p><strong>Server Setup Information<\/strong>:<\/p>\n<ul>\n<li>Operating System: Ubuntu 16.04<\/li>\n<li>Deployment Method: snap<\/li>\n<li>ROOT_URL environment variable (Is there a subfolder?):\u00a0<a href=\"http:\/\/localhost:5000\/\">http:\/\/localhost:5000<\/a><\/li>\n<\/ul>\n<p><strong>Steps to reproduce<\/strong>:<\/p>\n<ol>\n<li>Create a board in Trello.<\/li>\n<li>Create a list in the board.<\/li>\n<li>Create a card in the list.<\/li>\n<li>Create a checklist in the card.<\/li>\n<li>Archive the list.<\/li>\n<li>Copy the board.<\/li>\n<li>Export the new copy as JSON.<\/li>\n<li>In Wekan, initiate a Trello import.<\/li>\n<li>Map the user.<\/li>\n<\/ol>\n<p><strong>What I expect to happen<\/strong>:<br \/>\nFor the board to be imported in Wekan.<\/p>\n<p><strong>What happens<\/strong>:<br \/>\nThe importer reports a &#8217;400&#8217;.\u00a0<code>journalctl -u snap.wekan.wekan.service<\/code>\u00a0reports<\/p>\n<pre><code>Exception while invoking method 'importBoard' Error: Card id is required\r\n    at getErrorObject (packages\/aldeed_collection2-core.js:480:15)\r\n    at [object Object].doValidate (packages\/aldeed_collection2-core.js:462:13)\r\n    at [object Object].Mongo.Collection.(anonymous function) [as insert] (packages\/aldeed_collection2-core.js:214:25)\r\n    at packages\/matb33_collection-hooks.js:127:46\r\n    at [object Object]._.extend.withValue (packages\/meteor.js:1122:17)\r\n    at Object.directOp (packages\/matb33_collection-hooks.js:47:27)\r\n    at Object.self.direct.(anonymous function) [as insert] (packages\/matb33_collection-hooks.js:126:30)\r\n    at models\/trelloCreator.js:408:45\r\n    at Array.forEach (native)\r\n    at TrelloCreator.createChecklists (models\/trelloCreator.js:400:22)\r\n    at TrelloCreator.create (models\/trelloCreator.js:608:10)\r\n    at [object Object].Meteor.methods.importBoard (models\/import.js:27:20)\r\n    at packages\/check.js:130:16\r\n    at [object Object]._.extend.withValue (packages\/meteor.js:1122:17)\r\n    at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages\/check.js:129:41)\r\n    at maybeAuditArgumentChecks (packages\/ddp-server\/livedata_server.js:1734:18)\r\nSanitized and reported to the client as: Card id is required [400]\r\n<\/code><\/pre>\n<p>I&#8217;m attaching the\u00a0<a href=\"https:\/\/github.com\/wekan\/wekan\/files\/1327413\/loose-checklist.json.txt\">failing JSON<\/a>.<\/p>\n<p>To be fair, I think the blame here mostly lies with Trello: it does not preserve archived lists when copying a board (you won&#8217;t find them from archived lists view in the copy), but for some reason it\u00a0<em>does<\/em>\u00a0carry the checklists contained in those lists over, and they then pop up in the export file.<\/p>\n<p>Wekan&#8217;s &#8221;Card id is required&#8221; error is slightly misleading here though: I think the problem isn&#8217;t a missing card ID, but the fact that the parent card referenced by the checklist does not come with the export.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The importer reports a &#8217;400&#8217;. journalctl -u snap.wekan.wekan reports &#8221;Exception while invoking method &#8217;importBoard&#8217; Error: Card id is required&#8221;.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8860],"tags":[14041,14042],"class_list":["post-5316","post","type-post","status-publish","format-standard","hentry","category-vianhallintajarjestelmat","tag-trello","tag-wekan","sijainti-github"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/comments?post=5316"}],"version-history":[{"count":3,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5316\/revisions"}],"predecessor-version":[{"id":5320,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5316\/revisions\/5320"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=5316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=5316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=5316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}