Commit Graph
3 Commits
Author SHA1 Message Date
Lauri Ojansivu a2257442a8 Teamwork and Planner workbooks are written a page of cards at a time with ExcelJS's streaming writer.
The workbook exports were built whole, as an ExcelJS workbook in memory.
Teamwork's and Planner's are now written to the response by
ExcelJS.stream.xlsx.WorkbookWriter, each row committed as it comes
(server/lib/renderExternalExport.js STREAMED_WORKBOOKS), every page's rows
through the export boundary as the whole workbook's are.

Teamwork's rows are a task tree: its order and each card's depth are
planned over the whole board from the light first pass (teamworkPlan,
teamworkPageOrder), the pages come in that order, and each page writes its
own rows. Planner's rows stand on their own: its head on the first page,
each card's row after it.

tests/workbookStream.test.cjs checks every page size against the whole
sheet, and that the streamed workbook reads back - and is read by
Teamwork's own parser - as the whole one; the import/export audit (173)
and the admin-only custom field specs (12) pass.

Thanks to xet7 !
2026-11-20 11:21:50 +02:00
Lauri Ojansivu 73db241bd4 Choose who an import's people become, for every import, and stream imported attachments.
Every import page now asks once what the people named in the file become
(models/lib/importMembersMode.js): existing users chosen in the map-members
step, placeholder users that keep the original username and name and cannot
log in, to be mapped to real users later, or all the person importing. All
five creators read the same mapping. The generalized importer, which used to
drop people nobody mapped, now makes placeholders for them, as Trello and
WeKan imports do, and offers its people for mapping by reading the file with
the same parser (importBoard with previewPeople, which creates nothing).
Import many boards offers placeholders or the importer. The REST import, the
WeKan .zip route and the Trello route take the mode too.

A WeKan .zip imported as a new board no longer puts its attachment files
inline in memory within a 512 MB budget: the full-board importer streams each
from the archive into storage, as the import into an existing board does.
Both, and the Trello importer when given a stream, go through one helper
(server/lib/importAttachmentStream.js) that holds every imported attachment
to the Admin Panel's upload limit and to none when none is set, skipping a
file whose stated size is over it and stopping one that grows past it.

The import page instructions name Jira's current search (GET
/rest/api/3/search/jql with fields=*all, paged by nextPageToken), Todoist's
Manage data > Export as CSV and Planner's Export as Excel.

Thanks to xet7 !
2026-10-09 12:20:36 +03:00
Lauri Ojansivu 7ef5b875fa Import and export boards as Microsoft Planner Excel workbooks.
Planner's "Export plan to Excel" writes one sheet, Tasks: plan name, plan
ID and export date on rows 1-3, then Task ID, Task Name, Bucket Name,
Progress, Priority, Assigned To, Created By, the created, start, due and
completed dates, Late, Completed By, Description, Completed Checklist
Items, Checklist Items and Labels. Columns are matched by name, as newer
exports add Is Recurring. Buckets become lists and tasks cards, with the
Task ID as source reference, the ;-separated assignees as owner and
assignees, Created By as Requested by, the checklist and labels, and
Progress, Priority and Completed By as custom fields. Dates are text in
the exporting user's locale: day/month order is decided for the whole
file, and reported when every date could be read either way; date cells
keep their day. Which checklist items were done (Planner exports only a
count), a recurring task's repeat and unknown values are reported.
Export writes the same workbook as .xlsx.

The layout follows a real Planner export, the MIT-licensed test data of
the plannr package, added under tests/fixtures/planner/ with its
licence. tests/plannerFormat.test.cjs imports it, round-trips an export
through ExcelJS and covers the negatives; Playwright cases import the
file through the page and download the export. New instruction text is
in English, pending Transifex.

Thanks to xet7 !
2026-10-08 20:48:39 +03:00