Import many boards: on the import page of every source, several export files, or one .zip holding them, each become their own board through the same path a single import of that file takes, and the page lists what each file became (models/lib/importManyFiles.js). A .zip that is itself one export (Vikunja, Notion, Plane, WeKan with attachments) stays one board. One board per project: for the generalized importer, each swimlane the import would make - a project, folder or list of the tool - becomes its own board (models/lib/importSplit.js), so an export of a whole app imports as many boards, as a Trello .zip does. Kanri's all-data export now reads every board, not only the first, so it splits into one board per Kanri board. Export all boards: All Boards sidebar, or Multi-Selection for the selected boards, downloads every board the user may export in one format, each checked as its own export is. Excel is one workbook with a sheet per board, named after the board; every other format is a .zip with one file per board (server/routes/exportAllBoards.js). The per-format bytes are made in one place, server/lib/renderExternalExport.js, for the board route and this. A WeKan .zip export imports as a new board from All Boards, unpacked on the server with its attachments (it was refused in the browser). api.py gains importboardsfrom and exportallboards, sends every source in the shape the import page sends, and fetches Excel, PDF, CSV and TSV exports from their own routes and writes them as bytes. Fixed while documenting: a Trello Butler rule's list name kept its case, so the rule fires; the HTML export fetches the board JSON by URL instead of a link the export popup no longer has; Tasks.org exports time spent; Nextcloud Deck's done flag marks the due date done. docs/Features/ImportExport has a directory per format with the steps to import and export it, one board and many, and its details, moved from Format-Coverage.md, which is now the index and the shared contract. tests/importExportDocsCoverage.test.cjs fails when a format has no page. Thanks to xet7 !
8.5 KiB
Taskwarrior
WeKan imports and exports a board as Taskwarrior's
JSON: what task export writes and task import reads. A task's status
decides its list, project and priority become labels, annotations become
comments, and depends becomes blocked-by dependencies. WeKan adds two
attributes of its own so list names and descriptions survive a round trip.
How to import
-
Export the tasks from Taskwarrior into a file:
task export > tasks.jsontask exporttakes a filter, for exampletask project:Home export. It writes a JSON array, or one task per line whenrc.json.array=offis set (and in older versions); WeKan reads both. -
In WeKan, go to All Boards → New → Import → Taskwarrior.
-
Open
tasks.jsonin a text editor, copy all of it and paste it into the text box. -
Click Import.
-
Read the loss report on the import page. It is also kept in Admin Panel → Problems → Recovery.
How to import many boards at once
- On the import page, choose Taskwarrior, then under Import many
boards choose several
.jsonfiles, or one.zipthat holds them. - Each file becomes its own board. The boards are imported without member mapping; members can be mapped later.
Taskwarrior is imported through the generalized importer
(models/kanboardCreator.js via EXTERNAL_PARSERS in
models/lib/externalParsers.js), so the page also has a checkbox One board
per project: each swimlane the import would create becomes its own board,
named after that swimlane. A Taskwarrior import puts every card in the
swimlane Default (a task's project becomes a label, not a swimlane), so
for Taskwarrior the option makes no difference.
Links between cards that end up on different boards are reported in the loss
report rather than kept. This applies to depends: a task that depends on a
task in another file is reported, because the other task is not part of the
same import.
From a script:
python3 api.py importboardsfrom taskwarrior FILE_OR_DIR ...
Each argument is a file, a directory of files, or a .zip file.
How to export
-
In WeKan, open the board, then Board Settings → Export.
-
Choose what to include, then under JSON choose Taskwarrior. The board downloads as
<board>.json. -
In Taskwarrior, import the file:
task import board.jsonTaskwarrior identifies tasks by their UUID, so importing the same export again updates those tasks instead of adding new ones.
The Taskwarrior entry is offered for a whole board only, not for a swimlane or a list.
How to export all boards at once
- In WeKan, go to All Boards, open the sidebar and choose Export all boards, then Taskwarrior.
- One
.zipdownloads, with one file per board you can export: boards you are a member of that are not archived and not templates.
To export only some boards, use Multi-Selection in the All Boards sidebar, select the boards, then Export.
From a script:
python3 api.py exportallboards taskwarrior boards.zip
Format details
The format is the Taskwarrior task format
that task export writes and task import reads: a JSON array, or one object
per line from older versions.
What the import must cover:
- the description, and the status: completed to Done, waiting to Waiting, started to In Progress;
projectandpriorityas labels, and tags;- the entry, due, scheduled and end dates;
- annotations as comments, and
dependsas blocked-by dependencies by uuid; - WeKan's
wekanlistandwekandescriptionattributes keep lists and descriptions across a round trip; - deleted tasks, recurring templates and unmapped attributes are reported;
- Taskwarrior has no members.
What the current code does (models/lib/taskwarriorFormat.js):
- The list is
wekanlistwhen set. Otherwise: completed → Done, waiting → Waiting, pending with astarttime → In Progress, other → To Do. projectbecomes the labelproject:<name>, and priority H, M or L the labelpriority:H(and so on). Tags become labels.- Dates are read in Taskwarrior's own form (
20260901T120000Z) or as ISO dates. The end date is kept only for a completed task. - An annotation becomes a comment with the annotation's date.
uuidis the id thatdependsrefers to. A dependency becomes an "is blocked by" link to that card.id,urgency,modified,mask,imaskandstartare computed or bookkeeping attributes, and are not imported or reported.- The board is called "Imported Taskwarrior".
- Limit: 10,000 tasks.
- Every card goes to the swimlane Default.
What the export writes (formatTaskwarrior in the same module), one task per
card, as a JSON array:
uuid: a UUID made from the card's id, so the same card always gets the same uuid;status:completedwhen the list's name looks finished (contains "done", "closed", "complete", "archiv" or "finished"), otherwisepending;description: the card title;entry(creation date),due,scheduled(start date), andend(end date, for a completed task);projectfrom a labelproject:<name>,priorityfrom a labelpriority:H,MorL, and the other labels astags(spaces become_);- comments as
annotations, written asauthor: text; wekanlist(the list) andwekandescription(the description).
Taskwarrior keeps attributes it does not know, such as wekanlist, as
orphaned UDAs, so they come back when the tasks are exported again. Archived
cards and archived lists are not exported.
What is kept
| Taskwarrior | WeKan |
|---|---|
description |
Card title |
status (with start) |
List: Done, Waiting, In Progress or To Do |
wekanlist |
List |
wekandescription |
Card description |
project |
Label project:<name> |
priority H / M / L |
Label priority:H / M / L |
tags |
Labels |
entry |
Creation date |
due |
Due date |
scheduled |
Start date |
end (completed task) |
End date |
annotations |
Comments |
depends (by uuid) |
"Is blocked by" dependencies |
What is not kept
The import reports these on the loss report:
- a deleted task (it is not imported);
- a recurring task's template (its instances are ordinary tasks, and are imported);
- every other attribute WeKan has no place for, such as
until,wait,recuror user defined attributes; - an
entry,due,scheduledorendvalue that is not a date; - an entry that is not a task object;
- a
dependsuuid that is not one of the imported tasks.
The Taskwarrior export does not write dependencies (depends), checklists,
members, custom fields, swimlanes or attachments, and every task that is not
completed is written as pending.
REST API
python3 api.py importboardfrom taskwarrior tasks.json # POST /api/boards/import/taskwarrior
python3 api.py importboardsfrom taskwarrior FILE_OR_DIR ... # several boards
python3 api.py exportboardformat BOARDID taskwarrior tasks.json
python3 api.py exportallboards taskwarrior boards.zip
The HTTP routes:
POST /api/boards/import/taskwarriorwith the file's text asboard;GET /api/boards/:boardId/export/taskwarrior?authToken=…returns the file asapplication/json;GET /api/export-all-boards/taskwarrior?authToken=…returns the.zip; add&boardIds=ID1,ID2for only those boards.
How it is built and tested
models/lib/taskwarriorFormat.jsreads and writes the JSON.models/import.jssends the text to the parser, andmodels/kanboardCreator.jscreates the board and its dependencies.tests/taskwarrior.test.cjsis the unit test of the round trip.tests/importLossReport.test.cjscovers the loss report.- The Playwright cases are in
tests/playwright/specs/import-export-format-audit.e2e.js: "Taskwarrior: tasks import with their list, labels, dates, annotations and dependencies", and the export menu link for every format.
Sources
- Taskwarrior task format: the attributes and their values
- Taskwarrior: export:
task export, its filter andjson.array - Taskwarrior man page:
task import [<file> ...], which adds or updates tasks by UUID
See also: format coverage, all formats.