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 !
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 !
An import that stopped halfway - a restart, a hung writer, a failure - left a
partial board nothing recorded. Each board import, copy, Trello zip and
Trello API import now writes an importRuns record first, with the id its new
board will have; every creator inserts the board with that id and the run's
id stamped on it. A heartbeat keeps the run alive; the method deadline now
stops the writer at its next step. A scan at startup and every 5 minutes
flags a stopped or failed run once and records it in Admin Panel ->
Problems -> Recovery, where an administrator keeps the partial board or
discards it: only the board carrying the run's stamp is removed, through the
board's own removal, then whatever else has its id. Discard is refused while
the import's Scrum stage is still written or recovered, and the Scrum resume
is refused while the import is discarded. Resume is deliberately not
offered: the source file is not kept, for its size, its personal data and
the anonymization it would undo; discard and import again instead.
Thanks to xet7 !
Wire organization bulk controls, preserve Jira ADF descriptions and activity-independent attachments, skip empty CSV rows, and reject invalid source shapes. Apply the import-disable switch and shared transfer validation to Trello HTTP imports.
Add documented dummy format fixtures, positive and negative browser checks, menu inventory guards, and an implementation audit with explicit coverage and format limitations. Thirty new Chromium checks and the corrected cross-board move regression pass on macOS ARM64 with FerretDB; focused Node suites pass.
Thanks to xet7.
Fix TypeError: string.toLowerCase is not a function server unhandledRejections
reported in production. The registration invitation-code check in
Users.after.insert() read doc.authenticationMethod.toLowerCase() unguarded,
but authenticationMethod is only set for oauth2/ldap signups - a normal
password/invitation signup left it undefined and crashed this hook on every
insert whenever disableRegistration was on; doc.emails[0].address was also
read unguarded. The buffered notification-email sender likewise read
user.emails[0].address.toLowerCase() unguarded, crashing when a user (e.g. a
header-auth/LDAP account) has an empty emails array. The CSV/TSV importer's
header-row mapping read headerRow[i].toLowerCase() unguarded, which could
throw on a sparse row cell that isn't a string.
A full audit of every server-reachable .toLowerCase() call site (server/,
models/, packages/) found the rest already guarded (typeof checks, ||
'' fallbacks, or values sourced from validated schema fields).
Thanks to xet7 !
The existing "Dropdown" custom field type only ever stored one selected
option. Add "dropdownMultiSelect" (models/customFields.js), reusing the
exact same settings.dropdownItems option-list definition mechanism and its
Board Settings editing UI (client/components/sidebar/sidebarCustomFields.js/
.jade) - only the value stored on a card differs: an array of selected item
ids instead of a single one.
On a card, the new type renders as a checkbox list (reusing the app's
existing toggle-checkbox interaction rather than a <select multiple>), and
its value round-trips through Cards.setCustomField() the same way
stringtemplate's own array value already does
(client/components/cards/cardCustomFields.js/.jade).
models/lib/customFieldsWD.js's resolveTrueValue() now resolves a
dropdownMultiSelect's array of ids to the matching item NAMES, joined for
display, so every place that already read a dropdown's trueValue (the
minicard badge, the CSV/PDF/Excel exporters) shows the new type correctly
without further changes there. The CSV/PDF/Excel exporters and csvCreator's
CSV header/definition parsing are updated to resolve
dropdownMultiSelect's array-of-ids the same way the single-select dropdown
already resolves its single id.
Thanks to huma2000 and xet7 !
Closes#4166,