Commit Graph
8 Commits
Author SHA1 Message Date
Lauri Ojansivu ccfa6cf362 Import and export mail, calendars, chats and notes: mbox/.eml, iCalendar, Google Takeout, Slack, Mattermost, Telegram, WhatsApp, Discord, Evernote.
The Import page reads nine more kinds of export, each into the view it
is for: mail (mbox, .eml) as cards of Board View / Email, one per
conversation with the replies as comments; an .ics file's tasks by
status and its events, with their dates; a Google Takeout .zip as one
board with a swimlane per product (Mail, Tasks, Keep, Calendar, Google
Chat); a Slack workspace export, a Mattermost bulk export, Telegram
Desktop's JSON, a WhatsApp chat .txt and a DiscordChatExporter JSON as
channels whose messages are comments, for Board View / Chat; and an
Evernote .enex as notes with their to-dos as checklists. The Export menu
writes a board as an .mbox, an .enex and a Mattermost bulk import file,
each read back by the same import.

MIME is decoded with mailparser and ENEX with htmlparser2 on the server,
and the zips are read under the zip-bomb guards of the other zip imports.
An imported message's Message-IDs pass the import sanitizer without
their brackets, so a later reply to the board joins the thread. The
instructions of the nine are translated into every language. TODO.md
also gets the next items: grouped menus, large-file import and export,
and the reports to add.

Thanks to xet7 !
2026-11-20 05:03:27 +02:00
Lauri Ojansivu b7589737f5 File docs/Features the way the WeKan menus are.
A feature's guide now sits under the menu it is used from, read from the
templates rather than from where somebody once put it: Header-Bar,
All-Boards, Pages, Board-Header (search and every Board View), Board-Sidebar
(Board Settings, Filter, Members, Labels, Archive), Rules, Swimlanes, Lists,
Cards, Member-Settings, Admin-Panel and Login-Page. Topics used from several
menus (editor, history, theme, translations, email, troubleshooting) are in
General.

- Each area has a README mapping its menu entries to their guides and to the
  template or server module that implements them. Board-Header/README.md
  lists all 40 Board View entries with the template boardBody.jade renders;
  five views (Table, Calendar Mode, Time, Timeline, Map) have no guide of
  their own yet and say so.
- Board-View.md listed 25 views while BOARD_VIEWS has 40; it now lists all
  of them with their English labels.
- Pages keep their file names. Where a released changelog links an old path,
  a "# Moved" page stays there and points to the new one; test-menu.sh skips
  folders holding only those.
- Undo was filed under Login; it is General/Undo now.
- Every link in docs, code comments, scripts and tests follows the move;
  docsLinksResolve checks them all.

Tests that read a doc follow it to its new place. boardViewSettings now fails
when Board-View.md or Board-Header/README.md differs from BOARD_VIEWS, or
names a template boardBody.jade does not render.

Thanks to xet7 !
2026-10-16 23:45:35 +03:00
Lauri Ojansivu 46e30f01e4 Import: Planka, Microsoft To Do, KanbanFlow, Basecamp, Google Tasks and Google Keep from their APIs.
Decided on 2026-10-14. On the import page each of the six asks for what
its service needs - a self-hosted Planka its address, username and
password; the others an access token (Basecamp also its account id) -
lists what that account can import, and fetches the chosen board, list
or project. The credentials go with each call and are used for that
call's requests only; they are never stored or logged, and the page
clears secret fields once a fetch has used them. The fetched JSON fills
the import text box and the import goes on as for a pasted export: the
service's parser (models/lib/<key>ApiFormat.js) into the generalized
importer, with the members step and the loss report. The same JSON can
be pasted, or posted to POST /api/boards/import/<key>.

- server/apiImport.js: apiImportList and apiImportFetch, signed in only,
  off with the Admin Panel's import switch, not in Sandstorm, rate
  limited; credentials checked against the service's own fields
  (models/lib/apiImportServices.js).
- server/lib/apiImportRequest.js: every request through the SSRF guard -
  pinned address, no redirects, bounded in time and size - so a Planka
  address cannot point the server at its own network; an administrator
  can allow such a host with API_IMPORT_ALLOWED_PRIVATE_HOSTS. An error
  names only the origin and the status.
- models/lib/apiImport/<key>.js: each service's client, plain Node with
  the request injected, paging bounded and the token only in a header.
- Each has a docs page under docs/Features/ImportExport/, listed in the
  coverage index and External-Tools.md.

Tests: tests/<key>ApiImport.test.cjs (client with a fake request, every
parsed field, wrong shapes), tests/apiImport.test.cjs (credentials, the
gate, the wiring, the shapes refused), api-import.e2e.js (the form for
every service, fetched JSON imported through the page, refusals incl. a
private address). Live tests, read only, run from build.sh / build.bat ->
Tests -> Live tests with your own accounts (releases/live-tests/README.md);
they were not run here. New strings translated in all locales.

Also: the release risk baseline allows the services' API addresses, and
the guards that count import creators, list the import sources and pin
the platform fetch() calls know the new ones.

Thanks to xet7 !
2026-10-14 22:57:15 +03:00
Lauri Ojansivu 88d00e02f1 Export boards to Trello, keep swimlanes as labels, and reach Trello from Sandstorm.
Export to Trello: Board Settings -> Export -> Trello creates the board in
Trello through its API with the saved key and token: labels, lists, cards,
checklists, comments, attachment files, and archived lists and cards. It
runs as a server job from the board export, with the same access check.

Swimlanes: Trello has none, so each swimlane is exported as a label named
"Swimlane: <title>". The Swimlanes by Blue Cat Power-Up groups Trello cards
into rows by label, and every Trello import turns those labels back into
swimlanes.

Sandstorm: a grain has no network of its own. Allow access to Trello opens
the Sandstorm Powerbox for https://api.trello.com/1, like the Sandstorm
WordPress app reaches wordpress.org; the access token is kept per user on
the server, and Trello import and export go through the bridge proxy.

Thanks to xet7 !
2026-10-13 14:20:56 +03:00
Lauri Ojansivu 5ec6d9af18 Fix the code scanning and Dependabot alerts of 2026-10-10.
- Markdown links from imported files (CodeQL #555): Plane escaped [ and ]
  in a link title but not backslash, so a title ending in "\" ran on into
  the URL, and its URL went through encodeURIComponent, which leaves ( and )
  as they are, so a ")" ended the link early and the rest became a second
  link. ClickUp, Super Productivity and Vikunja wrote links the same way.
  All four now use models/lib/markdownLink.js, which escapes the title and
  percent-encodes what ends or breaks a destination.
- A replacement of a space with itself in a test (CodeQL #554), where a
  regular-expression escape was meant. tests/noIdentityReplacement.test.cjs
  now also finds the regular-expression form of an identity replacement.
- The vendored @wekanteam/exceljs (CodeQL #556-#558, Dependabot #137-#142):
  sheet names are read without a backtracking regular expression, the
  manual test pages pin their CDN script with Subresource Integrity, and
  brace-expansion is 5.0.12. Same change as the fork, .tools/exceljs
  25db789. The vendored jade's dev tools also had brace-expansion 5.0.6.

tests/securityAlerts20261010.test.cjs pins each, and the shape of each
across the tree.

Thanks to GitHub CodeQL, dependabot and xet7 !
2026-10-10 00:45:30 +03:00
Lauri Ojansivu c80a656901 Read every import source through one path and one file chooser, from one description of the sources.
models/lib/importSources.js describes every import source once: its name,
which files its chooser accepts, whether its export can be pasted, what a
file is sent as, whether a .zip is one export of the tool, and which
importer creates the board. The import page's list of sources, its file
chooser and its text box, "Import many boards" and the test of api.py's
lists all read it.

The page had a branch per source - one each for Excel and the four other
workbook tools, Vikunja, Notion, Plane, the text formats, CSV, Trello's and
WeKan's files - each reading its file its own way, and four file choosers.
It now has one: the chosen file is read by the reader "Import many boards"
uses, or the pasted text is read, then only the steps a source really has of
its own run (the column mapping of CSV and Excel, the empty-export check of
WeKan, Jira's estimate field, Trello's workspace, Taiga's slimming), then the
people step every source shares. Kanboard's people come from the server's
parser like every generalized source's, so its own client mapper is gone.
Every source can now be chosen as a file, not only pasted.

Thanks to xet7 !
2026-10-09 13:13:37 +03:00
Lauri Ojansivu 7858d84e12 Import and export many boards at once for every format, and document each format in its own directory.
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 !
2026-10-09 10:33:37 +03:00
Lauri Ojansivu 2ea4d09678 Document every import and export format WeKan supports.
docs/Features/ImportExport/External-Tools.md listed ten tools while WeKan
reads and writes more than fifty. It now lists every tool and file, grouped
into project and task tools, issue trackers, plain text and outlines, and
WeKan's own formats: where in each tool to get the file, what WeKan writes
back, and which tools are not supported yet and why. The README's import and
export lists link to it and name the Wrike workflow, the Board Settings
export page points to it and to the Wrike workflow, and the historical
wishes in Sync.md say which have been done since.

tests/importExportDocsCoverage.test.cjs fails when a source on the import
page or a format in the export menu is missing from the page, so it cannot
go stale again.

Thanks to xet7 !
2026-10-09 09:48:54 +03:00