Commit Graph
107 Commits
Author SHA1 Message Date
Lauri Ojansivu b0803ffeaa Import Jira sprints, fix versions, rank and epic links as Scrum planning data.
The Sprint, Rank and Epic Link fields are found by their schema type, or
by name when the export has no schema, never by customfield number.
Future and active sprints become planned WeKan sprints with their goals
and dates. An active sprint is reported, because the export has no
commitment snapshot. Closed sprints are reported, not invented. Fix
versions become releases. Jira's rank orders the backlog, and a legacy
Epic Link becomes the card's parent. The data is written as a native
Scrum import, and these fields are no longer also imported as text
custom fields.

Thanks to xet7 !
2026-10-02 19:21:24 +03:00
Lauri Ojansivu f0323140f6 Import and export boards as Taskwarrior JSON.
Taskwarrior's task export / task import JSON is the task format of the
Taskwarrior command line tool, and WeKan read and wrote neither. It now
imports from the import picker, as a JSON array or one task per line as
versions before 2.4 write it, and exports from the board's export menu.
A completed task goes to Done, a waiting one to Waiting and a started one
to In Progress; project and priority become labels, tags become labels,
entry, due, scheduled and end become dates, annotations become comments
and depends becomes blocked-by dependencies resolved by uuid. WeKan's
wekanlist and wekandescription attributes, which Taskwarrior keeps as
orphaned UDAs, carry list names and descriptions across a round trip.
Deleted tasks, recurring templates, bad dates and unmapped attributes are
reported in the loss report instead of guessed.

tests/taskwarrior.test.cjs covers the mapping, both input shapes, the
round trip and the negatives; the format guards learn the new format and
a Playwright case imports a Taskwarrior export through the page. The new
instruction text is in English, pending translation.

Thanks to xet7 !
2026-10-02 15:53:14 +03:00
Lauri Ojansivu 2172f19d88 Fix SyncBleed: send List Sync requests through the SSRF guard and keep responses out of errors.
GHSA-5q84-p3vr-f3xv: a board member with write access chooses the List Sync
server URL for Gitea, Forgejo, GitLab and Jira. It was fetched with the
platform fetch(), so it reached 127.0.0.1, private networks and the cloud
metadata address, and up to 200 bytes of a failed response were copied into
the error the preview returns and lastSyncError stores. An open and a closed
internal port also answered differently.

Every request now goes through fetchSafe: internal addresses refused, DNS
pinned, redirects refused, response size and time bounded. An error carries the
origin and HTTP status only, a non-JSON answer says so without quoting it, and
a guard refusal is one message that does not name what a host resolved to.
Saving Sync settings refuses an internal address too, so none is stored. Both
refusals are recorded as SyncBleed in Admin Panel -> Problems.

A self-hosted tracker on the server's network is allowed only by the
administrator, with LIST_SYNC_ALLOWED_PRIVATE_HOSTS (exact hosts); the test
server allows 127.0.0.1 for the List Sync specs' mock tracker. The browser test
found that an IPv6 literal such as [::1] kept its brackets and was looked up as
a name at save time; the shared validator now checks it as an address.

tests/syncBleed.test.cjs reproduces the report on the real fetcher for every
provider, and fails on a platform fetch() to anything but a fixed or
administrator-allowed host, or a response body copied into an error, anywhere
in the server tree. list-sync-source.e2e.js saves and previews internal
addresses in the browser and checks no request reaches the mock tracker.
securityRegressionCoverage lists CacheBleed and SyncBleed with their tests.

Thanks to alham-rizvi and xet7 !
2026-10-02 09:46:00 +03:00
Lauri Ojansivu e191baef7e Recover abandoned History writers online, fenced, without stopping servers.
A legacy History writer holds a token on its board's gate until its write is
confirmed, with no expiry, so an uncertain write can never become invisible to
a chain migration. A writer that died kept its token forever, and the only way
to remove it was the offline tool with every server stopped. Maintainer
decision of 2026-09-30: build online recovery - liveness heartbeats and fencing
on History inserts - and keep the offline tool as the fallback.

Each writer on an upgraded server now writes a lease beside its token
(historyWriterLeases) and renews it while it works. Before every legacy
History insert it claims the row id in the lease; only an active lease can
claim. Recovery takes a lease only after it has been expired for another full
lease period (HISTORY_WRITER_LEASE_MS, default 30 s). It sets the lease to
fenced, so the old writer can neither renew nor claim. A claimed row id is
then fenced by a tombstone under that id, so the unique _id makes a late
insert fail, and a row that had already landed stays. Only then is the token
removed. Safety rests on the fence; clocks only decide when a lease may be
taken, and a slow writer that is taken loses its write with an error.
Tombstones use the reserved board id #history-writer-fence and are invisible
to every board reader. A Sync append refuses a tombstone as its planned row.

A chain migration takes abandoned writers by itself while the board drains,
a full gate does the same once, and releases/recover-history-writer.cjs
--recover-expired does it on demand, online. Tokens without a lease (older
servers) are listed and still need the offline procedure.

MongoDB tests with two clients: a writer that died after claiming a row is
taken and its late insert fails; a fenced slow writer cannot claim; a row
that landed before the fence is kept; live writers and lease-less tokens are
not taken; a migration drains a dead writer and completes on the real chain
head. A full-app test covers the production binding. 563 server tests pass.

Thanks to xet7 !
2026-09-30 11:03:37 +03:00
Lauri Ojansivu dd7baeec54 Import and export boards as todo.txt.
todo.txt (github.com/todotxt/todo.txt) is the one-task-per-line format
the todo.txt CLI and many compatible apps share, and WeKan read and
wrote neither. It now imports from the import picker and exports from
the board's export menu. A completed task goes to Done; priority becomes
a priority:A label; creation and completion dates become the card's
creation and end dates; +project and @context become labels; due: and
t: become due and start dates; WeKan's list: extension keeps list names
across a round trip. Other key:value pairs stay in the title, a
malformed date is reported instead of guessed, and a completion date is
written only with a creation date, as the format requires. todo.txt has
no descriptions, comments or members, so an export leaves them out.

tests/todoTxt.test.cjs runs the specification's examples, the round trip
and the negatives; the format guards learn the new format and a
Playwright case imports a todo.txt through the page. The new
instruction text is in English, pending translation.

Thanks to xet7 !
2026-09-30 02:54:25 +03:00
Lauri Ojansivu d893d1791b Import OpenProject watchers and Asana followers as card watchers.
Both were reported as losses because an import never grants access. A
watcher needs none: a source watcher now becomes a card watcher when the
members mapping maps them to a member of the new board. Anyone else -
unmapped, or mapped to a user who is not a board member and would
otherwise receive a private board's notifications - is counted in the
import's loss report instead. Nextcloud Deck sharing rules stay a
reported loss by design.

The planner tests pin board-member-only watching and the count of the
rest; the Asana and OpenProject tests pin the mapping from their
fixtures. A source guard for GitLab's Requested By follows the
gitlabUser helper introduced for the GitLab adapter.

Thanks to xet7 !
2026-09-30 01:56:38 +03:00
Lauri Ojansivu d71bab65b3 Bring the GitLab importer and Sync source up to the format contract.
The GitLab adapter kept only title, description, state, due date, the
first assignee, author and labels, and silently dropped the rest of an
Issues API v4 issue. It now carries every assignee, the author, creation
and close dates, time spent, labels with details, milestone, iteration,
issue type and confidentiality as tags, weight, time estimate and task
completion as custom fields, embedded notes as comments (system notes
skipped), embedded links as dependencies, and the group/project#iid
reference and web URL at the end of the description, as GitHub cards
already have. A confidential issue is warned about; group-level epics and
comments not embedded in the export are reported as losses.

List Sync reads the same parser, so on the first Sync after upgrading an
existing GitLab card's description gains the source link once, the way
GitHub cards already carry it; Sync still writes only title, description
and time fields on existing cards, and its coverage report names where
each GitLab field goes.

tests/gitlabImport.test.cjs pins every mapping, the loss report and the
planner's handling of members, dates, comments, links and custom fields.

Thanks to gotjoshua and xet7 !
2026-09-30 01:54:12 +03:00
Lauri Ojansivu 286ed906a9 Import and export Leo .leo outlines.
The Leo literate editor's XML outline is a new import source and export
format: top-level nodes are lists, their children are cards with the node
body as the description and a marked node as done, and deeper nodes are
checklists. Clones keep their headline and children. The raw XML is parsed
server-side with htmlparser2 in XML mode (no DTDs or external entities), a
self-clone cannot loop and a clone bomb is refused at 100000 nodes, and the
parsed tasks then pass the shared import sanitizer.

Thanks to xet7 !
2026-09-29 18:41:21 +03:00
Lauri Ojansivu 50a24abce0 Record what an external import could not bring over in Problems -> Recovery.
Every external parser and the shared planner returned unsupported and
warning entries, but nothing stored them, so an import that dropped a
board's sharing rules or a parent outside the file looked like a complete
one. The Kanboard-shape and Jira creators now record one bounded
import-completed-with-warnings Recovery row with the board, the importing
user and the first paths and reasons; a complete import records none.
The import page does not show the report yet: that needs a new
translated string.

Thanks to xet7 !
2026-09-29 09:26:20 +03:00
Lauri Ojansivu 6bf4ac0f2b Reconcile independently confirmed rule email acceptance offline
Retain an immutable operator decision before repairing the exact attempt receipt. Preserve dispatch guards and never send or reset mail. Cover interruption, conflicting decisions and real MongoDB CLI recovery. Other operator recovery remains unfinished.

Thanks to xet7.
2026-09-28 21:15:56 +03:00
Lauri Ojansivu 2a632445b2 Include authorized converted-subtask references in rule emails
Share related-source resolution between Details and checklist discussion. Retain reference evidence for stored messages even when Details is disabled, and omit inaccessible targets.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 20:26:06 +03:00
Lauri Ojansivu b1b126fb0c Bind stored email details to related sources and field policies
Resolve related link titles through current readable sources and retain their chains in immutable command evidence. Recheck related access, admin rights and custom-field definitions before stored dispatch. Refuse legacy Details snapshots without related evidence.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 20:23:01 +03:00
Lauri Ojansivu d99641d8ed Include visible Scrum card metadata in rule email details
Resolve sprint and release names within the source board and recheck references after preparation. Persist Scrum disclosure flags with source evidence for stored sends.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 20:11:49 +03:00
Lauri Ojansivu 0b86c92ded Include authorized linked-board voting in rule emails
Use live target results with both boards' visibility settings. Persist target disclosure policy in version-three source bindings and recheck it before dispatch.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 20:08:08 +03:00
Lauri Ojansivu 952cb16a72 Include voting results in rule emails with disclosure policy checks
Keep private voter names and unfinished poker choices out of Details. Persist voting visibility with source bindings and reject changed disclosure settings before stored dispatch.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 20:05:27 +03:00
Lauri Ojansivu 6e4032b69c Bind stored rule emails to their authorized source chain
Capture versioned source evidence with immutable mail and verify its topology and current access before dispatch. Keep legacy commands readable without authorizing an unbound retry.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 19:57:36 +03:00
Lauri Ojansivu eb527dd13f Add directed duplicate card relationships and Jira import mapping 2026-09-28 17:23:15 +03:00
Lauri Ojansivu 0818e22ad4 Coordinate Scrum restoration events with ordinary History appends 2026-09-28 16:56:07 +03:00
Lauri Ojansivu 98359d7788 Resume offline History migration after verifying the actual chain head 2026-09-28 16:53:23 +03:00
Lauri Ojansivu 09b51d75a3 Recover uncertain History writer admission with exact offline retirement 2026-09-28 16:50:42 +03:00
Lauri Ojansivu 1442809b4b Route ordinary History records through persistent writer admission 2026-09-28 16:47:55 +03:00
Lauri Ojansivu 54a4ef0691 Drain participating History writers before persistent migration ownership 2026-09-28 16:41:28 +03:00
Lauri Ojansivu e56dac26a8 Bind coordinated History appends to private heads and schema validation 2026-09-28 16:37:45 +03:00
Lauri Ojansivu 5090e57836 Validate existing History ancestry before coordinated head initialization 2026-09-28 16:34:02 +03:00
Lauri Ojansivu 355fd742ca Serialize History appends through a durable recoverable chain head 2026-09-28 16:31:25 +03:00
Lauri Ojansivu 978beefe85 Bind stored archive execution to durable effects and required History ownership 2026-09-28 16:27:57 +03:00
Lauri Ojansivu 840711a6ea Register private archive recovery storage and guard command capture 2026-09-28 16:25:02 +03:00
Lauri Ojansivu 96b9bb6890 Bind archive activity plans to real collection hooks and verify replay 2026-09-28 16:21:11 +03:00
Lauri Ojansivu 85edeb0ec1 Persist archive History and activity plans before conditional replay 2026-09-28 16:18:48 +03:00
Lauri Ojansivu 3e8650057c Bind stored archive cascades to validated Cards writes and scoped hooks 2026-09-28 16:15:36 +03:00
Lauri Ojansivu 2684c6fdd3 Reconcile stored archive cascades with conditional writes and effect receipts 2026-09-28 16:12:55 +03:00
Lauri Ojansivu 8a0475faad Capture immutable archive rule cascades before card mutations 2026-09-28 16:10:14 +03:00
Lauri Ojansivu cb8c68c540 Expose bounded administrator metadata reports for stored rule email attempts 2026-09-28 16:01:45 +03:00
Lauri Ojansivu ab81fcedeb Connect durable email receipts through stored rule and activity delivery 2026-09-28 15:58:06 +03:00
Lauri Ojansivu 5c2b9c1601 Verify stored rule email through real SMTP acceptance and interrupted delivery 2026-09-28 15:54:55 +03:00
Lauri Ojansivu 0dc51068ac Bind stored rule email dispatch to private attempts and shared SMTP slots 2026-09-28 15:52:33 +03:00
Lauri Ojansivu 43d73ed90b Persist rule email send attempts and refuse ambiguous automatic replay 2026-09-28 15:48:44 +03:00
Lauri Ojansivu 2e32025c39 Verify rule email acceptance against the native transport envelope 2026-09-28 15:46:13 +03:00
Lauri Ojansivu 319173291e Capture stored rule mail through shared variable and localization preparation 2026-09-28 15:44:05 +03:00
Lauri Ojansivu 61969464be Persist immutable prepared rule email commands with exact readback 2026-09-28 15:40:15 +03:00
Lauri Ojansivu a48524ecf5 Separate localized email preparation from transport for durable command capture 2026-09-28 15:38:05 +03:00
Lauri Ojansivu 2302259523 Bind stored Sync rule execution to private receipt storage and live guards 2026-09-28 15:36:05 +03:00
Lauri Ojansivu d668d2b41d Coordinate saved rule execution through ordered durable checkpoints 2026-09-28 15:32:58 +03:00
Lauri Ojansivu d2c73b4225 Capture stored Sync rule plans through actual matching and scope guards 2026-09-28 15:27:01 +03:00
Lauri Ojansivu c7f30bfd42 Persist immutable ordered Sync rule selection plans 2026-09-28 15:20:32 +03:00
Lauri Ojansivu cc9a568c76 Coordinate stored Sync activity delivery with exact stage receipts 2026-09-28 15:17:30 +03:00
Lauri Ojansivu 5e1ed32f58 Sync Jira original and remaining time estimates with conflict review
Map selected aggregate seconds to the board's imported numeric time fields in hours. Preserve zero, missing and explicit null; validate mapping identities and retain unrelated fields through conditional array writes.

Twenty-five focused Node suites and twenty-two Chromium scenarios pass with local MongoDB and Jira fixtures. Live Jira, FerretDB and other browsers remain unverified.

Thanks to xet7 !
2026-09-28 03:49:38 +03:00
Lauri Ojansivu a00c009ba6 Bind scheduled Sync to its authorizing account 2026-09-28 02:30:48 +03:00
Lauri Ojansivu 617ba292f9 Retain Sync completion proofs across stable request retries
Require caller-persisted intent IDs and private immutable completion records before cleanup. Resume known completions without rebuilding or reapplying cards, reject conflicting scopes and pending intents, and preserve newer operations.

Thanks to xet7.
2026-09-28 02:09:52 +03:00
Lauri Ojansivu 0d2dd1d36e Prepare conditional field patches for durable Sync steps
Compare before/after field unions without replacing unrelated metadata. Share literal snapshot predicates with production Sync, isolate result verification from driver mutation, and reject array shapes that cannot survive BSON storage.

Thanks to xet7.
2026-09-28 01:59:40 +03:00