Commit Graph
2 Commits
Author SHA1 Message Date
Lauri Ojansivu 5b9fa791a8 CSV, TSV and Excel imports keep every column: one with no card field becomes a text custom field.
A column the header guess had no field for - "Story points", "Sprint", any
column of the user's own - was imported only when ticked in the import
page's mapping step, and dropped without a word otherwise: always for a REST
import, which sends no mapping, and on the page unless someone ticked it.
guessCsvMapping now puts every other named column in customFieldColumns,
and the mapping step starts with them ticked, so nothing is left behind
unless it is unticked. WeKan's own Number, Last activity and Voting columns,
a blank header and a number cell of a sparse row (#6620) are not made fields.

tests/csvCreator.headerMapping.test.cjs pinned "unknown headers are not
mapped" and now pins that the column comes across, with the negative cases.

Thanks to xet7 !
2026-11-20 17:14:37 +02:00
Lauri Ojansivu 86652c8718 Ask for the columns of a CSV or Excel import, apply Owner, and import WeKan's own Excel export.
A CSV, TSV or Excel import now shows which column is which card field
before importing, pre-filled from the header names - English names and
WeKan's own export column names in every language - and asks for what is
missing: a file with no list column gets one list, named on the page,
instead of one list per row. Unused columns can be kept as text custom
fields. The choice goes to the server as csvMapping, checked before
anything is written, and the REST import and api.py take one too.

The Owner column is applied, as are swimlane, received date, parent card,
spent time, overtime and archived. A TSV value containing a comma stays one
value. A dropdown custom field value that is not one of its items is skipped
instead of failing the import.

An Excel workbook is read sheet by sheet, its header found in row 1 or where
WeKan's export puts it, in any language; formula cells are read as their
results and rich text as text. WeKan's own Excel export imports, and a
workbook with many boards - each on its own sheet, as Export all boards
writes it - imports as many boards; the Activity sheet is skipped.

Thanks to xet7 !
2026-10-09 12:52:21 +03:00