Compare commits

...
168 Commits
Author SHA1 Message Date
github-actions[bot] 58cc90526e Bump versions for v13.27 2026-11-22 09:04:59 +00:00
Lauri Ojansivu d6f3707d59 Prepare v13.27 release 2026-11-22 11:04:05 +02:00
Lauri Ojansivu 942349f9de Update WeKan changelog: CodeQL alert #611, autolink rules in linear time.
Thanks to GitHub CodeQL and xet7 !
2026-11-22 10:47:43 +02:00
Lauri Ojansivu 25e9d02517 Autolink rules: existing links are found in linear time.
GitHub CodeQL code scanning alert #611 (js/polynomial-redos, high):
the spans of existing markdown links and href values were found with
/\[[^\]\n]*\]\([^)\n]*\)/g and /href\s*=\s*("[^"]*"|'[^']*')/gi, which
restart at every "[" (or href=") and read to the end each time. A card
description of 200,000 "[" took 25 seconds to render. The spans are now
found by one hand-written scan whose "next ] / ) / quote" positions are
computed once, so the work is linear, and a 3000-case fuzz test pins
that it finds exactly what the two expressions found.

The same shape was in the admin's own rules: a token that starts with
{number} retried (\d+) from every digit of a long run, so it now starts
only where a run of digits does.

Thanks to GitHub CodeQL and xet7 !
2026-11-22 10:27:38 +02:00
github-actions[bot] 0b7110f2bd Bump versions for v13.26 2026-11-22 08:11:03 +00:00
Lauri Ojansivu a9ee0fe874 Prepare v13.26 release 2026-11-22 10:10:00 +02:00
Lauri Ojansivu f6e9ab0084 Update WeKan changelog: the faults the new pages' browser tests found, and the docs.
Thanks to xet7 !
2026-11-22 07:29:35 +02:00
Lauri Ojansivu cda393614c Tests: the new guards skip every build output and escape what they put in a regular expression.
attachmentApiParsedBody walked past _build by its exact name, which
sourceWalkersSkipBuildOutput refuses because _build-local-test holds a bundled
copy too; it skips by the prefix. nativeCheckboxesShown escaped only the first
dot of a scope, which noIncompleteRegExpEscaping refuses; it escapes every
special character.

Thanks to xet7 !
2026-11-22 07:29:35 +02:00
Lauri Ojansivu 91fea6e50d Group headings readable, Board View menu fits the window, browser tests follow renamed labels.
- The Import list's and the Board View menu's group headings were #6b778c,
  4.48:1 on white where small text needs 4.5:1; axe failed the Import page.
  They are #505f79.
- Long option menus are up to 1200px wide, four columns on a 1280px screen:
  the Board View menu, grouped under headings, ran below a 720px-high window.
- viewport-matrix reads "Memory usage", as the label is written since the
  Problems summary was reworded, and the Taiga import test finds Blocked on
  the card's Blocked flow field, where it has been since ab884547f4.

Thanks to xet7 !
2026-11-22 07:21:01 +02:00
Lauri Ojansivu 131260b5bc Copy Checklist copies again.
The insert hooks store the author as userId, which neither the checklist nor
the item schema has. A copy carried it from the source and the server refused
it (keyNotInSchema), so the copy dialog's Done did nothing. The copy builders
leave it out.

tests/checklistTemplateCopy reads both schemas and requires every field of a
copy to be one of theirs.

Thanks to xet7 !
2026-11-22 07:21:01 +02:00
Lauri Ojansivu b3a1ba762c Attachment API: copy and move answer a JSON body again.
server/apiMiddleware.js runs express.json() for every path before any route,
so a JSON body has already been read when the attachment routes start
listening for it. They waited for a request end that had already happened and
answered only at their own 30-second timeout: copy and move never answered,
and ListLockAttachBleed's browser test timed out on them. The parsed body is
now handed to the routes' own listeners.

tests/attachmentApiParsedBody runs the replay, and fails when a server file
waits for a body that a parser may already have read.

Thanks to xet7 !
2026-11-22 07:21:01 +02:00
Lauri Ojansivu fd7836e99c Website: a visitor who never chose a view sees the board's own default view.
The view resolver was handed the browser's fallback, Swimlanes, as if the
visitor had asked for it, so a public board whose Board View is Website showed
its kanban to everybody arriving at its address. storedBoardView() can now
return only a view somebody chose (chosenOnly), and the board's default
decides when there is none.

tests/boardViewSettings pins the default for somebody with no view of their
own; the tests that pin the stored view follow the new shape.

Thanks to xet7 !
2026-11-22 07:21:01 +02:00
Lauri Ojansivu 1032b472f3 Budget and billing, Workload and the Cloud Panel: saves show, forms render, PDFs print.
Found by running their Chromium specs through build.sh:

- Budget and billing did not refresh after a save: the board pane read the
  current template data inside a promise, where there is none. It uses its
  own instance's data now, and a save refreshes only the board's detail and
  its row, without the spinner that took the pane down and without the
  billingBoards call that ran into its rate limit.
- Workload's capacity form lost its "saved" note: the refresh after a save
  showed the spinner, which replaces the form. The spinner is now only for the
  first load.
- The Cloud Panel's forms did not render: a function passed to an inclusion as
  done=done is called by Spacebars, so they received its result. Errors and
  the domain being edited are module state now.
- The checkboxes of the three pages were hidden by the app-wide form styles;
  each page shows its own again.
- An invoice PDF failed in the bundle with "Cannot find module
  #standard-fonts/Helvetica": pdfkit is given the bundled font.

Tests: templateDataInPromise, spacebarsFunctionArgs and nativeCheckboxesShown
find each shape anywhere in the client, invoiceFiles requires the font in
every PDFDocument, and workload pins the spinner to the first load.

Thanks to xet7 !
2026-11-22 07:20:48 +02:00
Lauri Ojansivu 2ba6153617 README and docs: Workload and capacity, Budget and billing, the Cloud Panel and Website.
Thanks to xet7 !
2026-11-22 00:23:12 +02:00
Lauri Ojansivu 69b034fa39 Update WeKan changelog: English behind a label replaced in eight languages, and the website guard fix.
Thanks to xet7 !
2026-11-21 23:57:12 +02:00
Lauri Ojansivu c039243a12 Aymara, Setswana, Luxembourgish, Sindhi, Northern Sami, Hawaiian, Sardinian and Sinhala: English behind a label replaced by translations.
646 values were the English source with a word of the language in front
of it - "Aymar aruna: Actions" (In Aymara: ...) 480 times in Aymara,
"Tshedimosetso: ..." 116 times in Setswana, and a few in Luxembourgish,
Sindhi, Northern Sami, Hawaiian, Sardinian and Sinhala. That is English,
not a translation: each is now translated into the language of its file,
with its placeholders as in English.

tests/prefixedEnglishValues.test.cjs reads every value of every locale and
fails on English behind a label, so the shape cannot come back.

Lower-confidence translations: ay (coined technical terms, compound colour
names), tn (technical terms), haw (date format labels), se and sd (cloud
console menu names).

Thanks to xet7 !
2026-11-21 23:56:50 +02:00
Lauri Ojansivu fcc8f19fe4 Website: the comment-stripping loop in the shape the fixed-point guard reads, and the script checks without case.
tests/tagStrippingFixedPoint.test.cjs reads a do { } while loop written over several lines, as everywhere else, and tests/securityAlerts20261012.test.cjs requires a <script> pattern to match any case, so <SCRIPT> cannot pass the website tests. Both guards read tracked files only, so they saw the website code once it was committed.

Thanks to xet7 !
2026-11-21 23:56:50 +02:00
Lauri Ojansivu c6fbe2d099 Update WeKan changelog: Cloud Panel and Website.
Thanks to xet7 !
2026-11-21 23:44:54 +02:00
Lauri Ojansivu 2e8549032e Website: import and export WordPress, Ghost, Blogger, static and HTML sites, and the board as a website at a public board's address.
Import and Export have a new group, Website:

- WordPress (.xml): WordPress eXtended RSS from Tools -> Export, as
  Squarespace, Wix and others also write it; written as WordPress reads it.
- WordPress REST API (.json): /wp-json/wp/v2/posts and /pages.
- Ghost: its JSON export, written as Ghost's importer reads it.
- Blogger (.xml): its Atom backup.
- Hugo, Jekyll, Eleventy, Astro (.zip): Markdown files with YAML or TOML
  front matter, and their images; written as content/pages and
  content/posts.
- HTML website, Medium (.zip): a site's .html pages and images, read for
  their main text; written as the published site itself, ready for any
  web server, with the cards' attachments beside their pages.
- Substack (.zip): posts.csv and the posts' HTML.

Each page and post becomes a card in the list of its status (Published,
Draft, Pending review, Scheduled, Private), pages in the swimlane Pages and
posts in Posts, its content as Markdown, a subpage as a subtask, categories
and tags as labels, approved comments as comments, a .zip's images as
attachments. A site's HTML is read as text, so no script of it reaches a
card; a card's text is written into an exported site escaped, never as
markup.

Board View / Website shows the board as that website: the cards of its
Published list (every list when it has none), Pages as the menu with the
subpages, the other cards as posts, newest first, and the cards'
attachments - built straight from the board. As a public board's default
view in Board Settings / Board View, it is what visitors see at the
board's address instead of the kanban; a draft is never shown, not even by
its id. Admin Panel / Features can turn it off.

The Sandstorm WordPress and Hacker CMS grain imports stay under Sandstorm,
by the rule that a platform's apps are listed under it.

12 new strings are translated in every language. Lower-confidence
translations: ace, ak, ay, bi, bm, bo, dz, ee, chr, bua, cv, ba, csb, an,
co, br, ary, bho, as, am, ckb, iu, kl, ff, fj, gn, gv, kw, ig, ha, haw, ks,
kok, fur, hsb, fo, ku, lld, nah, rup, sah, se, sc, scn, nap, qu, sm, pap,
lg, nd, ss, nso, rn, om, mg, ny, sn, so, ps, sd, mai, or_IN, my, la, tig,
wal, tlh, vo, zgh and ve-PP.

Thanks to xet7 !
2026-11-21 23:44:34 +02:00
Lauri Ojansivu 240f0dad93 Cloud Panel: customer domains, their databases, CloudFlare, Caddy, invoices and chat, and merging many WeKans into one.
Admin Panel / People / Cloud names the Cloud Panel Domain and its
SuperAdmin - an existing administrator, by username or e-mail address - as
Weddy's Cloud Panel does (caddy-wekan-plugin). At that domain, /cloud is an
Admin-Panel-style page:

- Domains, a table page: domain, customer name and e-mail, billing e-mail,
  start and end date, and where its data is - its own WeKan container and
  MongoDB database (connection string, or host, port, database, username,
  password, authentication database, replica set, TLS; no password is
  fine), or shared with this WeKan as an Organization claiming the domain.
  Passwords are written on the server and never sent back.
- Import into this WeKan: a domain's own WeKan database merged into this
  one - its boards and all hanging off them, accounts matched by e-mail
  address or created (never administrators, no login tokens), everybody in
  the domain's Organization - and the domain then shares this WeKan. A dry
  run first. Ten containers and ten databases become one of each.
- Invoices of the hosting, recorded by the SuperAdmin, earlier ones too;
  each customer sees their own, paid or not and when.
- Chat per domain between its customer and the SuperAdmin, with earlier
  Rocket.Chat and SandChat conversations imported.
- CloudFlare: the DNS records of every domain, created and updated; a
  record of another kind is reported, never replaced.
- Caddy: the Caddyfile of every domain, loaded through its admin API.

The panel answers only at its own domain, checked on the server by every
method. A shared domain's Organization claims its host only after the same
refusals as an Organization admin's: never the instance's own address,
never another Organization's (TenantBleed). Requests go only to
CloudFlare's API and the Caddy admin API an administrator set, without
redirects (SyncBleed).

44 new strings are translated in every language. Lower-confidence
translations: chr, ay, ak, bm, ee, bi, ace, bo, dz, bua, cv, ba, csb, bho,
an, co, ff, fj, gn, gv, haw, iu, kl, kw, ks, kok, ig, ha, fur, hsb, ht, la,
lg, lld, mg, mi, nah, nap, nd, nso, ny, om, pap, qu, rm, rn, rup, rw, sah,
sc, scn, se, sm, sn, so, ss, tlh, vo, wal, ve-PP, wa, wa-RR, szl, zgh, tig,
ve, ts, tn, st, wo, to, tpi, yi, uz-AR, wuu-Hans, yue_CN, ve-CC and vl-SS.

Thanks to xet7 !
2026-11-21 23:14:11 +02:00
Lauri Ojansivu 1d774f0d51 Merge pull request #6932 from wekan/dependabot/npm_and_yarn/tests/playwright/playwright/test-1.65.1
Bump @playwright/test from 1.65.0 to 1.65.1 in /tests/playwright
2026-11-21 22:46:18 +02:00
Lauri Ojansivu 43bcffcbc9 Merge pull request #6938 from wekan/dependabot/npm_and_yarn/imapflow-2.12.1
Bump imapflow from 2.9.1 to 2.12.1
2026-11-21 22:45:10 +02:00
Lauri Ojansivu e6875719f5 Merge pull request #6937 from wekan/dependabot/npm_and_yarn/puppeteer-25.18.1
Bump puppeteer from 25.17.0 to 25.18.1
2026-11-21 22:44:56 +02:00
dependabot[bot] 7273fa3e3c Bump @playwright/test from 1.65.0 to 1.65.1 in /tests/playwright
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.65.0 to 1.65.1.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.65.0...v1.65.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.65.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:44:51 +00:00
Lauri Ojansivu 48b383be9a Merge pull request #6936 from wekan/dependabot/npm_and_yarn/fastify/busboy-3.2.6
Bump @fastify/busboy from 3.2.4 to 3.2.6
2026-11-21 22:44:42 +02:00
Lauri Ojansivu 3c8b04109f Merge pull request #6935 from wekan/dependabot/npm_and_yarn/aws-sdk/client-s3-3.1172.0
Bump @aws-sdk/client-s3 from 3.1161.0 to 3.1172.0
2026-11-21 22:44:27 +02:00
Lauri Ojansivu 5bb1753894 Merge pull request #6934 from wekan/dependabot/npm_and_yarn/swc/core-1.16.22
Bump @swc/core from 1.16.18 to 1.16.22
2026-11-21 22:44:09 +02:00
Lauri Ojansivu 223f547a14 Merge pull request #6933 from wekan/dependabot/npm_and_yarn/tests/playwright/mongodb-7.9.0
Bump mongodb from 7.8.0 to 7.9.0 in /tests/playwright
2026-11-21 22:43:56 +02:00
Lauri Ojansivu a2a13d61b0 Merge pull request #6931 from wekan/dependabot/github_actions/actions/dependency-review-action-5.0.1
Bump actions/dependency-review-action from 5.0.0 to 5.0.1
2026-11-21 22:42:56 +02:00
Lauri Ojansivu d0c3af88f0 Merge pull request #6930 from wekan/dependabot/npm_and_yarn/tests/playwright/axe-core-4.14.1
Bump axe-core from 4.14.0 to 4.14.1 in /tests/playwright
2026-11-21 22:42:43 +02:00
dependabot[bot] bb1cca3072 Bump imapflow from 2.9.1 to 2.12.1
Bumps [imapflow](https://github.com/postalsys/imapflow) from 2.9.1 to 2.12.1.
- [Release notes](https://github.com/postalsys/imapflow/releases)
- [Changelog](https://github.com/postalsys/imapflow/blob/master/CHANGELOG.md)
- [Commits](https://github.com/postalsys/imapflow/compare/v2.9.1...v2.12.1)

---
updated-dependencies:
- dependency-name: imapflow
  dependency-version: 2.12.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:33:39 +00:00
dependabot[bot] 0bccf9c6a5 Bump puppeteer from 25.17.0 to 25.18.1
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 25.17.0 to 25.18.1.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v25.17.0...puppeteer-v25.18.1)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-version: 25.18.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:33:31 +00:00
dependabot[bot] 0f58d63375 Bump @fastify/busboy from 3.2.4 to 3.2.6
Bumps [@fastify/busboy](https://github.com/fastify/busboy) from 3.2.4 to 3.2.6.
- [Release notes](https://github.com/fastify/busboy/releases)
- [Commits](https://github.com/fastify/busboy/compare/v3.2.4...v3.2.6)

---
updated-dependencies:
- dependency-name: "@fastify/busboy"
  dependency-version: 3.2.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:33:21 +00:00
dependabot[bot] 6c54f2e339 Bump @aws-sdk/client-s3 from 3.1161.0 to 3.1172.0
Bumps [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3) from 3.1161.0 to 3.1172.0.
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1172.0/clients/client-s3)

---
updated-dependencies:
- dependency-name: "@aws-sdk/client-s3"
  dependency-version: 3.1172.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:33:15 +00:00
dependabot[bot] 15f32403d3 Bump @swc/core from 1.16.18 to 1.16.22
Bumps [@swc/core](https://github.com/swc-project/swc/tree/HEAD/packages/core) from 1.16.18 to 1.16.22.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits/v1.16.22/packages/core)

---
updated-dependencies:
- dependency-name: "@swc/core"
  dependency-version: 1.16.22
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:32:57 +00:00
dependabot[bot] a6eea8c0e8 Bump mongodb from 7.8.0 to 7.9.0 in /tests/playwright
Bumps [mongodb](https://github.com/mongodb/node-mongodb-native) from 7.8.0 to 7.9.0.
- [Release notes](https://github.com/mongodb/node-mongodb-native/releases)
- [Changelog](https://github.com/mongodb/node-mongodb-native/blob/main/HISTORY.md)
- [Commits](https://github.com/mongodb/node-mongodb-native/compare/v7.8.0...v7.9.0)

---
updated-dependencies:
- dependency-name: mongodb
  dependency-version: 7.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:32:54 +00:00
dependabot[bot] 8f06265ee2 Bump actions/dependency-review-action from 5.0.0 to 5.0.1
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/a1d282b36b6f3519aa1f3fc636f609c47dddb294...bbc44d14a204704ccc493733616cd1e93a0321ec)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:32:46 +00:00
dependabot[bot] 48568706fb Bump axe-core from 4.14.0 to 4.14.1 in /tests/playwright
Bumps [axe-core](https://github.com/dequelabs/axe-core) from 4.14.0 to 4.14.1.
- [Release notes](https://github.com/dequelabs/axe-core/releases)
- [Changelog](https://github.com/dequelabs/axe-core/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/dequelabs/axe-core/compare/v4.14.0...v4.14.1)

---
updated-dependencies:
- dependency-name: axe-core
  dependency-version: 4.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 20:32:42 +00:00
Lauri Ojansivu 7174dbbc0d Update WeKan changelog: expenses, fees, time approval, margins, quotes, utilization and skills.
Thanks to xet7 !
2026-11-21 22:20:22 +02:00
Lauri Ojansivu d88662d69c PSA: expenses, fixed fees and retainers, time approval, cost rates and margin, quotes, utilization and skills.
Budget and billing gains what a professional services automation system
has on top of time and invoices:

- Expenses (travel, accommodation, meals, materials, subcontracting,
  software, other) with a markup, billable or not, on a card and a person.
  They spend the budget at their cost and go on the next invoice of their
  period at their charge, once; voiding or crediting frees them.
- Fixed fees billed once from their day (milestones, fixed prices) and
  monthly retainers to their end. Which occurrences are billed is read from
  the standing invoices' lines. "Bill time by the hour" off makes a board a
  fixed price: its invoices carry fees and expenses only.
- Approving time: with it on only approved time is invoiced; board admins
  approve or send back the waiting entries, the card's Time popup shows the
  decision, and approved time can no longer be removed by its logger.
- A cost per hour on a rate, the board's cost (hours at cost rates and
  expenses), unbilled work in progress and the margin.
- Quotes (QUO-YYYY-NNNN) of the work still to do and the fees not billed,
  valid for the invoicer's days, draft -> sent -> accepted or declined;
  accepting can make the quote the budget; PDF, SVG, Excel and CSV.
- The board's customer, filled in on invoices and quotes.

Workload gains billable utilization against working time with a target, and
skills with levels: a placeholder that needs a skill lists who could do it,
the most free hours first.

Two bugs found on the way: crediting an invoice failed on a real database,
because the invoice schema did not allow the status "credited" (a test now
checks every status the server writes against the schema); and the workload
report ignored everybody's own working time, because capacityOf validated
the stored document with its _id and userId and fell back to the default.

58 new strings are translated in every language. Lower-confidence
translations: chr, dz, bo, csb, cv, bua, ay, ff, fj, gn, gv, haw, ig, iu,
kl, kw, ks, kok, hsb, lg, lld, nah, nap, scn, sc, rup, rm, qu, se, sah, nd,
ss, nso, ny, sn, rn, rw, om, so, sm, mi, mg, pap, la, mai, or_IN, sd, ps,
my, tig, tlh, wal, zgh, vo, ve-PP, uz-AR, tpi, wa and wo.

Thanks to xet7 !
2026-11-21 22:19:45 +02:00
Lauri Ojansivu 9a0788a329 Update WeKan changelog: invoicing, and amounts and payment codes of more countries.
Thanks to xet7 !
2026-11-21 21:37:22 +02:00
Lauri Ojansivu 37bc16e1e5 Billing: amounts in each currency's own decimals, and regional payment codes.
Money was kept in cents for every currency, so 1000 JPY was stored as
100000 and 1.500 KWD could not be written at all. models/lib/currencies.js
now holds the ISO 4217 minor unit of each currency (0 for JPY, KRW, VND,
CLP, ISK and others, 3 for BHD, KWD, JOD, OMR, TND, IQD, LYD, 4 for CLF and
UYW, 8 for BTC, LTC and ETH), and rates, budgets, payments, the invoice
CSV, Excel, PDF, SVG and UBL e-invoice all use it.

Payment methods added, each from its published specification:
PromptPay (Thailand), PayNow (Singapore), VietQR (Vietnam) and FPS (Hong
Kong) as EMVCo merchant-presented QR codes; Czech SPAYD; Polish ZBP;
Hungarian MNB QR; Serbian NBS IPS QR; Danish FI +71; Ethereum EIP-681 and
Litecoin URIs. Each method checks that the invoice is in the currency it
requires. Payment references add the Belgian structured +++ reference
(mod 97), the Norwegian KID and the Swedish OCR (Luhn).

21 new strings are translated in every language. Lower-confidence
translations: nah, qu, rup, sah, se, sm, sn, ss, nd, nso, rn, rw, lg, om,
so, mg, mi, lld, nap, sc, scn, pap, la, my, or_IN, sd, ps, tig, tlh, vo,
zgh, ve, ve-PP, wal, wa, tpi, to, uz-AR, wo, ti, ts, st, tn and szl.

Thanks to xet7 !
2026-11-21 21:36:38 +02:00
Lauri Ojansivu 13b0d5fe37 Invoicing: time by day, invoices of a period, payment codes, PDF/SVG/Excel/e-invoice, VAT, payments and credit notes.
Time entries. A card's Time popup lists its time by day - the day, the
hours, who logged them, a note - and Log time adds an entry on a day. The
card's spentTime stays its total, so the timers, the REST API, the imports
and every report work as before: whenever the total changes, however it was
written, the server records the difference as an entry of that day by that
user (models/lib/timeEntries.js reconcile, server/timeEntries.js); time
spent before entries were kept becomes one undated entry, once. An entry on
an invoice cannot be removed.

Invoices of a period. Lines are the billable entries of a period that are on
no invoice yet, per card and per person who logged them, at that person's
rate, with each line's first and last day; undated time only when asked.
The entries are marked with the invoice, so nothing is billed twice; voiding
or crediting frees them.

Payment codes, each by its published standard (models/lib/paymentCodes.js),
checked against the standards' own examples: SEPA EPC QR (GiroCode), the
Finnish bank barcode (versions 4 and 5, Code 128 C - the Finanssiala
example), Finnish reference numbers and ISO 11649 RF references (the ISO
example), the Swiss QR-bill (SPC 0200; the QR code with its cross, not the
payment part layout), Swish, Pix (the BCB example CRC), UPI, Bitcoin BIP 21,
PayPal.me and any https payment link with {amount}, {currency},
{reference} and {number}; bank transfer, cash, cheque and other as text.
Nothing is sent to any payment service.

Files: PDF (A4, paged), SVG (A4 wide, as long as the invoice, text as text),
Excel, CSV and a UBL 2.1 Peppol BIS Billing 3.0 e-invoice (a credit note as
a UBL CreditNote), with QR codes and the barcode as vectors.

Also: the invoicer's details, kept on each invoice as they were; VAT and
reverse charge; payment terms (the due date) and penalty interest; payments
recorded, partially paid and overdue (days and interest so far); credit
notes (CRN-), numbered with invoices.

Tests: tests/timeEntries, paymentCodes, ublInvoice and invoiceFiles (real
pdfkit, qrcode-generator and exceljs - it caught exceljs adding an empty
header row through sheet.columns), and billing and billingAccess for the new
model; the Playwright spec invoices a period and downloads PDF and SVG. The
new strings are translated into every language; low confidence for the
smallest ones, and for Veps "Arvon kazvandan nalog" for VAT. PayPal.me is
recorded as a reviewed URL in releases/risk-baseline.json.

Thanks to xet7 !
2026-11-21 21:17:40 +02:00
Lauri Ojansivu 93285026b9 Update WeKan changelog: Budget and billing, and the Venda and Klingon translations.
The oldest release over the size budget moves to old-CHANGELOG/2026/10.md.

Thanks to xet7 !
2026-11-21 20:28:52 +02:00
Lauri Ojansivu 604b3dbe84 Budget and billing: rates, budget against cost and forecast, and invoices of the hours spent.
A new page in the user menu, Budget and billing (/billing), for the boards
the user is an admin of (docs/Features/Billing/Billing.md):

- Hourly rates per board, in an ISO currency: a member's own, or the board
  default. A card's hours are charged at its assignees' rates, shared
  equally, else its members', else the board default; hours with no rate are
  reported as unpriced, never billed at zero silently.
- A budget of money, hours or both, for an optional period, against Spent
  (time spent at the rates), Still to do (open cards' estimate less spent),
  Forecast (red when over the budget), Left of budget, Invoiced and Paid.
- Invoices of the billable hours not invoiced yet, per card and person, at
  the rates of that moment. A card is billable unless Billable is unticked in
  its Time popup. As WeKan keeps spent time as a card total, what is still to
  invoice is that total less the card's hours on invoices that are not void.
  Numbers run per year (INV-2027-0001) under a unique index; status is
  draft, sent, paid or void, paid and void being final, and voiding frees the
  hours. An invoice prints alone, and downloads as CSV with formula-looking
  cells written as text.

Money is kept as integer cents. Only a board's active admins - not members,
not an admin who sees only their assigned cards - and site administrators
see or change it; everything goes through server methods
(server/billing.js), nothing is published, the collections take no client
writes, and a deleted board's budget and rates go with it. Admin Panel /
Features / Budget and billing turns it off. The card field billable is
copied by WeKan export/import.

tests/billing.test.cjs runs the money as arithmetic; tests/billingAccess.test.cjs
runs the real methods as each kind of user;
tests/playwright/specs/billing-invoice.e2e.js drives the page. The new strings
are translated into every language (low confidence for the smallest, e.g.
Volapük, Wolaytta, Nahuatl, Tigre, Klingon, Venda); in several locales the
eleven still-English enrollment/registration/auth strings were translated
too, which completes Southern Sotho.

Thanks to xet7 !
2026-11-21 20:28:26 +02:00
Lauri Ojansivu ae081a430c Venda and Klingon translations hold only Venda and Klingon.
ve.i18n.json had been seeded partly from Zulu and Xhosa ("Susa",
"Isihloko sekhadi", "umsebenzisi", "amakhadi", "imeyili") and English, and
used Venda "thutha" - moving house - for delete. tlh.i18n.json had French
("Êtes-vous sûr de vouloir supprimer...", "Tous les participants du tableau",
"Personne", "Début", "Serveur"), German ("Brett", "Jeden Tag") and English.

Every value of both files was reviewed against the English source: 579
Venda values and 401 Klingon values are rewritten in their own language,
with one word for each recurring term (Venda u bvisa for remove and delete,
khadi for card, imeiḽi for email; Klingon 'echletHom for card, tetlh for list,
QumwI' for server). Values that changed meaning against the English source
were retranslated too (Venda Mvelaphanḓa "progress" for default; Klingon
DujHom "small ship" for card). The reviewed Venda rule-trigger term is kept.
Placeholders are the English ones in every value.

Each replaced audited value is recorded in audited-corrections.json as a
correction of the value before it, and tests/klingonAuditedTranslations now
reads the latest correction of a key. tests/vendaKlingonOwnLanguage fails on
Zulu/Xhosa words in the Venda file, French or German in the Klingon file -
case-sensitively, as Klingon leS is not French les - and English sentences in
either.

Low confidence: both are small-corpus languages; coined Klingon terms
(account, token, repository) and some Venda loans (databeisi, thokheni) are
best guesses for a speaker to correct.

Thanks to xet7 !
2026-11-21 20:06:09 +02:00
Lauri Ojansivu 8652966a47 Update WeKan changelog: Workload and capacity.
Thanks to xet7 !
2026-11-21 19:48:16 +02:00
Lauri Ojansivu 165dfa3c16 Workload and capacity: hours against working time, across boards, with absences and allocations.
A new page in the user menu, Workload and capacity (/workload), shows week
by week how much work each person has against the hours they have, across
every board the viewer is an active member of
(docs/Features/Workload/Workload.md):

- Load: a card's new Estimated hours, set in the Time popup beside the time
  spent, less that time; story points from the board's Scrum estimate. A
  card's work is spread from its start to its due date over the days the
  person works; overdue work counts today; undated and unestimated cards are
  counted apart, and work nobody carries is shown once as unassigned.
- Capacity: each person's hours per week (default 37.5), work time percent
  (part-time 60 % is 22.5 h) and working days. Absences (vacation, sick
  leave, day off, training, other) and public holidays set by an
  administrator take their days away, and the work moves to the days the
  person is there.
- A week over 100 % - more work than hours, allocations over 100 %, or work
  in a week with no hours - is red; under half full is grey-blue. Clicking a
  week lists its cards.
- Allocations: a board's admins give a member a share of their time on the
  board for a period ("A on board X 50 % in April"), or name a role with no
  person yet ("Developer x 1, 100 %, next month"), drawn as a placeholder
  row with the hours it needs.

The server computes the report (models/lib/workload.js, server/workload.js);
cards are not published for it. Public boards and boards where the viewer
sees only their assigned cards are not included, inactive members are not
reported, and somebody else's absence is dates only: its type and note are
shown to that person and to administrators. Capacity and absences are a
person's own to change (an administrator's for anyone), allocations a board
admin's, holidays an administrator's. The four collections take no client
writes and have no publication; a deleted user's workload data goes with
them. Admin Panel / Features / Workload turns the page and its methods off.

The board's own Workload chart, a count of open cards per person, links to
the page. estimatedHours is copied by WeKan export/import.

tests/workload.test.cjs runs the rules as arithmetic, including the cases of
the request (37.5 h, 60 %, an overloaded week, a vacation, a holiday, 50 %
of April, the placeholder roles); tests/workloadAccess.test.cjs runs the real
methods as each kind of user; tests/playwright/specs/workload-capacity.e2e.js
drives the page. The new strings are translated into every language; low
confidence for the smallest ones (e.g. Tigre, Klingon, Wolaytta, Venda,
Vepsian, Cherokee, Dzongkha, Inuktitut, Nahuatl). In several locales the
eleven still-English enrollment/registration/auth strings were translated
too. The hour symbol h is language-independent in fill-translations.mjs.

Thanks to xet7 !
2026-11-21 19:47:56 +02:00
Lauri Ojansivu 586c85848c Merge remote-tracking branch 'origin/main' 2026-11-21 18:53:00 +02:00
Lauri Ojansivu 1295418d3d Update WeKan changelog: unused code removed, copied code shared, #6135 and the lockout settings.
Thanks to mimZD and xet7 !
2026-11-21 18:50:41 +02:00
Lauri Ojansivu c1a89b98fd One function shows a swimlane titled Default, instead of five copies.
The #4742/#4763 rule - 'Default', or the old "key 'default ... returned an
object" text, shows as the translated defaultdefault, or as Default when
that is broken too - was written out in listBody, swimlaneHeader (twice),
sidebarFilters and the move/copy dialog. It is now displayDefaultTitle() in
imports/lib/defaultTitle.js, and tests/defaultTitle fails when a client file
carries its own copy again.

Thanks to xet7 !
2026-11-21 18:49:26 +02:00
Lauri Ojansivu 7f9fc2e957 Brute-force lockout starts when Meteor.settings configures it.
wekan-accounts-lockout's README documents Meteor.settings['accounts-lockout']
.knownUsers / .unknownUsers as objects that override the configured values.
Both counters applied them with settings.forEach(function ({ key, value }) {
this.settings[key] = value; }): an object has no forEach, and in a function
callback `this` is undefined, so with either shape startup() threw before
hookIntoAccounts(). Nothing awaits startup(), so the error went unseen and
the lockout was never installed.

knownUser.js and unknownUser.js now share src/lockoutSettings.js - the
override merge, which takes a plain object and leaves anything else alone,
the positive-number check and the Meteor.settings lookup - instead of each
carrying a copy. tests/lockoutSettings runs the README's settings and fails
if either counter has its own check or a function forEach again.

Thanks to xet7 !
2026-11-21 18:49:26 +02:00
Lauri Ojansivu 27c3716f3d Attachment code shares what it had copied: API limits, headers, downloads.
- server/lib/attachmentApiAccess.js: the size limits and the board write check
  that the attachment Meteor methods (server/attachmentApi.js) and REST routes
  (server/routes/attachmentApi.js) each defined, identically - seven
  functions. tests/assignedbleed reads the write check there and fails if
  either API defines its own again.
- server/lib/contentDisposition.js: the Content-Disposition filename
  functions of server/routes/universalFileServer.js and legacyAttachments.js.
- models/lib/fileStoreStrategy.js: the GridFS, filesystem and cloud strategies
  had the same interceptDownload. The base class now has it, and still fails
  closed: a strategy whose getReadStream() gives nothing - the base one gives
  nothing - answers 404 and never hands the file to Meteor-Files unfiltered.
  tests/attachmentServeFailsClosed holds any override to the same rules.
- models/lib/uploadFileId.js: uploadNameParts() reads the id and name of an
  upload for both Attachments' and Avatars' namingFunction, which each had
  the same 25 lines. tests/uploadFileId, which the module's comment named but
  did not exist, covers it and safeUploadFileId.

Thanks to xet7 !
2026-11-21 18:49:16 +02:00
Lauri Ojansivu eb0df61e7f One copy of the autolinks, shared by the app and the markdown package.
The markdown package cannot import app code, so it carried its own copies of
models/lib/externalLinkAutolink.js (#3069), externalLinkRules.js (#1463) and
cardUrlAutolink.js (#2453), about 200 lines kept in step by hand and by tests
that compared the source text between BEGIN/END markers. It can import an
npm package, so the three files are now @wekanteam/autolink in
npm-packages/autolink, a file: dependency like @wekanteam/dragscroll, and
both the package and the app load that. cardUrlAutolink uses the link guard
of externalLinkAutolink instead of a third copy.

The tests drive the package. The ones that compared copies now check that
packages/markdown imports the shared functions and defines none of them.
tests/noUnescapedDynamicRegExp scans npm-packages/autolink as WeKan's own
code.

client/lib/secureDOMPurify.js is removed too: an older third sanitizer config,
without the administrator's URL schemes, which client/imports.js loaded and
nothing imported from. The app sanitizes with imports/lib/secureDOMPurify.js.

Thanks to xet7 !
2026-11-21 18:49:07 +02:00
Lauri Ojansivu bb4a013939 Collection schemas share one createdAt and one modifiedAt autoValue.
34 schema files wrote the same two autoValue functions out by hand, 65
times in five spellings: createdAt set on insert and $setOnInsert on upsert,
unset otherwise; modifiedAt set on every write. They are now
createdAtAutoValue and modifiedAtAutoValue in models/lib/schemaTimestamps.js,
named by each field as `autoValue: createdAtAutoValue`. models/settings.js,
which may not use import statements, requires them.

Schemas whose rule differs keep their own: changeHistory keeps a createdAt
the caller set, and listSyncCredentials' updatedAt does not unset.

tests/schemaTimestamps runs both functions in SimpleSchema's insert, upsert,
update and validation contexts, and fails when a schema writes either one
out by hand again.

Thanks to xet7 !
2026-11-21 18:27:03 +02:00
Lauri Ojansivu 23c81e0b6c Tests drive the code the app runs, not copies of it nothing loads.
Ten modules were reached only from tests. Some were copies of production
logic kept beside it, so a test passed whatever production did; the rest
were re-export files that only tests imported.

Copies removed, the test now reading what runs:
- models/lib/oauth2ClientSecretJwt.js: wekan-oidc ran its own vendored copy.
  The package file is now the only one and tests/oauth2ClientSecretJwt
  drives it; tests/packageAppImportBoundary fails if a second copy returns.
- models/lib/scrollbarCss.js (#5439): tests/scrollbarCss reads the rules in
  client/components/lists/list.css.
- models/lib/createListParams.js: tests/createListParams reads the check()
  pattern of createListAfter in server/models/lists.js and runs it by the
  rules of Meteor's check, so changing the server pattern fails the test.
- server/lib/cardMatch.js (#5910): the search is a Mongo selector in
  server/publications/cards.js, which tests/boardSearchComments now reads.
- server/lib/dueDateEdits.js (#6081): Cards.getDueDateChangeCount() counts
  the a-dueAt activities itself.

Helpers that production now calls:
- models/lib/checklistHide.js (was server/lib): the Checklists helpers
  hideCheckedState() and isItemHidden() call it, with the same strict
  "checked is true" rule as before.
- models/lib/subtaskSettings.js (was server/lib): the Board Settings
  subtask pickers mark the selected board and list with it.
  resolveSubtaskLanding(), which nothing called, is removed with its tests.

Re-export files removed, the tests importing the real module:
server/lib/listColors.js, cardScope.js, announcementVisibility.js,
customNumberFormat.js and subtaskHelpers.js.

docs/DeveloperDocs/Directory-Structure.md pointed at the migrations/
directory, which no longer exists; it now names server/migrations.

Thanks to xet7 !
2026-11-21 18:17:53 +02:00
Lauri Ojansivu bc5bf3c25e Board, swimlane and list pickers show the name without a number in front.
#6135 was closed as fixed by fe4d2a56f, which took the "3. " prefix out of
the card move/copy popups and added a boardOptionLabel() helper that nothing
called. The list move/copy picker, the multi-selection move/copy picker, the
add-list position select and the restore-from-archive pickers kept
"{{add @index 1}}. {{title}}", so a board whose name starts with a digit was
still hard to read there and typing a name's first letter still did not jump
to it.

Those options now show the name alone. The helper and its test, which tested
code no template ran, are removed, and so are the Blaze helpers add and
increment, which only those numbers used. tests/optionLabelsStartWithName
pins the pickers to their names and fails on any option in the tree whose
label starts with an index number.

Thanks to mimZD and xet7 !

Fixes #6135.
2026-11-21 18:04:52 +02:00
Lauri Ojansivu b8734a8630 Remove two files nothing loads: popup.jade and migrations/009.
popup.jade at the repository root defined the templates popupPlaceholder and
popupDetached, which nothing renders or names; it was left over from the
v8.29 revert. The app loads its client from client/main.js, so a template
file outside that import graph is never compiled.

migrations/009_fix_v795_due_dates.js was a mongosh-style script on a global
`db`, which nothing imports or runs; it was the only file in migrations/.

Thanks to xet7 !
2026-11-21 17:59:37 +02:00
github-actions[bot] 83bc49af81 Bump versions for v13.25 2026-11-21 14:08:14 +00:00
Lauri Ojansivu a4e7a37509 Prepare v13.25 release 2026-11-21 16:07:08 +02:00
Lauri Ojansivu 464e0309bf Update WeKan changelog: CodeQL alerts #609 and #610, and the #605-#608 links after the rebase.
Thanks to GitHub CodeQL and xet7 !
2026-11-21 13:22:53 +02:00
Lauri Ojansivu cc4a494185 Fix CodeQL alerts #609 and #610: a OneNote page's removals are one replace.
The fix for #606 put the four removals - head/style/script elements,
comments, declarations, processing instructions - in one fixed-point loop,
but as a chain, x = x.replace(A).replace(B)...; CodeQL exempts a removal
only when its own result flows back into it, so the value between two
removals counted as unsanitized ("may still contain <!--", "<script").
Four assignments in a row were no better, checked with CodeQL 2.27.5. The
patterns are now one regex of alternatives in the loop: CodeQL reports
nothing. A declaration is <![^<>]*> so it cannot swallow the start of a
comment after a stray <!-, which the splice test caught.

tests/tagStrippingFixedPoint.test.cjs accepted the chain, which is how this
got through. It now accepts only the shape CodeQL exempts - prev = x; and
one x = x.replace(...); in the loop - flags the old OneNote lines 65 and
66 exactly, and has fixtures for a chain, several assignments and one
replace of alternatives.

Thanks to GitHub CodeQL and xet7 !
2026-11-21 13:22:24 +02:00
Lauri Ojansivu 6903f630f0 Update WeKan changelog: CodeQL alerts #605-#608.
Thanks to GitHub CodeQL and xet7 !
2026-11-21 11:29:58 +02:00
Lauri Ojansivu 3f5e4f3f14 Fix CodeQL alerts #605-#608 in the OneNote and Sandstorm grain formats.
#606: the OneNote page reader removed comments, declarations and
processing instructions in one pass after its head/style/script loop, so
`<scr<!---->ipt>` became a script once the element loop was done, and its
content reached the card as text. All four removals are now one loop to a
fixed point.

#607: the WordPress grain reader removed post comments in one pass;
`<!-<!-- x -->- y -->` was a comment again. It now loops to a fixed point.

#605: SandChat's users.uid came from Math.random. It now comes from Web
Crypto, in models/lib/sandstorm/randomHex.js.

#608: the SocialCalc header replaced its final newline with itself; the
no-op is removed and the test pins the exact header.

The guards that missed these now catch them across the tree: the
identity-replacement scanner compares \n-style escapes as characters, and
the fixed-point scanner refuses one-pass comment and declaration strips.
The SandChat test checks the uid shape, that each export makes new ones,
and that no Sandstorm grain code calls Math.random.

Thanks to GitHub CodeQL and xet7 !
2026-11-21 11:29:58 +02:00
github-actions[bot] b058dcee4d Bump versions for v13.24 2026-11-21 02:34:29 +00:00
Lauri Ojansivu a8850a4f9c Prepare v13.24 release 2026-11-21 04:33:27 +02:00
Lauri Ojansivu 08412ca264 Update WeKan changelog: documentation, and the Sandstorm guard fix.
Thanks to xet7 !
2026-11-21 04:27:44 +02:00
Lauri Ojansivu 4f022b8af6 Docs: README and feature docs list what WeKan has now, by its menus.
The README's import and export lists follow the headings of the Import page
and the Export menu - WeKan, 37signals, Atlassian, Google, Microsoft,
Sandstorm, then the kinds of tools - with the six Microsoft tools, Rocket.Chat,
Fizzy and the Sandstorm grain backups, and its Board Views follow the Board
View menu's six headings, with Calendar Mode, Column sets, Email, Chat and
Version Control that the list was missing. The feature docs' newest
features, the Import / Export overview, Board Settings and the docs index
have the new tools and the current counts (78 import sources, some sixty
export formats). tests/planeFormat.test.cjs checks Plane in the README's
Kanban and project tools group instead of the line it used to be on.

Thanks to xet7 !
2026-11-21 04:27:05 +02:00
Lauri Ojansivu c28f6de378 Sandstorm: EtherCalc's escaping in one pass, and Hacker CMS's title end tag with attributes.
The tree-wide guards scan committed files, so they saw the new Sandstorm
module only after it was committed. SocialCalc's save-format escaping was
three chained replaces - complete, the backslash first, but not in a form
tests/incompleteEscaping.test.cjs can tell from an incomplete one; it is
now one pass over a character class that holds the backslash. The Hacker
CMS page's <title> pattern now allows attributes in its end tag
(tests/securityAlerts20261012.test.cjs, alert 569).

Thanks to xet7 !
2026-11-21 04:27:05 +02:00
Lauri Ojansivu 035257dae9 Merge remote-tracking branch 'origin/main' 2026-11-21 04:08:24 +02:00
Lauri Ojansivu 17a8fd5c7f Update WeKan changelog: Sandstorm grain backups, and the Outlook and OneNote export fix.
Thanks to xet7 !
2026-11-21 03:47:44 +02:00
Lauri Ojansivu 6f3f6cc5a8 Import and export Sandstorm grain backups.
A new Sandstorm heading on the Import page and in the Export menu lists the
apps whose grain backup .zip (Download backup) WeKan reads, and for most of
them writes back as a grain Sandstorm restores. The grain's metadata, a
GrainInfo Cap'n Proto message, is read and written without a Cap'n Proto
library; each app's data is read from its own storage in data/:

- WeKan: FerretDB's SQLite (JSONB documents with their own type schema) and
  the attachments; several boards become swimlanes, "One board per
  project" splits them again. Import only.
- Prioritize (data.json), Yet Another TODO list (SQLite), uTodo (a bitcask
  log with CRC-32s), SandChat (SQLite), EtherCalc (SocialCalc's save
  format), Radicale calendar (.ics) and address book (.vcf), Davros (the
  files) and Hacker CMS (a Jekyll site): import and export.
- Gogs (SQLite issues) and WordPress (its SQLite posts and pages): import
  only - their grains are whole installations.

Rocket.Chat, Text Editor, SandForms and Piwik keep their data in MongoDB's
or MySQL's own files; their grains are refused with that reason, and any
grain of another app than the one chosen with the app it is. SQLite is read
and written with Node's own node:sqlite in a temporary directory. Every
reader was run on real grains of these apps; the tests make their own.

Low confidence translations include ace, ak, ay, ba, bi, bm, bo, bua, chr,
csb, cv, dz, ee, ff, fj, fo, fur, gn, gv, ha, haw, hsb, ig, iu, kl, kok, ks,
kw, tlh, vo, tig, wal, nah, qu, zgh, ve-PP, rup, lld, szl, sah, se, om, wo,
sm, to, tpi, rn, nd, ss, ts, ve, nso, st, tn, sn, ny, lg, mg, mi, sc, scn,
nap, wa, wa-RR, ve-CC, pap, yi, sd, mai, or_IN, uz-AR, ug, wuu-Hans, rm and
oc.

Thanks to xet7 !
2026-11-21 03:47:22 +02:00
Lauri Ojansivu 20c67216fe Outlook and OneNote exports: the files are written after the export boundary.
The export boundary passes every string that looks like markup through the
HTML sanitizer. Both exports wrote their files before it: the OneNote pages
lost their <html>, <head>, <title> and <meta>, and in the Outlook .eml files
"Message-ID: <c1@wekan.invalid>" read as a tag and was removed. As
Vikunja's archive HTML already is, the formatters now return plain values
and the .zip's files are written from the checked values afterwards
(outlookArchiveFiles, onenoteArchiveFiles). The negative tests run the
export through the boundary with a sanitizer that removes every tag; both
fail with the previous code.

Thanks to xet7 !
2026-11-21 03:23:36 +02:00
Lauri Ojansivu a53b2fa68f Update WeKan changelog: Vietnamese is no longer Malay.
Thanks to xet7 !
2026-11-21 02:25:07 +02:00
Lauri Ojansivu 02b101ad88 Vietnamese: comments and 282 other strings are Vietnamese, not Malay.
vi and vi-VN were partly seeded with Malay and Indonesian: "Komen" for
Comments, "Hapus komen?", "Anda pasti untuk hapus komen ini?", "Tambah
Daftar", the colours, Planning Poker, the minicard settings, the Node
heap statistics, the e-mail templates and more. They are written in
Vietnamese now, with the words the files already use (bảng, thẻ, danh
sách, làn, bình luận, danh sách kiểm tra); the values that already were
Vietnamese without diacritics (Xong, Xem, Khi, Trang) and the technical
names (SMTP, S3, Ctrl, arccos) stay as they were. vi-VN takes the same
text where it had the same Malay value. tests/vietnameseNotMalay.test.cjs
fails on a Malay or Indonesian word in either file and on a placeholder
that differs from English.

Thanks to xet7 !
2026-11-21 02:24:58 +02:00
Lauri Ojansivu 358927a114 Update WeKan changelog: Azure DevOps Boards, Microsoft Lists, Project, Outlook, Teams and OneNote.
Thanks to xet7 !
2026-11-21 01:34:35 +02:00
Lauri Ojansivu 01e88410cd Import and export Azure DevOps Boards, Microsoft Lists, Project, Outlook, Teams and OneNote.
Azure DevOps Boards: a query's "Export to CSV" is imported (Board Column or
State as lists, Board Lane as swimlanes, Title 1/2/3 tree levels as parent
cards, "Name <address>" people, regional dates, other columns as custom
fields), and a board exports as the CSV "Import from CSV" reads.

Microsoft Lists: a list's "Export to CSV" is imported (Status or Progress as
the lists, people, dates, tags, other columns as custom fields), and a board
exports as a CSV that "New list - From CSV" makes a list of.

Microsoft Project: the "XML Format" (MSPDI) plan is imported (summary tasks
as swimlanes, progress as lists, subtasks, resources, predecessors), read by
a small XML reader that never resolves a DTD or an entity, and a board
exports as a plan Project opens.

Outlook: .msg files are read without a library - the Compound File Binary
format (MS-CFB) and the message's properties (MS-OXMSG) - into the mail
import, threads and attachments included, alone or in a .zip with .eml
files; a board exports as .eml files Outlook opens. The reader was checked
against .msg files saved by Outlook.

Teams and OneNote: fetched from Microsoft Graph with the member's token
(chats and channels; notebooks with their pages' HTML, to-do boxes as a
checklist), or read from a file - Teams' personal export .tar, Graph chat
messages, and the files WeKan exports: Teams chats as Graph chat messages,
OneNote pages as Graph's create-page XHTML in a .zip.

All six are under the Microsoft heading of Import and Export, with tests,
negative tests, live tests for the two Graph imports, documentation and the
import instruction in every language. Low confidence translations include
ace, ak, ay, bm, bo, bua, chr, csb, cv, dz, ee, ff, fj, gn, gv, haw, ig, iu,
kl, ks, kok, kw, ht, hsb, fur, fo, ga, gd, ku, lld, nah, nap, rup, sah, sc,
scn, se, nd, nso, ss, om, rn, rw, sm, sn, qu, pap, lg, mg, mi, ny, so, mai,
sd, ps, or_IN, my, si, rm, la, lb, tig, tlh, uz-AR, ve, ve-PP, ve-CC, vo, wa,
wal, wo, zgh, to, tpi, wa-RR and ts.

Thanks to xet7 !
2026-11-21 01:33:59 +02:00
github-actions[bot] 046d854ec9 Bump versions for v13.23 2026-11-20 20:25:24 +00:00
Lauri Ojansivu f5d2a208f8 Prepare v13.23 release 2026-11-20 22:24:25 +02:00
Lauri Ojansivu 38db577f31 Merge remote-tracking branch 'origin/main' 2026-11-20 22:23:52 +02:00
Lauri Ojansivu 71b0eb9b7c Update WeKan changelog: company headings in Import and Export.
Thanks to xet7 !
2026-11-20 22:17:19 +02:00
Lauri Ojansivu fa28e3fba8 Import and Export: a company's products under the company's name.
37signals (Basecamp, Fizzy), Atlassian (Trello, Jira), Google (Takeout,
Tasks, Keep) and Microsoft (Planner, To Do, Excel, GitHub) each have a
heading of their own after WeKan, and their products are shown without
the company's name in front of them.

Thanks to xet7 !
2026-11-20 22:17:02 +02:00
github-actions[bot] 79cc436257 Bump versions for v13.22 2026-11-20 19:05:46 +00:00
Lauri Ojansivu 67fa4344c6 Prepare v13.22 release 2026-11-20 21:04:53 +02:00
Lauri Ojansivu 7b2d37fb41 Update WeKan changelog: Rocket.Chat and Fizzy.
Thanks to xet7 !
2026-11-20 20:29:28 +02:00
Lauri Ojansivu dffbafd30f Import and export Rocket.Chat and Fizzy.
Rocket.Chat: "Download my data" as JSON (channels.json and a message file
per room, with its assets), one room's .json, and the .zip Rocket.Chat's
CSV importer reads are imported for Board View / Chat - a room is a card,
its messages the comments. A board exports as that CSV importer .zip:
users.csv, channels.csv and a messages.csv per card.

Fizzy (37signals): its account export (data/<table>/<id>.json and
storage/) and personal data export (<number>.json per card) are imported -
boards become swimlanes, columns lists between Maybe?, Not now and Done,
with tags, assignees, steps, comments, golden and files. A board exports as
the account export Fizzy's account import reads, every row with every
column its import requires, ids as base36 UUIDv7.

Both formats are read and written from their projects' source code, with
tests, documentation and the import instruction in every language. Low
confidence translations include chr, ay, bm, bua, bo, cv, csb, ak, bi, ace,
ba, gn, gv, iu, kl, ig, kok, nah, qu, kw, lld, nap, rm, om, ks, tlh, tig,
rup, sah, se, ss, sm, to, tpi, dz, ee, ff, fj, fo, uz-AR, ve, ve-PP, vo,
wal, wa, wo, zgh, ve-CC, wa-RR, wuu-Hans, yi, xh and yo.

Thanks to xet7 !
2026-11-20 20:29:01 +02:00
Lauri Ojansivu dd57704ed1 Update WeKan changelog: Planner columns.
Thanks to xet7 !
2026-11-20 19:54:55 +02:00
Lauri Ojansivu d3aa34e7b8 Planner: the newer "Export as Excel" column names are read too; Linear is checked against its importer.
Microsoft's "Export a plan to Excel" page describes the newer Planner's
export with Status, Task title and Assignments, where the classic export
(the plannr fixture the tests use) writes Progress, Task Name and Assigned
To. The import now finds a column by either name, so the newer workbook is
not refused for a missing Task Name column. Linear's open-source importer
(@linear/import, LinearCsvImporter.ts) declares the columns the parser
reads, so Linear leaves TODO.md's list; Planner stays until a real newer
export confirms the exact header spelling.

tests/plannerFormat.test.cjs: the newer names, and a sheet without a title
column still refused.

Thanks to xet7 !
2026-11-20 19:54:54 +02:00
Lauri Ojansivu c5f30d8b7f Release audit: allow files.slack.com for the Slack file download.
The Slack import's file sign-in (models/lib/importAttachmentAuth.js) names
https://files.slack.com, the one host a Slack token is sent to, and the
release risk audit (tests/releaseTelemetry.test.cjs) stopped on the new URL
origin. It is added to that file's allowlist beside Asana's.

Thanks to xet7 !
2026-11-20 19:53:09 +02:00
Lauri Ojansivu 3a4163cfc3 TODO: Redmine and monday.com take a new column as a custom field; the proprietary tools are left.
Thanks to xet7 !
2026-11-20 19:44:54 +02:00
Lauri Ojansivu 2120be5ae1 Update WeKan changelog: GitLab health and severity.
Thanks to xet7 !
2026-11-20 19:44:34 +02:00
Lauri Ojansivu c916b15473 GitLab: an issue's health status and an incident's severity are kept as labels.
GitLab's Issues API v4 gives an issue a health_status (on_track,
needs_attention, at_risk) and an incident a severity, and the import
dropped both. They are now "health:..." and "severity:..." labels, as the
issue type is a "type:..." one; an UNKNOWN severity is none.

tests/gitlabImport.test.cjs: both labels, and none for a missing health or
an unknown severity.

Thanks to xet7 !
2026-11-20 19:44:33 +02:00
Lauri Ojansivu 0ef02911a8 TODO: GitHub checked against its REST issue; Focalboard's format is frozen since 2023.
Thanks to xet7 !
2026-11-20 19:43:51 +02:00
Lauri Ojansivu 246b23eaf7 Docs: GitHub's issue type as a type: label.
Thanks to xet7 !
2026-11-20 19:43:00 +02:00
Lauri Ojansivu b4e66b7584 Update WeKan changelog: GitHub issue types.
Thanks to xet7 !
2026-11-20 19:42:47 +02:00
Lauri Ojansivu 9ceb4dbf55 GitHub's issue type is kept as a "type:" label.
GitHub's issues have a type since 2025 (Bug, Feature, Task, or the
organization's own), { name, color, ... } on the issue, and the import
dropped it. It is now a "type:<name>" label, as the GitLab import keeps
issue_type.

tests/githubImport.test.cjs: the label, and none without a type.

Thanks to xet7 !
2026-11-20 19:42:46 +02:00
Lauri Ojansivu 49dd8dcb00 Update WeKan changelog: GitHub, Gitea and Forgejo dates and people.
Thanks to xet7 !
2026-11-20 19:42:20 +02:00
Lauri Ojansivu efeb55f57a GitHub, Gitea and Forgejo keep an issue's creation and close dates, people and Gitea's time estimate, both ways.
Checked against Gitea's current Issue struct (modules/structs/issue.go): the
import read neither created_at nor closed_at nor Gitea 1.23's
time_estimate, and the export wrote no dates, no assignee and no author, so
a round trip lost the creation date, the owner and the requester (as
tests/exportRoundTripFields.test.cjs showed). The import now reads
created_at as the creation date, closed_at of a closed issue as its end and
time_estimate (seconds) as the Time estimate (hours) custom field; the
export writes the owner as assignee and assignees, the creator as user,
created_at, closed_at of a closed issue and the time estimate.

tests/githubImport.test.cjs: the dates and the estimate, and an open issue
without an end; tests/exportRoundTripFields.test.cjs holds all three to the
creation date, owner and requester now.

Thanks to xet7 !
2026-11-20 19:42:18 +02:00
Lauri Ojansivu 85da7079fb TODO: Plane, Kanri, Obsidian Kanban and Nullboard checked against their current source; Pivotal Tracker is shut down.
Plane's current IssueExportSerializer has the fields the parser reads, in
the same order; Kanri's kanban-types.d.ts the board, column, card, task and
tag fields; Obsidian Kanban's parser the frontmatter key, settings block,
archive and complete markers; Nullboard's board object its format, id,
revision, title, lists and notes, and a history of revision numbers that
is not board data (noted in nullboardFormat.js). Pivotal Tracker was shut
down in 2025. They leave the list of tools still to check with a real
export.

Thanks to xet7 !
2026-11-20 19:40:31 +02:00
Lauri Ojansivu bb733d7692 Update WeKan changelog: Slack files.
Thanks to xet7 !
2026-11-20 19:38:17 +02:00
Lauri Ojansivu dd8242b82f Slack import downloads the messages' files with a Slack token.
A Slack export names each message file by its url_private on
files.slack.com, behind Slack's sign-in, and does not carry it; the import
counted every one. The import page's file sign-in now offers Slack too: with
a token of the files:read scope, each file is downloaded from
files.slack.com only - the token goes to no other host, and the download is
the import's guarded fetch like every other attachment - and attached to
the channel's card. Without a token a file is reported as not downloaded,
since Slack would answer with its sign-in page; a deleted file or one
hidden by the plan's history limit has no address and is counted.

tests/importAttachmentAuth.test.cjs: the token on Slack's file host only,
no download without one, the files on the channel card and the counted
ones.

Thanks to xet7 !
2026-11-20 19:38:16 +02:00
Lauri Ojansivu 709fa87f4a Update WeKan changelog: Super Productivity repeats.
Thanks to xet7 !
2026-11-20 19:35:50 +02:00
Lauri Ojansivu 35f3f6c9db Super Productivity export writes a repeating card's taskRepeatCfg, so it repeats there too.
The import read a task's repeat config, and the export wrote none, so a
repeating card came back from Super Productivity once. It was left until
the config could be checked against the app; it is now written with the
fields and defaults of Super Productivity's own model
(src/app/features/task-repeat-cfg/task-repeat-cfg.model.ts, TaskRepeatCfgCopy
and DEFAULT_TASK_REPEAT_CFG): every required field, the cycle and its quick
setting, the start date (due, or created), the weekday of a weekly repeat,
and today as the last creation day, since the card is this period's task.
An open card only, and the slice only when there is one.

tests/recurrenceMap.test.cjs: the required fields, the three cycles, no
config for a finished or one-off card, the task's repeatCfgId and the round
trip; tests/exportRoundTripFields.test.cjs: Super Productivity keeps the
recurrence.

Thanks to xet7 !
2026-11-20 19:35:49 +02:00
Lauri Ojansivu f918deef0f TODO: the import/export review is done against every documented format; what is left needs accounts on the tools or a running copy.
The review went through every parser and formatter; what it found is fixed
in the Upcoming release and held by the round-trip tests. The rest needs a
real export of each tool's newest release, a running Super Productivity, or
a Slack token, and is listed under the category that says so.

Thanks to xet7 !
2026-11-20 19:25:38 +02:00
Lauri Ojansivu deb4eed14e Update WeKan changelog: Telegram and Discord files.
Thanks to xet7 !
2026-11-20 19:25:18 +02:00
Lauri Ojansivu 828ca63713 Telegram and Discord imports bring their message files: a zipped export folder's photos and files are attachments.
Telegram Desktop writes result.json with photos/ and files/ beside it, and
DiscordChatExporter with --media a <name>.json_Files folder; the imports
read only the JSON and counted every file. Both now also take the export
folder zipped (the Import page, the many-files import and api.py): the
JSON is read as before, and every file its messages name by a local path
is read under the same per-file and whole-archive inflate limits as the
Slack zip (server/lib/chatArchives.js), then attached to the chat's card
through the generic importer's embedded-file path - so the after-upload
type and size checks of every upload apply. A file the folder does not
carry ("File not included", a Discord link) is still counted; a file no
message names is not read.

tests/chatExportFormats.test.cjs: both zips, only the named files read, the
left-out file counted, the JSON alone as before, and the wiring.
tests/importSources.test.cjs: the zip sources, and api.py agreeing.

Thanks to xet7 !
2026-11-20 19:25:17 +02:00
Lauri Ojansivu 133be01324 Update WeKan changelog: Linear cycles.
Thanks to xet7 !
2026-11-20 19:20:45 +02:00
Lauri Ojansivu 75694ac644 Linear cycles become Scrum sprints and project milestones Scrum releases.
Linear's CSV export carries each issue's cycle with its Cycle Start and
Cycle End, and its project milestone, and the import kept the cycle name as
a custom field and reported the dates and the milestone. With Scrum ticked
in the import, each cycle is now a sprint with those dates - one per team,
since a cycle number is its team's - and each project milestone a release,
through models/lib/externalScrumPlanning.js like GitLab's iterations and
Pivotal's. As for Pivotal and Jira, a cycle whose issues are all done is
finished and not imported (no commitment or close snapshot in the export),
and any other is planned; a milestone has no dates in the CSV. Both are in
the loss report.

tests/linearCsv.test.cjs pinned the cycle dates and milestones as lost
columns and now pins the sprints and releases, per team, with the finished
cycle and an issue without either.

Thanks to xet7 !
2026-11-20 19:20:44 +02:00
Lauri Ojansivu 9a18cc3dda Update WeKan changelog: Basecamp steps.
Thanks to xet7 !
2026-11-20 19:17:27 +02:00
Lauri Ojansivu a72b297268 Basecamp card steps keep their due date and assignee.
A Basecamp card step has its own due_on and assignees, and the import kept
only its title and done mark; a WeKan checklist item has a due date and an
assignee too (models/lib/importedTaskPlan.js importedChecklists). The step's
due date and first assignee are now its item's.

tests/basecampApiImport.test.cjs: the step's fields onto the checklist
item, and a step without them.

Thanks to xet7 !
2026-11-20 19:17:26 +02:00
Lauri Ojansivu 651378d163 Update WeKan changelog: Taiga blocked.
Thanks to xet7 !
2026-11-20 19:15:35 +02:00
Lauri Ojansivu ab884547f4 Taiga's blocked state is the card's Blocked flow field, both ways.
WeKan cards have a Blocked flow field with a reason, and the Taiga import
put is_blocked / blocked_note into a "Blocked" custom field, from before the
flow field existed. A normalized task may now carry blocked and
blocked_reason, which the shared import plan writes as the card's flow
field; the importer turns on Board Settings / Card's Blocked display for a
board with a blocked card, since flow fields are off until a board shows
them. Taiga uses it, and its export writes the card's Blocked flow field
(or the custom field of a board imported before) back to is_blocked and
blocked_note.

tests/taigaFormat.test.cjs pinned the custom field and now pins the flow
field, the board display and the export; tests/exportRoundTripFields.test.cjs
holds every format to whether it keeps Blocked.

Thanks to xet7 !
2026-11-20 19:15:34 +02:00
Lauri Ojansivu 8ac7afe95f Update WeKan changelog: Todoist and TickTick columns.
Thanks to xet7 !
2026-11-20 19:04:21 +02:00
Lauri Ojansivu c72a05d11a Todoist and TickTick report a column they do not write, instead of dropping it.
A sweep of the CSV imports with an extra column (each format's own export
plus one) found Linear, MeisterTask, Pivotal and Quire reporting it,
Redmine, Notion and now ClickUp keeping it as a custom field - and Todoist
and TickTick dropping it without a word. Their own exports have fixed
columns, so an extra one is a hand-edited file; it is now named in the loss
report.

tests/todoistCsv.test.cjs and tests/ticktickCsv.test.cjs: the report, and
none for the format's own export.

Thanks to xet7 !
2026-11-20 19:04:20 +02:00
Lauri Ojansivu 01f52748f3 Update WeKan changelog: ClickUp custom fields.
Thanks to xet7 !
2026-11-20 19:03:04 +02:00
Lauri Ojansivu 60f569afe6 ClickUp: a workspace's custom field columns come across both ways, and the task link is kept.
A ClickUp workspace export writes each custom field as a column of its own,
and the import dropped every column it did not name - Story Points, Sprint,
any field of the workspace's - without a word, as it dropped Task Link.
Every column ClickUp does not name is now a custom field of its name, the
export writes a card's other custom fields back as columns (named over the
whole board, so every page has the same header), and the Task Link is
"Source: <link>" at the end of the description, as other imports keep a
source's link. ClickUp's own Rolled Up Time and Text columns repeat other
columns and are still not read.

tests/clickupCsv.test.cjs: both ways, one column per field, ClickUp's own
columns not made fields, and the Source line.

Thanks to xet7 !
2026-11-20 19:03:03 +02:00
Lauri Ojansivu d8fff9a41a Update WeKan changelog: Notion relations.
Thanks to xet7 !
2026-11-20 19:01:15 +02:00
Lauri Ojansivu f546ff2383 Notion relations between rows of an export become "related to" dependencies.
A Notion relation column names the related pages by title and path, and
the import reported every relation column as not imported. A related page
that is exactly one row of the export, in any of its databases, is now a
"related to" dependency between the two cards. A relation to a page that is
not a row, or to a title two rows share, is not guessed and is counted in
the loss report.

tests/notionFormat.test.cjs pinned the relation column as a loss and now
pins the dependency, with the negative cases.

Thanks to xet7 !
2026-11-20 19:01:13 +02:00
Lauri Ojansivu e38168789d Update WeKan changelog: Push Snap to Store.
Thanks to xet7 !
2026-11-20 18:59:04 +02:00
Lauri Ojansivu ce646dc937 Push Snap to Store releases what the store already has, each channel on its own, and uploads a file once.
The v13.20 and v13.21 runs uploaded wekan_13.21_amd64.snap again and again,
each time answered "Error checking upload uniqueness", and never released
it. The cause: snapcraft 9 renamed list-revisions to revisions, and the old
name only prints that and fails, so the script never found the revision the
store already had, and the store takes a file only once. On the dashboard
the wekan and wekan-gantt-gpl 13.21 revisions are "Can't be released:
ReviewQueued" - held for the store's manual review, greyed out on the web
too.

Now:
- the store's revisions are read with `snapcraft revisions` (the old name
  for an older snapcraft), and a revision the store has is released, never
  uploaded again;
- a file is uploaded once by default; after "Error checking upload
  uniqueness" the store's revision is released, or reported as held with
  how to ask for the review;
- every release goes to each channel on its own, so one the store refuses
  does not keep the revision out of the others, and each refusal is an
  error line in the log;
- after a release's files, the newest revision of every architecture the
  store has is released to every channel too
  (releases/snap-store-release-newest.sh), whatever the GitHub release
  holds - a revision approved later is released by the next run;
- a release with no wekan-ondra or wekan-gantt-gpl snap gets them made from
  its wekan snaps (releases/snap-rename.sh), as Release All Missing does;
- the release-time upload (snap-upload-retry.sh) still retries a
  uniqueness error (on v10.78 a store glitch), and when it outlasts the
  retries reports the file as held instead of failing the build.

Release All and Release All Missing both end by calling this workflow, so
the same steps run in all three. tests/snapStorePush.test.cjs and
tests/snapUploadProcessingBudget.test.cjs drive the scripts with a fake
snapcraft that answers as snapcraft 9 does.

Thanks to xet7 !
2026-11-20 18:59:03 +02:00
Lauri Ojansivu ae1f084fb1 Update WeKan changelog: subtask due dates and people.
Thanks to xet7 !
2026-11-20 18:37:54 +02:00
Lauri Ojansivu cf6f67e789 Imported subtasks keep their due date and person: a checklist item has both.
A WeKan checklist item has a due date and an assignee, and the shared
import plan and writer carried only its title and done mark - so Google
Tasks and KanbanFlow reported a subtask's due date and person as having "no
place on a WeKan checklist item". A normalized item may now carry `due` and
`assignee`; the plan maps the person to a board member (left out when not
mapped) and the writer stores dueAt and assigneeId. Google Tasks keeps a
subtask's due date, KanbanFlow its due date and person; a subtask's notes
and links are still reported.

tests/kanbanflowApiImport.test.cjs pinned the loss and now pins the item's
due date and assignee; tests/googletasksApiImport.test.cjs: the due date,
the notes still reported, and a due date that is no date.

Thanks to xet7 !
2026-11-20 18:37:53 +02:00
Lauri Ojansivu 3ccce83480 Update WeKan changelog: Planka 2.
Thanks to xet7 !
2026-11-20 18:29:00 +02:00
Lauri Ojansivu 0d65eec4f2 Planka 2: custom fields and stopwatch time come across.
Planka 2's custom fields (customFieldGroups, customFields,
customFieldValues) and a card's stopwatch were reported as not imported,
though imports make custom fields and WeKan cards have spent time. A value
is now the card's custom field of its field's name - "Group: Field" when two
groups have a field of that name - and the stopwatch total (seconds) is the
spent time. A value of a field the export does not name is still reported.

tests/plankaApiImport.test.cjs: both, the group disambiguation, and the
unnamed field.

Thanks to xet7 !
2026-11-20 18:28:58 +02:00
Lauri Ojansivu b26b148779 Update WeKan changelog: Asana.
Thanks to xet7 !
2026-11-20 18:27:33 +02:00
Lauri Ojansivu 57a657445e Asana: html_notes, approval states and comment likes come across.
An Asana API export asked for html_notes may carry only those, and the
card came in without a description; an approval task's approved, rejected
or changes-requested state, and who liked a comment, were dropped without a
word. The rich text is now the description, as text (the Microsoft To Do
body's careful stripping), the approval state a label, and a comment
story's likes its 👍 reactions, by who liked it - the likes the export does
not name are counted in the loss report.

tests/asanaImport.test.cjs: each of them, notes winning over html_notes,
and a pending approval being no state.

Thanks to xet7 !
2026-11-20 18:27:32 +02:00
Lauri Ojansivu b5a97bcd11 Update WeKan changelog: templates.
Thanks to xet7 !
2026-11-20 18:26:16 +02:00
Lauri Ojansivu a4359731b1 WeKan import keeps templates: a template board, card, list or swimlane stays a template.
The WeKan JSON import wrote no board, card, list or swimlane type, so a
template board came back as an ordinary board and its card, list and
swimlane templates as ordinary ones. tests/wekanCardFields.test.cjs did not
catch it: "type" appears elsewhere in wekanCreator.js (attachments have one)
and counted as written.

Now template-board, template-card, template-list and template-swimlane are
kept. A user's own Templates board (template-container) is imported as a
template board, since the importing user's Templates board is the one their
profile points to, and the loss report says so; its section swimlanes
become ordinary swimlanes. A linked card or board points at the exporting
WeKan, so it comes as an ordinary card.

Attachment versions need nothing: the original is the file, and a thumbnail
is made from it when first shown (#3275). A part of a board is exported by
Board Settings / Export's scope and imports as a board of its own. Both are
noted in the docs, and the WeKan item leaves TODO.md.

Thanks to xet7 !
2026-11-20 18:26:15 +02:00
Lauri Ojansivu c05ff7b9a8 TODO: the plain-Node round-trip test covers 32 formats.
Thanks to xet7 !
2026-11-20 18:24:09 +02:00
Lauri Ojansivu d7b0641295 Changelog: shorten the export round-trip summary.
Thanks to xet7 !
2026-11-20 18:24:02 +02:00
Lauri Ojansivu 105a1ed0c1 Update WeKan changelog: export round-trip fields.
Thanks to xet7 !
2026-11-20 18:23:48 +02:00
Lauri Ojansivu 1a02de4b5b Every export is held to what its own import reads back: Asana time tracking, Deck's done tick, Kanboard colors.
tests/exportRoundTripFields.test.cjs exports a card with every field set in
each of the 32 formats WeKan both writes and reads as text or JSON, parses
the file back, and holds each format to a KEEPS table of start and creation
dates, spent time, the due date's done tick, recurrence, owner, requester,
custom fields and color - the fields the Playwright round-trip spec does not
look at. A format that keeps less, or more, fails until its line changes.

What it found, fixed here:
- Asana: the import did not read actual_time_minutes, Asana's time
  tracking, and the export did not write it. Both do now.
- Nextcloud Deck: the export wrote done only with an end date, so a due date
  ticked done came back not done. It writes done: true then, which the
  import reads.
- Kanboard: the import mapped color_id to a card color and the export wrote
  none. It writes it back (the map moved to models/lib/kanboardFields.js).
(Kanboard, OpenProject, ClickUp and GitLab were fixed in the commits before.)

Thanks to xet7 !
2026-11-20 18:23:47 +02:00
Lauri Ojansivu 59ee94667d Update WeKan changelog: ClickUp and GitLab spent time.
Thanks to xet7 !
2026-11-20 18:14:11 +02:00
Lauri Ojansivu 14afc74adb ClickUp and GitLab exports write spent time, which their imports read and a round trip lost.
Both imports read a task's spent time (ClickUp's Time Spent milliseconds,
GitLab's time_stats.total_time_spent seconds), and neither export wrote it.
They do now, in the same units, so it comes back.

tests/clickupCsv.test.cjs and tests/gitlabImport.test.cjs: the round trip,
and nothing written when nothing was spent.

Thanks to xet7 !
2026-11-20 18:14:10 +02:00
Lauri Ojansivu ab1067e0b1 Update WeKan changelog: OpenProject time.
Thanks to xet7 !
2026-11-20 18:12:49 +02:00
Lauri Ojansivu 9bd503a71b OpenProject: remaining time is imported, and spent time is exported, so it survives a round trip.
The import read a work package's spentTime and estimatedTime but not its
remainingTime, and the export wrote no spentTime at all, so a card's spent
hours were lost on the way out. remainingTime is now the custom field
Remaining time (hours), and the export writes the spent hours as an ISO 8601
spentTime (PT1.5H), which the import reads back.

tests/openProjectImport.test.cjs: both ways, and none written when there is
none.

Thanks to xet7 !
2026-11-20 18:12:48 +02:00
Lauri Ojansivu a81050e9b8 Update WeKan changelog: Deck label colors.
Thanks to xet7 !
2026-11-20 18:11:33 +02:00
Lauri Ojansivu 22d000b913 Nextcloud Deck labels keep their colors.
A Deck label has a hex color, and the import created every label black.
The label now carries its color to the board label (hex colors are label
colors since #5514; models/lib/importedTaskPlan.js planImportedLabels
already took them from Kanri). A label without one stays black.

tests/deckImport.test.cjs pinned the bare label name and now pins the
color, onto the board label, with the colorless case.

Thanks to xet7 !
2026-11-20 18:11:32 +02:00
Lauri Ojansivu 1081ea7c88 Update WeKan changelog: Kanboard recurrence and fields.
Thanks to xet7 !
2026-11-20 18:10:05 +02:00
Lauri Ojansivu 28891103f6 Kanboard keeps its task recurrence, estimate, score, reference and external links, both ways.
WeKan's card recurrence was modelled on Kanboard's, and the Kanboard import
ignored a task's recurrence_status / _factor / _timeframe; it reported the
estimate as having no place although imports make custom fields; it
reported external links, and dropped score and reference without a word.
Now a repeat every 1 day, 7 days or 1 month is the card's recurrence (any
other is reported), time_estimated, score and reference are custom fields,
and each external link is a line of the description. The export writes
time_spent, the recurrence of an open card and those custom fields back.
The shared helpers are models/lib/kanboardFields.js, so the formatters,
which load on the client too, do not pull in the parsers.

tests/kanboardImport.test.cjs: both ways and the negative cases; it pinned
the estimate as a loss and now pins the custom field.
tests/recurrenceMap.test.cjs accepts a recurrence read through a module that
uses the mapper.

Thanks to xet7 !
2026-11-20 18:10:04 +02:00
Lauri Ojansivu a86e9d34e8 TODO: issue tracker reactions are reported; the rest is checked against each tool's export docs.
Thanks to xet7 !
2026-11-20 18:00:08 +02:00
Lauri Ojansivu 57413fd66a Update WeKan changelog: issue reaction counts.
Thanks to xet7 !
2026-11-20 17:59:59 +02:00
Lauri Ojansivu 1b9ec7b9a1 GitHub, Gitea, Forgejo and GitLab imports report reaction counts instead of dropping them.
An issue's and its comments' reactions summary (GitHub, Gitea, Forgejo) and
GitLab's upvotes and downvotes are counts, without who reacted. A WeKan
reaction is kept by who reacted (models/lib/importedReactions.js), so they
cannot come across - but they were dropped without a word. The loss report
now counts them.

tests/githubImport.test.cjs: the counts reported, and none when there are
none.

Thanks to xet7 !
2026-11-20 17:59:58 +02:00
Lauri Ojansivu 2268f9d8bd Update WeKan changelog: WeKan import keeps lists, checklists, custom fields and replies.
Thanks to xet7 !
2026-11-20 17:58:38 +02:00
Lauri Ojansivu 24b6b9b024 WeKan JSON import keeps lists' WIP limits, policies and splits, checklist settings, custom field access, item assignees and comment replies.
The same gap as the board and its cards, one level down: a list came back
without its WIP limit, flow policy, split into Doing and Done and role
restrictions; a swimlane without its height; a checklist without its hide
settings and reset schedule; an item without its assignee; a custom field
without "admin only" and "read only" - so a field only admins could see or
edit was open to everyone on the imported board; a reply without the
comment it answers.

models/lib/wekanRecordFields.js writes them, with the users, cards and
comments they name remapped (left out when they did not come), a
checklist's reset counted from the import, and a reply linked even when its
comment comes later in the export. A list role exception is kept only where
it restricts a role: a file does not open a list to a role the board's rule
keeps out. Sync bookkeeping, trash state and other boards' ids are named
with the reason they are not written.

tests/wekanCardFields.test.cjs holds every list to its schema, with
negative tests. The Meteor mocha tests of wekanCreator were not run here.

Thanks to xet7 !
2026-11-20 17:58:37 +02:00
Lauri Ojansivu 07f1028d03 Update WeKan changelog: WeKan import keeps every board and card field.
Thanks to xet7 !
2026-11-20 17:49:20 +02:00
Lauri Ojansivu c640c5c376 WeKan JSON import keeps every board and card field: all Board Settings, flow fields, votes, poker, stickers, drawings.
The WeKan JSON export writes the whole board and card documents, and the
import wrote 32 of the 210 board fields and about 30 of the 87 card fields.
A board exported and imported back came back with every Board Settings
choice at its default - what a card and a minicard show and in which order,
the flow policies, the board views, column sets, WIP limit groups, the date
format, notification delivery, the announcement - and its cards without
their flow fields (Blocked, Class of service, MoSCoW, WSJF), votes, planning
poker, stickers, locations, drawings, column-set columns, the due date's
done tick, mail headers, kind, map position and display settings.

models/lib/wekanBoardFields.js and wekanCardFields.js now write them, with
the users in a vote, a poker card or "blocked by" mapped to the new board's
(left out when they are not on it), lists remapped in the commitment point
and WIP limit groups, and a drawing's PNG by its new attachment id. The
Board Settings are written once the lists exist; a value the schema refuses
- from an older or newer WeKan - is left at its default and reported, and
the WeKan import now has a loss report at all. Not written, each with its
reason: access (organizations, teams, domains, instance editing) and
inbound email, which a file must not turn on; the trash, sync bookkeeping
and running timers; ids of other boards.

tests/wekanCardFields.test.cjs holds both lists to the schemas, so a field
added to WeKan is imported or named with why it is not. The Meteor mocha
tests of wekanCreator were not run here.

Thanks to xet7 !
2026-11-20 17:49:19 +02:00
Lauri Ojansivu 0999864cef Update WeKan changelog: chat threads.
Thanks to xet7 !
2026-11-20 17:35:52 +02:00
Lauri Ojansivu 1122e49ca9 Chat imports keep threads: a reply is a reply to the comment of the message it answers.
Slack (thread_ts), Mattermost (nested replies), Telegram
(reply_to_message_id) and Discord (reference) all say which message a reply
answers, and WeKan comments have replies (parentId, one level deep) - but
the import made every reply a comment of its own, a "↳" line at best. The
parsers now give each message its id and the id it answers, the import plan
(threadImportedComments) turns that into the comment it goes under -
flattened to one level, as WeKan's replies are - and the writer stores its
parentId. A reply to a message that is not in the file stays a comment of
its own, marked "↳".

tests/importedThreads.test.cjs: the four exports through the plan, the
writer, and the negative cases. tests/chatExportFormats.test.cjs pinned the
"↳" text and now pins the thread link.

Thanks to xet7 !
2026-11-20 17:35:51 +02:00
Lauri Ojansivu f72277a398 Update WeKan changelog: chat reactions.
Thanks to xet7 !
2026-11-20 17:33:47 +02:00
Lauri Ojansivu f467e31d17 Chat imports keep reactions: Slack, Mattermost, Telegram and Discord reactions become the comments' reactions.
All four exports say who reacted to a message with what, and WeKan
comments have reactions (card_comment_reactions: an emoji code point and the
users who reacted) - but every reaction was dropped without a word in the
import loss report. models/lib/importedReactions.js turns an emoji, or a
Slack / Mattermost shortcode, into the code point WeKan stores, and keeps a
reaction for each person mapped to a WeKan user. The import plan carries
them, the inserter writes the comment's reaction row, and the loss report
counts the reactions of people not mapped and those WeKan cannot store: an
unknown shortcode, a server's own emoji, several code points (a skin tone,
a flag).

tests/importedReactions.test.cjs: the mapping, the four parsers, the plan,
the writer, and negative tests - including that nothing else builds a
reaction code point.

Thanks to xet7 !
2026-11-20 17:33:46 +02:00
Lauri Ojansivu 8ff76652d4 TODO: the task tools keep priorities, sub-tasks, sections and repeats; the Super Productivity repeat export is left.
Thanks to xet7 !
2026-11-20 17:21:44 +02:00
Lauri Ojansivu 20c4d90217 Update WeKan changelog: Markdown labels, due dates and checklists.
Thanks to xet7 !
2026-11-20 17:21:08 +02:00
Lauri Ojansivu 10caa20b09 Markdown: #tags, due dates and indented checkboxes are labels, due dates and checklists, both ways.
The Markdown import read only a card's title, done mark and indented text:
the #tags and due dates markdown-kanban tools write stayed in the title, and
an indented "- [ ]" line - the card's checklist in those tools - became
description text. The export wrote neither labels, dates nor checklists.

Now #tag words are labels (a word starting with a letter: not "#1234", not
"C#"), @{day} @@{time} (Obsidian Kanban), 📅 day (Obsidian Tasks) and
due:day (todo.txt) are the due date, and indented checkboxes are the
checklist. The export writes them back, escaping a description line that
looks like a checklist item as "\- [ ]" so it reads back as text. A due day
that is no date is reported.

tests/markdownImportExport.test.cjs: both ways and the negative cases. The
round-trip spec's KEEPS table now has Markdown keep the checklist, label
and due date; that Playwright spec was not run here.

Thanks to xet7 !
2026-11-20 17:21:07 +02:00
Lauri Ojansivu 720374efd8 Update WeKan changelog: Leo creation dates.
Thanks to xet7 !
2026-11-20 17:18:52 +02:00
Lauri Ojansivu 3be07b147b Leo: a node's id stamp is the card's creation date, both ways; plugin data is reported.
Leo stamps every node's id (gnx) with the time it was made -
ekr.20260902080910.2 - and the import read it only as a key, while the
export wrote ids as wekan.1.N: a card's creation date was lost both ways.
The import now takes the time from the gnx (local time, read as UTC, as Org
does), and the export writes wekan.YYYYMMDDHHMMSS.n for a card that has a
creation date. Attributes of a <v> or <t> that Leo itself does not write are
its plugins' pickled data, dropped without a word until now; they are
reported.

tests/leoOutline.test.cjs: both ways, invalid stamps, and Leo's own
attributes not reported. tests/exportPaging.test.cjs looked a card's gnx up
as wekan.1.N and now accepts the stamped form.

Thanks to xet7 !
2026-11-20 17:18:50 +02:00
Lauri Ojansivu c2a9c36829 Update WeKan changelog: OPML attributes.
Thanks to xet7 !
2026-11-20 17:16:48 +02:00
Lauri Ojansivu 95b88095c4 OPML keeps created, category, links and an outliner's own attributes.
A card outline's created (OPML 2.0's creation date), its category (its
tags), and any attribute of the outliner's own - OmniOutliner writes its
columns as attributes - were dropped without a word, and a url / htmlUrl /
xmlUrl link was only reported. Now created is the creation date, each
comma-separated category a label (its leading "/" taken off), a link goes at
the end of the description, and any other attribute is a custom field. The
export writes created (RFC 822) and the labels as category. An attribute of
a list or a checklist item, and a created that is not a date, are reported;
type, isComment and isBreakpoint only say how a row is drawn.

tests/opmlOutline.test.cjs: both ways and the negative cases. The
round-trip spec's KEEPS table now has OPML keep labels; that Playwright
spec was not run here.

Thanks to xet7 !
2026-11-20 17:16:47 +02:00
Lauri Ojansivu 18740f4c22 Update WeKan changelog: every CSV, TSV and Excel column.
Thanks to xet7 !
2026-11-20 17:14:58 +02:00
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 b1ab04a764 Update WeKan changelog: Org mode properties and clocks.
Thanks to xet7 !
2026-11-20 17:12:47 +02:00
Lauri Ojansivu 55c3f574f4 Org mode: every property is kept, :ID: is the card's reference, LOGBOOK clocks are its spent time.
Of an Org heading's property drawer only :CREATED: was read, and the rest
of it - :ID:, :EFFORT:, any property of the user's own - and the whole
:LOGBOOK: drawer were dropped without a word in the import loss report.
Now :ID: / :CUSTOM_ID: is the card's source reference, every other property
is a custom field of that name (:NAME+: appends), and the closed CLOCK
lines add up to the spent time. The export writes the custom fields back as
properties. An open clock, a property line that is not :NAME: value, a
:CREATED: that is not a date and any other drawer are reported.

tests/orgMode.test.cjs: the round trip and the negative cases.

Thanks to xet7 !
2026-11-20 17:12:38 +02:00
Lauri Ojansivu 1984f72d5e Update WeKan changelog: Tasks.org, Vikunja and Super Productivity repeats.
Thanks to xet7 !
2026-11-20 17:10:39 +02:00
Lauri Ojansivu 878e53f418 Tasks.org, Vikunja and Super Productivity repeats become the card's recurrence too.
The rest of the task tools with a repeat rule, through
models/lib/recurrenceMap.js like the others:
- Tasks.org: the task's RRULE, imported and written back.
- Vikunja: repeat_after of a day or a week, repeat_mode 1 (monthly),
  imported and written back.
- Super Productivity: a task's repeatCfgId points to a taskRepeatCfg; one
  repeating every 1 day, week or month, not paused, makes the card repeat.
  Writing a repeat config back on export is left in TODO.md: it needs the
  app's scheduler fields checked against a running Super Productivity.
Any other rule, and the repeat of a finished task, stays in the import loss
report. Google Tasks' API has no repeat to read.

tests/recurrenceMap.test.cjs covers all three with negative tests; the
Tasks.org and Vikunja suites pinned "imported once" and now pin the repeat.

Thanks to xet7 !
2026-11-20 17:10:18 +02:00
Lauri Ojansivu 887fdc7e6d Merge remote-tracking branch 'origin/main' 2026-11-20 17:01:56 +02:00
Lauri Ojansivu bfdb37526e Update WeKan changelog: repeating tasks, snaps on every Snap Store channel.
Thanks to xet7 !
2026-11-20 16:59:46 +02:00
Lauri Ojansivu dc0a1ad049 Snaps: Release All pushes wekan, wekan-ondra and wekan-gantt-gpl to every Snap Store channel; Release All Missing adds what a release lacks.
The Push Snap to Store run for v13.20 failed three ways:
- wekan-ondra and wekan-gantt-gpl: "no assets match the file pattern". The
  snap-variants job uploaded them to the store but never attached them to
  the GitHub Release. It does now (github-release-upload.sh, on always()
  after its verify step).
- wekan: the store answered "Error checking upload uniqueness", a store-side
  failure, and snap-store-push.sh then waited two hours for a revision that
  upload never made. It now uploads again after a store failure (5xx,
  uniqueness), waits only when the store is really processing or already has
  the file, and fails at once on any other refusal.
- It ran on workflow_run and took "the latest release", which was v13.20.
  Release All now ends with a snap-store job that calls the workflow
  (workflow_call) for the tag it released, after snap-native,
  snap-launchpad and snap-variants.

Release All Missing:
- expected-assets.sh lists the snaps: wekan on six architectures, the two
  variants on amd64 and arm64.
- A missing variant snap is made from the release's own wekan snap by
  releases/snap-rename.sh, which changes only name and title in
  meta/snap.yaml - what snap-variants changes - and attached; then the
  release's snaps are pushed to the store.
- With no version, a scan job (releases/release-missing-scan.sh) checks the
  newest releases and starts one run per release missing something.
- What it cannot build no longer fails the plan, which skipped every build
  that could have been made; the done job is red for it at the end.

tests/snapStorePush.test.cjs: the retry and the immediate refusal, both
workflows, the rename and the scan, with fake snapcraft, squashfs and gh.

Thanks to xet7 !
2026-11-20 16:59:23 +02:00
Lauri Ojansivu 24ac6b2bd2 Repeating tasks of other tools repeat in WeKan: daily, weekly and monthly as the card's recurrence.
WeKan cards can repeat daily, weekly or monthly, but no import set it and no
export wrote it: Taskwarrior, Microsoft To Do, Todoist, TickTick, iCalendar,
Org mode and Obsidian Kanban all reported a repeat as lost and imported the
task once. models/lib/recurrenceMap.js reads their rules - RRULE, recur,
Org repeaters, "every week", To Do patterns - and returns daily, weekly or
monthly only when the rule is exactly that; anything else (every two weeks,
yearly, weekdays, a count or an end) stays in the import loss report.

The import plan sets recurrenceInterval and lastRecurrenceAt = the import
time, so the recurrence job does not copy every imported card at once from
its old creation date. Of Taskwarrior's instances, only the newest open one
of each template repeats. A finished task's repeat is reported, not kept.
The exports write it back: Taskwarrior recur, Org +1w, Obsidian 🔁, TickTick
Repeat, and RRULE in the iCal feed. The WeKan JSON import now keeps
recurrenceInterval too.

tests/recurrenceMap.test.cjs: every format both ways, and negative tests -
rules WeKan cannot keep stay reported, and no import sets a recurrence
outside the three or without the mapper. The five format suites that pinned
"imported once" now pin the repeat.

Thanks to xet7 !
2026-11-20 16:59:14 +02:00
691 changed files with 109713 additions and 8517 deletions

No files matched your search

+1 -1
View File
@@ -14,4 +14,4 @@ jobs:
with:
persist-credentials: false
- name: 'Dependency Review'
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1
+134 -6
View File
@@ -53,9 +53,14 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Release to complete, without the v (e.g. 10.58). Empty = the newest release.'
description: 'Release to complete, without the v (e.g. 10.58). Empty = check the newest releases and complete each one that is missing something.'
required: false
type: string
scan:
description: 'With no version: how many of the newest releases to check.'
required: false
type: string
default: '10'
# Read-only by default; the job that writes is granted it below.
permissions:
@@ -74,6 +79,10 @@ concurrency:
jobs:
recover:
# One release at a time: with no version, scan below starts a run of this
# workflow for every release that is missing something, and each of those
# recovers its own release.
if: ${{ inputs.version != '' }}
permissions:
contents: read
actions: write
@@ -95,6 +104,41 @@ jobs:
[ -n "$V" ] || V="$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName --jq .tagName)"
python3 releases/retry-failed-release.py "$V"
# With no version: which releases are missing something. Each of them gets a
# run of its own (`-f version=...`), which does everything below for it -
# retries the failed jobs of its full release, builds what can be built,
# renames the variant snaps and finishes its Snap Store release - so one
# run of this workflow, with no input, adds everything that is missing.
scan:
if: ${{ inputs.version == '' }}
permissions:
contents: read
actions: write
timeout-minutes: 15
name: which releases are missing something
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Start a run for each incomplete release
env:
GH_TOKEN: ${{ github.token }}
SCAN: ${{ inputs.scan }}
run: |
set -euo pipefail
case "${SCAN:-10}" in ''|*[!0-9]*) echo "::error::scan must be a number of releases, not '$SCAN'."; exit 1 ;; esac
bash releases/release-missing-scan.sh "${GITHUB_REPOSITORY:-wekan/wekan}" "${SCAN:-10}" > incomplete.txt
{
echo "### Releases missing something"
echo ""
if [ -s incomplete.txt ]; then sed 's/^/- /' incomplete.txt; else echo "None - the ${SCAN:-10} newest releases are complete."; fi
} >> "$GITHUB_STEP_SUMMARY"
while read -r version count; do
echo "v$version is missing $count asset(s): starting Release all missing for it."
gh workflow run release-all-missing.yml --repo "${GITHUB_REPOSITORY:-wekan/wekan}" --ref "${GITHUB_REF_NAME:-main}" -f version="$version"
done < incomplete.txt
plan:
needs: recover
# The planner runs whatever recover's rerun ended with. A rerun that still
@@ -102,7 +146,7 @@ jobs:
# so in every rerun of it (v12.68's OpenBSD start) - used to skip the
# planner and every build after it, so not even the assets that COULD be
# filled were. recover stays red and names the jobs; the rest goes on.
if: ${{ !cancelled() }}
if: ${{ !cancelled() && inputs.version != '' }}
timeout-minutes: 15
name: what the release is missing
runs-on: ubuntu-latest
@@ -114,6 +158,8 @@ jobs:
mac: ${{ steps.plan.outputs.mac }}
flatpak: ${{ steps.plan.outputs.flatpak }}
windows: ${{ steps.plan.outputs.windows }}
variant: ${{ steps.plan.outputs.variant }}
snap: ${{ steps.plan.outputs.snap }}
manual: ${{ steps.plan.outputs.manual }}
total: ${{ steps.plan.outputs.total }}
steps:
@@ -168,7 +214,7 @@ jobs:
total="$(wc -l < missing.txt | tr -d ' ')"
echo "total=$total" >> "$GITHUB_OUTPUT"
for kind in extra appimage mac flatpak windows bun; do
for kind in extra appimage mac flatpak windows bun variant snap; do
sels="$(awk -v k="$kind" '$1 == k { print $2 }' missing.txt)"
json="$(printf '%s\n' $sels | sed '/^$/d' | jq -R . | jq -sc .)"
[ -n "$json" ] || json='[]'
@@ -197,18 +243,25 @@ jobs:
echo ""
echo "Not buildable here (run release-all.yml): \`$manual\`"
fi
if grep -q '^snap ' missing.txt; then
echo ""
echo "wekan snaps are rebuilt by retrying the release's snap-native or snap-launchpad job (recover, above)."
fi
fi
} >> "$GITHUB_STEP_SUMMARY"
echo "Missing $total. Needs release-all.yml: ${manual:-none}"
# Not a failure HERE: a red plan skipped every build below (they need
# plan to succeed), so a release missing its amd64 zip did not get even
# the AppImages that could be made. The done job, at the end, is red
# for it instead.
- name: Say plainly what this run will not do
if: ${{ steps.plan.outputs.manual != '' }}
env:
STEP_PLAN_VERSION: ${{ steps.plan.outputs.version }}
STEP_PLAN_MANUAL: ${{ steps.plan.outputs.manual }}
run: |
echo "::error::v${STEP_PLAN_VERSION} still lacks ${STEP_PLAN_MANUAL} after recovery. Inspect the matching full-release run; older unnamed runs need their failed jobs retried manually."
exit 1
echo "::warning::v${STEP_PLAN_VERSION} still lacks ${STEP_PLAN_MANUAL} after recovery, which this workflow cannot build; the rest is built anyway. Inspect the matching full-release run; older unnamed runs need their failed jobs retried manually."
# The six architectures nobody else builds for, repacked from the PUBLISHED
# amd64 bundle - which is what makes this possible without a Meteor build.
@@ -517,6 +570,74 @@ jobs:
esac
echo "$mark charts" >> "$GITHUB_STEP_SUMMARY"
# wekan-ondra and wekan-gantt-gpl snaps the release lacks: the release's own
# wekan snap of that architecture under the variant's name and title
# (releases/snap-rename.sh) - what snap-variants builds from source, with
# nothing else changed. Releases before v13.21 have none attached.
variants:
permissions:
contents: write
name: variant snap ${{ matrix.variant }}
needs: plan
if: ${{ !cancelled() && needs.plan.result == 'success' && needs.plan.outputs.variant != '[]' }}
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
variant: ${{ fromJSON(needs.plan.outputs.variant) }}
env:
VERSION: ${{ needs.plan.outputs.version }}
VARIANT: ${{ matrix.variant }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Rename the release's wekan snap
id: rename
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
name="${VARIANT%%:*}"
arch="${VARIANT#*:}"
case "$name" in
wekan-ondra) title='Wekan Ondra' ;;
wekan-gantt-gpl) title='Wekan Gantt GPL' ;;
*) echo "::error::'$name' is not a variant snap."; exit 1 ;;
esac
case "$arch" in *[!a-z0-9]*|'') echo "::error::'$arch' is not an architecture."; exit 1 ;; esac
sudo apt-get install -y squashfs-tools >/dev/null
mkdir -p source out
if ! gh release download "v$VERSION" --repo "$GITHUB_REPOSITORY" --dir source --pattern "wekan_${VERSION}_${arch}.snap"; then
echo "::error::v$VERSION has no wekan_${VERSION}_${arch}.snap to make $name from. Retry the release's snap job first (recover does), then run this again."
exit 1
fi
bash releases/snap-rename.sh "source/wekan_${VERSION}_${arch}.snap" "$name" "$title" out
- name: Attach it to the release
if: ${{ always() && steps.rename.outcome == 'success' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
bash releases/github-release-upload.sh "$GITHUB_REPOSITORY" "v$VERSION" out/*.snap
# Every snap of the release, in every channel of its snap name: the same
# "Push Snap to Store" that release-all.yml ends with. A revision the store
# already has is released by number; nothing is uploaded twice.
snap-store:
needs: [plan, variants]
if: ${{ !cancelled() && needs.plan.result == 'success' }}
permissions:
contents: read
uses: ./.github/workflows/snap-store.yml
with:
tag: v${{ needs.plan.outputs.version }}
snaps: wekan wekan-ondra wekan-gantt-gpl
channels: stable,candidate,beta,edge
secrets:
SNAP_AUTH: ${{ secrets.SNAP_AUTH }}
# The end of the run attaches nothing: every job above attached its own files
# as it finished them. This only reports what the release still lacks, and it
# runs on always() - not !cancelled() - so a cancelled run still says what
@@ -525,7 +646,7 @@ jobs:
done:
timeout-minutes: 15
name: what is still missing
needs: [plan, extra-arches, appimage, mac, flatpak, windows-exe, charts, bun]
needs: [plan, extra-arches, appimage, mac, flatpak, windows-exe, charts, bun, variants, snap-store]
if: ${{ always() && needs.plan.result == 'success' }}
runs-on: ubuntu-latest
steps:
@@ -566,3 +687,10 @@ jobs:
echo "::warning::v$V is still missing:${still}"
echo "Still missing:\`${still# }\`" >> "$GITHUB_STEP_SUMMARY"
fi
# What only release-all.yml can build, still missing: red here,
# once everything that could be built has been.
case " $still" in
*" meteor/"*|*" repack/"*|*" sandstorm/"*)
echo "::error::v$V still lacks what only release-all.yml builds:${still}. Inspect the matching full-release run."
exit 1 ;;
esac
+42
View File
@@ -5530,6 +5530,10 @@ jobs:
needs: [prepare, release, snap-auth-check]
continue-on-error: true
timeout-minutes: 90
# contents: write attaches the built snap to the GitHub Release; the
# workflow's default is read.
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -5655,6 +5659,7 @@ jobs:
echo "snap=$BUILT_SNAP" >> "$GITHUB_OUTPUT"
- name: Verify the built snap is ${{ matrix.snapname }}
id: verify
if: steps.guard.outputs.snap == 'true'
env:
STEP_BUILD_SNAP: ${{ steps.build.outputs.snap }}
@@ -5684,6 +5689,21 @@ jobs:
SNAP_UPLOAD_LABEL="${STEP_BUILD_SNAP}" \
bash "$GITHUB_WORKSPACE/wekan/releases/snap-upload-retry.sh" "${STEP_BUILD_SNAP}" stable,candidate,beta,edge
# always(): a built variant snap goes onto the GitHub Release even when the
# Snap Store push above failed. "Push Snap to Store"
# (.github/workflows/snap-store.yml) releases the snaps OF A GITHUB
# RELEASE to the store - and until v13.21 this job only uploaded to the
# store, so v13.20 had no wekan-ondra_*.snap or wekan-gantt-gpl_*.snap and
# that workflow failed with "no assets match the file pattern".
- name: Attach the ${{ matrix.snapname }} ${{ matrix.arch }} snap to the GitHub Release
if: ${{ always() && steps.verify.outcome == 'success' && steps.build.outputs.snap != '' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STEP_BUILD_SNAP: ${{ steps.build.outputs.snap }}
run: |
set -euo pipefail
bash "$GITHUB_WORKSPACE/wekan/releases/github-release-upload.sh" "${GITHUB_REPOSITORY:-wekan/wekan}" "v${VERSION}" "${STEP_BUILD_SNAP}"
# Always, as the last step: the run summary then answers "what worked and what
# did not" for the whole release at a glance, instead of eighteen job logs. A
# step that failed has already printed an ::error:: saying why; this names the
@@ -5710,6 +5730,28 @@ jobs:
# Refresh the selected changelog notes after builds. Binary provenance remains
# in build artifacts and is never appended to release notes.
# ─── Finish the Snap Store release of all three snaps ───────────────────────
# snap-native, snap-launchpad and snap-variants upload each snap with
# --release to every channel, but the store can keep a revision in
# "processing" for hours and then not release it: on v13.20 every snap job
# was green and the store kept the old version of wekan, wekan-ondra and
# wekan-gantt-gpl. This job takes the snaps those jobs attached to THIS
# release and releases each to stable, candidate, beta and edge - a revision
# the store already has by number, a missing one by uploading it - and is red
# when one did not get there. It also runs by hand as "Push Snap to Store".
snap-store:
needs: [prepare, snap-native, snap-launchpad, snap-variants]
if: ${{ !cancelled() && needs.prepare.result == 'success' }}
permissions:
contents: read
uses: ./.github/workflows/snap-store.yml
with:
tag: v${{ needs.prepare.outputs.version }}
snaps: wekan wekan-ondra wekan-gantt-gpl
channels: stable,candidate,beta,edge
secrets:
SNAP_AUTH: ${{ secrets.SNAP_AUTH }}
release-notes:
permissions:
contents: write
+58 -13
View File
@@ -15,8 +15,11 @@ name: Push Snap to Store
# processing, and FAILS - red, not green - when a snap still did not reach a
# channel.
#
# It runs after every "Release All Platforms" run, and by hand from the
# Actions tab for any release, snap names and channels.
# "Release All Platforms" calls it as its last snap job, for the tag it just
# released (its snap-store job), and it runs by hand from the Actions tab for
# any release, snap names and channels. It used to run on workflow_run after
# every Release All run and take "the latest release" - which, for a run that
# finished before its release was published, was the previous one (v13.20).
#
# Secrets: SNAP_AUTH, as for release-all.yml - an exported login carrying
# package_access, package_push, package_release and package_update for all
@@ -37,9 +40,22 @@ on:
description: 'Channels to release to'
required: false
default: 'stable,candidate,beta,edge'
workflow_run:
workflows: ['Release All Platforms']
types: [completed]
workflow_call:
inputs:
tag:
type: string
required: true
snaps:
type: string
required: false
default: 'wekan wekan-ondra wekan-gantt-gpl'
channels:
type: string
required: false
default: 'stable,candidate,beta,edge'
secrets:
SNAP_AUTH:
required: true
permissions:
contents: read
@@ -64,9 +80,9 @@ jobs:
id: plan
env:
GH_TOKEN: ${{ github.token }}
INPUT_TAG: ${{ github.event.inputs.tag }}
INPUT_SNAPS: ${{ github.event.inputs.snaps }}
INPUT_CHANNELS: ${{ github.event.inputs.channels }}
INPUT_TAG: ${{ inputs.tag }}
INPUT_SNAPS: ${{ inputs.snaps }}
INPUT_CHANNELS: ${{ inputs.channels }}
run: |
set -euo pipefail
tag="${INPUT_TAG:-}"
@@ -101,6 +117,7 @@ jobs:
sparse-checkout: releases
persist-credentials: false
- name: Install snapcraft and check SNAP_AUTH
id: snapcraft
env:
SNAP_AUTH: ${{ secrets.SNAP_AUTH }}
run: |
@@ -126,12 +143,29 @@ jobs:
run: |
set -euo pipefail
mkdir -p snaps
gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --dir snaps --pattern "${SNAP}_*.snap"
ls -l snaps
if ! ls snaps/"${SNAP}"_*.snap >/dev/null 2>&1; then
echo "::error::Release $TAG has no ${SNAP}_*.snap to push."
exit 1
# A release cut before v13.22 has no wekan-ondra or wekan-gantt-gpl
# snap attached (snap-variants did not attach them). A variant IS
# wekan with another name and title, so it is made from the
# release's wekan snaps (releases/snap-rename.sh), as Release All
# Missing does.
if ! gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --dir snaps --pattern "${SNAP}_*.snap"; then
case "$SNAP" in
wekan-ondra) title='Wekan Ondra' ;;
wekan-gantt-gpl) title='Wekan Gantt GPL' ;;
*) echo "::error::Release $TAG has no ${SNAP}_*.snap to push: its snap job did not attach one (snap-native and snap-launchpad attach wekan). Re-run that job of the release, or Release All Missing, then this workflow."; exit 1 ;;
esac
mkdir -p wekan-snaps
if ! gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --dir wekan-snaps --pattern "wekan_*.snap"; then
echo "::error::Release $TAG has neither ${SNAP}_*.snap nor a wekan_*.snap to make it from. Re-run the release's snap jobs, or Release All Missing, then this workflow."
exit 1
fi
sudo apt-get install -y squashfs-tools >/dev/null
for f in wekan-snaps/wekan_*.snap; do
bash releases/snap-rename.sh "$f" "$SNAP" "$title" snaps
done
echo "::notice::$TAG had no ${SNAP} snap; made it from the release's wekan snaps."
fi
ls -l snaps
- name: Push ${{ matrix.snap }} to the Snap Store, releasing to ${{ needs.plan.outputs.channels }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_AUTH }}
@@ -148,3 +182,14 @@ jobs:
echo "::error::Not released:$failed. The ::error:: lines above say why."
exit 1
fi
# The newest revision the store has of each architecture, released to
# every channel too - one that reached the store some other way, or a
# reviewer approved later, whatever this release's files are. always():
# also when a file above was not taken.
- name: Release the newest ${{ matrix.snap }} revisions the store has to ${{ needs.plan.outputs.channels }}
if: ${{ always() && steps.snapcraft.outcome == 'success' }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_AUTH }}
CHANNELS: ${{ needs.plan.outputs.channels }}
SNAP: ${{ matrix.snap }}
run: bash releases/snap-store-release-newest.sh "$SNAP" "$CHANNELS"
+943 -1053
View File
File diff suppressed because it is too large. Load diff
+34 -36
View File
@@ -5,53 +5,51 @@ each one changed and the project status are in
Written by `node releases/changelog-short.mjs` from CHANGELOG-big.md:
make changes there.
# v13.21 2026-11-20 WeKan ® release
# v13.27 2026-11-22 WeKan ® release
Twelve new **Board View reports** - Created vs. Resolved, Net
Flow, Time in List and more - and **grouped menus**: the Board View menu, the
Import and Export lists and the list, card and swimlane menus have headings.
WeKan imports **mail**, **calendars**, **chats** and **notes**, and large files
are **streamed to disk** within the free space or an Admin Panel limit. Menu
entries that did nothing now work. Cards get the **Kanban and Scrum flow
fields** Blocked, Class of service, MoSCoW and WSJF, lists their **policies**,
the board menu a **standup timer** and a **retrospective board**, every export
is **written a page at a time**, and **InviteBleed** is closed for the old
invitation codes too.
**CodeQL** alert #611 is fixed: the **autolink rules** find the
links already in a card's text in linear time, so a description built of
thousands of brackets no longer takes seconds to render.
[All changes in v13.21](CHANGELOG-big.md#v1321-2026-11-20-wekan--release)
[All changes in v13.27](CHANGELOG-big.md#v1327-2026-11-22-wekan--release)
# v13.20 2026-11-19 WeKan ® release
# v13.26 2026-11-22 WeKan ® release
The **REST API** card lists of a list and of a swimlane now carry
what a syncing client needs - when a card changed, its labels, members and
custom field values - so syncing a board needs no request per card. **build.sh**
and **build.bat** can run a single **Playwright** spec.
New **Workload and capacity**, **Budget and billing** and **Cloud
Panel** pages: hours against working time, each board's cost and margin with
**expenses**, **fees**, **quotes** and **invoices** in **PDF**, **Excel** and
**e-invoice**, and many customer domains merged into one WeKan. WordPress,
Ghost, Blogger and static sites import and export under **Website**, and a
public board can show itself as a **website**. The **Venda** and **Klingon**
translations hold only their own language, the move and copy pickers show names
without numbers (#6135), and unused code is removed.
[All changes in v13.20](CHANGELOG-big.md#v1320-2026-11-19-wekan--release)
[All changes in v13.26](CHANGELOG-big.md#v1326-2026-11-22-wekan--release)
# v13.19 2026-11-19 WeKan ® release
# v13.25 2026-11-21 WeKan ® release
**Release builds** no longer fail when the **Snap Store** is slow
to process an upload, or when a **Termux** or **BSD** package mirror has a bad
minute.
**CodeQL** alerts #605-#610 in the **OneNote** and **Sandstorm
grain** formats are fixed: comments in imported HTML are removed to a fixed
point, SandChat user ids come from a cryptographic generator, and the guards
that missed these shapes now find them anywhere in the tree.
[All changes in v13.19](CHANGELOG-big.md#v1319-2026-11-19-wekan--release)
[All changes in v13.25](CHANGELOG-big.md#v1325-2026-11-21-wekan--release)
# v13.18 2026-11-19 WeKan ® release
# v13.24 2026-11-21 WeKan ® release
**Admin Panel / Problems** says what its numbers count - "New
problems: 1" and "Checks with findings: 8 / 31", in every language - and a
report row's address, location and user always belong to the same occurrence.
Six more of **Microsoft**'s tools are imported and exported under
the Microsoft heading: **Azure DevOps Boards**, **Microsoft Lists**,
**Microsoft Project** (XML), **Outlook** (.msg in, .eml out), **Teams** and
**OneNote**, the last two also fetched from Microsoft Graph. **Sandstorm** grain
backups of twelve apps are imported and nine exported, and **Vietnamese** no
longer shows Malay text.
[All changes in v13.18](CHANGELOG-big.md#v1318-2026-11-19-wekan--release)
[All changes in v13.24](CHANGELOG-big.md#v1324-2026-11-21-wekan--release)
# v13.17 2026-11-19 WeKan ® release
# v13.23 2026-11-20 WeKan ® release
The **Admin Panel** answers one question per tab: Settings gains
**Appearance**, **Features**, **Feature profiles**, Security, Activities and
notifications, and Delete, Problems keeps only what is going wrong, and every
old
address redirects. The docs now have a page for every menu entry, and cards of
an archived swimlane no longer appear in the first swimlane.
The **Import** page and the **Export** menu list a company's
products under the company's name: **37signals**, **Atlassian**, **Google** and
**Microsoft**.
[All changes in v13.17](CHANGELOG-big.md#v1317-2026-11-19-wekan--release)
[All changes in v13.23](CHANGELOG-big.md#v1323-2026-11-20-wekan--release)
+1 -1
View File
@@ -38,7 +38,7 @@ FROM --platform=$BUILDPLATFORM debian:trixie AS bundle
ARG TARGETARCH
ARG TARGETVARIANT
ARG VERSION=13.21
ARG VERSION=13.27
ARG DEBIAN_FRONTEND=noninteractive
COPY --chmod=755 releases/check-telemetry.py /tmp/check-telemetry.py
+66 -31
View File
@@ -42,18 +42,38 @@ that by providing one-click installation on various platforms.
- Board icons at Remaining, (Sub)Workspaces, Archive
- Shared Templates: Boards, Lists, Cards
- Add Board / Import ([all import and export formats](docs/Features/Board-Sidebar/Board-Settings/Import-Export/External-Tools.md)):
- WeKan JSON/.zip, CSV/TSV, Excel, Markdown, Obsidian Kanban, Leo, OPML, Org mode, todo.txt
- Trello, Jira, Asana, Zenkit, Focalboard, Todoist, Microsoft Planner, MeisterTask, Linear, TickTick, ClickUp, Nullboard, Kanri, Pivotal Tracker, Redmine, Tasks.org, monday.com,
Super Productivity, Taiga, Vikunja, Wrike (Excel and workflow), Quire, Teamwork.com, Businessmap, Notion, Plane
- Kanboard, Nextcloud Deck, OpenProject, Taskwarrior, Planka, KanbanFlow, Basecamp, Microsoft To Do, Google Tasks
- Mail (.eml/mbox), Calendars (iCalendar), Google Takeout, Google Keep, Evernote,
Chats: Slack, Mattermost, Telegram, WhatsApp, Discord - each into the view it fits
the tools are under the same headings as on the import page, a company's or a platform's products under its name
- WeKan JSON and .zip
- 37signals: Fizzy, Basecamp
- Atlassian: Trello (JSON, and a .zip of many boards with their files), Jira
- Google: Takeout (Tasks, Keep, Mail, Calendar, Chat), Tasks, Keep
- Microsoft: Excel, GitHub, Planner, Azure DevOps Boards, Lists, Project (XML), Outlook (.msg), To Do, OneNote, Teams
- Sandstorm grain backups: WeKan, Prioritize, Yet Another TODO list, μTodo, SandChat, EtherCalc,
Radicale calendar and address book, Davros, Hacker CMS, Gogs, WordPress
- Kanban and project tools: Kanboard, Nextcloud Deck, OpenProject, Asana, Zenkit, Focalboard, MeisterTask, Obsidian Kanban,
ClickUp, Nullboard, Kanri, monday.com, Taiga, Wrike, Teamwork.com, Businessmap, Quire, Notion, Plane
- Issue trackers and version control: GitLab, Gitea, Forgejo, Linear, Pivotal Tracker, Redmine
- Task and to-do apps: todo.txt, Taskwarrior, Todoist, TickTick, Tasks.org, Super Productivity, Vikunja
- Spreadsheets and tables: CSV / TSV
- Text and outlines: Markdown, Leo, OPML, Org mode
- Mail, calendars, chats and notes, each into the view it fits: Mail (mbox, .eml), iCalendar, Slack, Mattermost,
Telegram, WhatsApp, Discord, Rocket.Chat, Evernote
- [Website](docs/Features/Board-Sidebar/Board-Settings/Import-Export/Website/Website.md): WordPress (.xml, and Squarespace, Wix and others that write it),
WordPress REST API, Ghost, Blogger, Hugo / Jekyll / Eleventy / Astro (.zip of Markdown), HTML website and Medium (.zip), Substack
- Fetched from the service's API with your credentials: Planka, KanbanFlow, Basecamp, Microsoft To Do, OneNote and Teams,
Google Tasks and Keep
- Large files are streamed to disk, within its free space or the Admin Panel limit
- GitHub, GitLab, Gitea, Forgejo
- Import many boards at once: several export files, or a .zip of them, each its own board;
One board per project splits an export of a whole app into a board per project
- Change Color: Board theme and background image, Swimlane, List, Card
- Overrides: 1 Admin Panel, 2 Board Settings, 3 Member Settings
- Professional services (PSA), from the user menu:
- [Workload and capacity](docs/Features/Workload/Workload.md): each person's hours against their working time across boards,
absences, public holidays, allocations, placeholders for roles, billable utilization against a target, skills and who could do the work
- [Budget and billing](docs/Features/Billing/Billing.md): rates and cost rates, budget against cost and forecast, margin and unbilled work,
time by day and its approval, expenses, fixed fees and monthly retainers, quotes, invoices of a period
with VAT, payments and credit notes, as PDF, SVG, Excel, CSV and Peppol e-invoice, with the payment QR codes and
bank barcodes of many countries, in each currency's own decimals
- Drag drop reorder with one or Multi-Selection:
- Board icons to Workspaces at All Boards page
- Swimlane, List, Minicard
@@ -63,13 +83,13 @@ that by providing one-click installation on various platforms.
- Show My Dependencies, Show Board Dependencies, Import/Export JSON/SVG
- Dependencies are for SAFe PI Plannings, drawing colored lines between cards, like Kendis or Scaled Agile Framework. Import Export as JSON and SVG.
- My Cards, Due Cards, My Attachments, Search All Boards, Date Settings,
Change color - override theme, Nofications Settings (Tray, Email, etc),
Change color - override theme, Notifications Settings (Tray, Email, etc),
Font change and Font size change, Change Avatar,
Change Language (250+ languages)
Change Language (234 locale catalogs)
- Change Settings: Show desktop drag handles, Submit editors with Enter,
Open many cards at once, Play a sound when a checklist item is completed,
Show cards count if list contains more than ... cards,
Show rescue dialoque before closing for unsaved card descriptions
Show rescue dialogue before closing for unsaved card descriptions
- Board Views:
- Swimlanes, Lists
- Minicard: At list there is card, that has not been not opened yet
@@ -80,17 +100,19 @@ that by providing one-click installation on various platforms.
lists split into Doing and Done
- Drag drop reorder one or Multi-Selection: Swimlanes, Lists, Minicards, Checklists, Checklist Items
- Collapse/Uncollapse: Menus, Swimlanes, Lists, Cards
- Table, Calendar, Multi Board Calendar, Time, Timeline
- Statistics, Group by Assignee
- Gantt, Frappe Gantt, DHTMLX Gantt
- Scrum: Product Backlog, Sprints, Sprint Report, Velocity, Roadmap, Dashboard, Bigboard
- Burndown, Burnup, Cumulative Flow, Control, Cycle Time, Flow Efficiency,
Lead Time, Throughtput Histogram, WIP Run, Pulse, Aging WIP,
Blocker Analysis, Monte Carlo Forecasts, Process Behavior (XmR),
Work Item Size vs Cycle Time, Map
- Reports: Created vs. Resolved, Net Flow, Time in List, Average Age,
Throughput Run Chart, Due Date Performance, Release Burndown, Epic Progress,
Workload, Distribution, Dependency Map, Activity Heatmap - each with PDF and Excel export
- The Board View menu, under its headings; each view shown, hidden and ordered per board:
- Board: Swimlanes, Lists, Table, Group by Assignee, Bigboard, Map, Column sets
- Calendar and time: Calendar, Calendar Mode, Multi Board Calendar, Time, Timeline,
Gantt, Frappe Gantt, DHTMLX Gantt, Roadmap
- Scrum: Product Backlog, Sprints, Sprint Report, Velocity, Burndown, Burnup, Release Burndown, Epic Progress
- Kanban flow: Cumulative Flow, Control, Cycle Time, Flow Efficiency, Lead Time, Throughput Histogram,
WIP Run, Aging WIP, Blocker Analysis, Monte Carlo Forecasts, Process Behavior (XmR),
Work Item Size vs. Cycle Time, Created vs. Resolved, Net Flow, Time in List, Average Age,
Throughput Run Chart, Due Date Performance
- Overview: Statistics, Dashboard, Pulse, Workload, Distribution, Dependency Map, Activity Heatmap
- Communication and code: Email, Chat, Version Control,
[Website](docs/Features/Board-Sidebar/Board-Settings/Import-Export/Website/Website.md): the board as a website, which a public board can show at its own address instead of the kanban
- The charts and reports each have PDF and Excel export
- Right Sidebar / Board Settings:
- Rules: like IFTTT like Trello Butler
- Lists view for Rules
@@ -98,21 +120,31 @@ that by providing one-click installation on various platforms.
- Blocks: like Scratch or Jira AutoBlocks, shows same IFTTT Rules
- Import / Export IFTTT Rules; import n8n, Node-RED and Trello Butler; import / export Wrike workflows
- Export board :
- Select what to include: Card details, Board, Activities, Labels, People (Creator, Owner, Members, Assignees), Board Info (Board, List, Swimlane), Dates (Created, Received, Start, Due, End), Description, Custom Fields, Checklists, Subtasks, Comments, Attachments, Votin, Plannin Poker, Stickers, Location (link to map based on coordinates), Dependencies, Sort, Scrum Settings
- Export to ([all formats](docs/Features/Board-Sidebar/Board-Settings/Import-Export/External-Tools.md)): PDF, Excel, HTML, Calendar feed (iCal), Dependencies JSON/SVG,
CSV , ; TSV, JSON with/without attachmeents, .zip (Attachments),
Kanboard, Markdown, Leo, OPML, Org mode, todo.txt, Taskwarrior, Focalboard, Todoist,
Microsoft Planner, MeisterTask, Obsidian Kanban, Linear, TickTick, ClickUp, Nullboard, Kanri, Pivotal Tracker, Redmine, Tasks.org, monday.com,
Super Productivity, Taiga, Vikunja, Wrike (Excel and workflow), Quire, Teamwork.com, Businessmap, Notion,
Trello, Jira, NextCloud Deck, OpenProject, GitHub, GitLab,
Gitea, Forgejo, Asana, Zenkit, Trello .zip with attachments, mbox, Evernote, Mattermost
- Select what to include: Card details, Board, Activities, Labels, People (Creator, Owner, Members, Assignees), Board Info (Board, List, Swimlane), Dates (Created, Received, Start, Due, End), Description, Custom Fields, Checklists, Subtasks, Comments, Attachments, Voting, Planning Poker, Stickers, Location (link to map based on coordinates), Dependencies, Sort, Scrum Settings
- Export to ([all formats](docs/Features/Board-Sidebar/Board-Settings/Import-Export/External-Tools.md)):
under the same headings as Import
- WeKan: JSON with or without attachments, .zip with attachments; PDF, Excel, HTML, Calendar feed (iCal),
Dependencies JSON/SVG, CSV , ; TSV
- 37signals: Fizzy
- Atlassian: Trello (JSON, .zip with attachments, or straight into Trello through its API), Jira
- Microsoft: Planner, Azure DevOps Boards, Lists, Project (XML), Outlook (.eml), Teams, OneNote, GitHub
- Sandstorm grain backups that Sandstorm restores: Prioritize, Yet Another TODO list, μTodo, SandChat, EtherCalc,
Radicale calendar and address book, Davros, Hacker CMS
- Kanban and project tools: Kanboard, Focalboard, MeisterTask, Obsidian Kanban, ClickUp, Nullboard, Kanri, monday.com,
Wrike (Excel and workflow), Teamwork.com, Businessmap, Quire, Notion, Nextcloud Deck, OpenProject, Asana, Zenkit, Taiga
- Issue trackers and version control: Linear, Pivotal Tracker, Redmine, GitLab, Gitea, Forgejo
- Task and to-do apps: todo.txt, Taskwarrior, Todoist, TickTick, Tasks.org, Super Productivity, Vikunja
- Text and outlines: Markdown, Leo, OPML, Org mode
- Mail, chats and notes: mbox, Evernote, Mattermost, Rocket.Chat
- Website: WordPress (.xml and REST API .json), Ghost, Blogger, Hugo / Jekyll / Eleventy / Astro (.zip of Markdown),
HTML website (.zip, the published site ready for any web server)
- Every export is written a page of cards at a time, so a large board exports without running out of memory
- Export all boards at once (All Boards sidebar, or Multi-Selection): Excel as one workbook
with a sheet per board, every other format as a .zip with a file per board
- Scrum Settings: Definition of Ready and Done, Daily standup timer, Retrospective board
- Change color theme, Change Background Image, Date settings
- Settings:
- Board View: Show/Hide and drag drop reorder what is shown atat Public Board and Private Board
- Board View: Show/Hide and drag drop reorder what is shown at Public Board and Private Board
- Swimlane: Scrum settings, Lock resize swimlane height, WIP Limit Groups
- Board View: Show/Hide and drag drop reorder what is shown at Minicard and Card
- Admin Panel
@@ -127,6 +159,9 @@ that by providing one-click installation on various platforms.
- Global Webhooks
- People
- Email, Notifications, Domains, Organizations, Teams, People
- Cloud: the [Cloud Panel](docs/Features/Admin-Panel/Cloud-Panel.md) Domain and its SuperAdmin. At that domain the Cloud Panel keeps
the customer domains - each with its own WeKan and MongoDB, or sharing this WeKan - and merges many WeKans into one,
with CloudFlare DNS, Caddy routes, each customer's invoices, and a chat with earlier Rocket.Chat and SandChat conversations
- Locked Users, Roles, Shared Templates
- Login, SAML, LDAP, OAuth2 login providers, Passwordless login
- Attachments
@@ -170,7 +205,7 @@ docker-compose.yml at https://github.com/wekan/wekan/blob/main/docker-compose.ym
## Standards
- [WeKan and Standard for Public Code](https://wekan.fi/standard-for-public-code/) assessment was made at 2023-11. At 2026 WeKan becameß full FLOSS with [FerretDB v1 Fork](https://github.com/wekan/FerretDB), also see 2026 talk WeKan 10 years at https://wekan.fi/docs for more details.
- [WeKan and Standard for Public Code](https://wekan.fi/standard-for-public-code/) assessment was made at 2023-11. At 2026 WeKan became full FLOSS with [FerretDB v1 Fork](https://github.com/wekan/FerretDB), also see 2026 talk WeKan 10 years at https://wekan.fi/docs for more details.
Currently Wekan meets 9 out of 16 criteria out of the box.
Some others could be met with small changes.
+1 -1
View File
@@ -1,5 +1,5 @@
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
appVersion: "v13.21.0"
appVersion: "v13.27.0"
files:
userUploads:
- README.md
+33 -39
View File
@@ -20,44 +20,38 @@ the changelog only says what changed.
- The WebKit stage cannot run in the Flatpak sandbox: MiniBrowser needs its own
sandbox, and turning that off is not allowed there. Run it on a host.
## Import and Export of everything each tool has
## Need accounts on the tools, or a running copy of one
Asked on 2026-11-20: check and fix that everything each tool with a WeKan
import or export can hold comes across, whether a whole export is read or
written at once or only a part of it (a board, a project, some lists, a date
range), and check each tool's newest features - what its current version
exports and imports - so their data has a place in WeKan too. For every tool,
compare its newest export file, documentation and changelog with the parser
and the formatter here, record what is lost in the import loss report
(`unsupported`), and add what has a place in WeKan.
The import/export review asked on 2026-11-20 (everything each tool with a
WeKan import or export can hold comes across, whole or in part) went through
every parser and formatter against the export format its header documents.
What it found is fixed and in the Upcoming release; the round trips are held
by `tests/playwright/specs/export-import-round-trip.e2e.js` (41 formats, the
description, checklist, comment, dependency, label and due date) and
`tests/exportRoundTripFields.test.cjs` (32 formats in plain Node: start and
creation dates, spent time, the done tick, recurrence, people, custom fields,
color, Blocked), and a WeKan board's every field by
`tests/wekanCardFields.test.cjs`. What is left needs what this checkout does
not have:
Done so far: `tests/playwright/specs/export-import-round-trip.e2e.js` exports
a board in each of the 41 formats WeKan both writes and reads and imports the
file back; every one brings the card back, and its KEEPS table holds each
format to what its file keeps of the description, the checklist and the
comment, so a format that loses more fails. The Trello export imports back
with checklists, comments, members, custom fields and archived cards and
lists, and a Trello .zip export carries the attachment files; the GitHub,
Gitea and Forgejo exports carry the comments. What is left below is per tool: the
tool's newest features against its parser and formatter.
- WeKan's own JSON and .zip: every field of the current schema, attachments
and their versions, custom fields, rules, templates, Scrum data, and a part
of a board as well as all of it.
- Kanban and project tools: Kanboard, Nextcloud Deck, OpenProject, Asana,
Zenkit, Planner, monday.com, Wrike, Teamwork, Businessmap, ClickUp, Notion,
Plane, Taiga, Focalboard, Nullboard, Kanri, Obsidian Kanban, MeisterTask,
Quire, Planka, KanbanFlow, Basecamp - sub-items, dependencies, time
tracking, custom fields, comments, attachments and their newer views.
- Issue trackers: Jira, GitHub, GitLab, Gitea, Forgejo, Redmine, Linear,
Pivotal - epics, sprints, versions and milestones, links between issues,
work logs, reactions, and fields added in their newest releases.
- Task tools: Todoist, TickTick, Tasks.org, Super Productivity, todo.txt,
Taskwarrior, Vikunja, Microsoft To Do, Google Tasks, Google Keep -
recurrence, reminders, priorities, sub-tasks and sections.
- Spreadsheets, text and outlines: CSV / TSV, Excel, Markdown, Leo, OPML,
Org mode - every column, and every Org property and timestamp.
- Mail, calendars and chats: mail, mbox, iCalendar, Google Takeout, Slack,
Mattermost, Telegram, WhatsApp, Discord, Evernote .enex - threads, replies,
reactions, recurring events and the attached files that are now only
counted.
- Each tool's newest release, checked with a real export file of it: Planner,
Wrike, Teamwork, Businessmap, MeisterTask, Quire and Jira - the
proprietary ones, whose current export is only seen with an account
(Planner's newer Status, Task title and Assignments columns are read, as
Microsoft's help page names them; a real file would confirm their exact
spelling). The parsers follow
the formats the tools document and report what they do not read, so a new
field shows up in the import's loss report; checking for one needs an
account on each tool. (Checked against their current source on 2026-11-20:
Plane's IssueExportSerializer, Kanri's kanban-types.d.ts, Obsidian Kanban's
markers, Nullboard's board object, and Gitea's (and Forgejo's) Issue
struct, whose created_at, closed_at and time_estimate are read now;
GitHub's REST issue, whose issue type is read now; GitLab's Issues API v4,
whose health status and incident severity are read now. Redmine and
monday.com import every column they do not name as a custom field, so a
column a new release adds comes across without a change. Focalboard's archive
format is frozen: Mattermost stopped merging changes to Focalboard and
Boards in September 2023.
Pivotal Tracker was shut down in 2025, so there is no newer release.
Linear's open-source importer, @linear/import, declares the columns the
parser reads.)
+12 -2
View File
@@ -2029,11 +2029,18 @@ if arguments >= 3 and sys.argv[1] == 'exportboardpdf':
# { excelBase64 } (Plane's as { xlsxBase64 }), an export .zip as { zipBase64 },
# a CSV/TSV file as rows, a text format as its text, and the rest as JSON.
EXCEL_IMPORT_SOURCES = {'excel', 'planner', 'monday', 'wrike', 'teamwork', 'businessmap'}
ZIP_IMPORT_SOURCES = {'vikunja', 'notion', 'plane', 'slack', 'googletakeout'}
ZIP_IMPORT_SOURCES = {'vikunja', 'notion', 'plane', 'slack', 'googletakeout', 'telegram', 'discord', 'rocketchat', 'fizzy',
'outlook', 'teams', 'onenote',
'sandstormwekan', 'sandstormprioritize', 'sandstormyatl', 'sandstormmutodo', 'sandstormsandchat', 'sandstormethercalc',
'sandstormradicalecalendar', 'sandstormradicalecontacts', 'sandstormdavros', 'sandstormhackercms', 'sandstormgogs',
'markdownsite', 'htmlsite', 'substack', 'sandstormwordpress'}
# An Outlook .msg and the Teams export's .tar are sent as { binaryBase64 }.
BINARY_IMPORT_EXTENSIONS = {'outlook': ('.msg',), 'teams': ('.tar',)}
TEXT_IMPORT_SOURCES = {'markdown', 'todotxt', 'taskwarrior', 'focalboard', 'todoist', 'meistertask', 'obsidian',
'linear', 'ticktick', 'clickup', 'nullboard', 'pivotal', 'redmine', 'superproductivity',
'quire', 'orgmode', 'leo', 'opml', 'vikunja', 'notion', 'plane',
'mail', 'ical', 'mattermost', 'whatsapp', 'evernote', 'slack', 'googletakeout'}
'mail', 'ical', 'mattermost', 'whatsapp', 'evernote', 'slack', 'googletakeout', 'rocketchat', 'fizzy',
'azuredevops', 'mslists', 'msproject'}
def import_document(source, filepath):
import base64, csv, io, os
@@ -2045,6 +2052,9 @@ def import_document(source, filepath):
if source in ZIP_IMPORT_SOURCES and ext == '.zip':
with open(filepath, 'rb') as f:
return {'zipBase64': base64.b64encode(f.read()).decode('ascii')}
if ext in BINARY_IMPORT_EXTENSIONS.get(source, ()):
with open(filepath, 'rb') as f:
return {'binaryBase64': base64.b64encode(f.read()).decode('ascii')}
with open(filepath, encoding='utf-8-sig') as f:
text = f.read()
if source == 'csv':
+2
View File
@@ -142,6 +142,8 @@ template(name="boardBody")
+emailView
else if isViewChat
+chatView
else if isViewWebsite
+websiteView
else if isViewVersionControl
+versionControlView
else if isViewColumnSets
+3
View File
@@ -1022,6 +1022,9 @@ Template.boardBody.helpers({
isViewChat() {
return Utils.boardView() === 'board-view-chat';
},
isViewWebsite() {
return Utils.boardView() === 'board-view-website';
},
isViewColumnSets() {
return Utils.boardView() === 'board-view-column-sets';
},
+2 -1
View File
@@ -992,7 +992,8 @@ body.board-view.mobile-mode #header #header-main-bar .board-header-sidebar-toggl
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #6b778c;
/* 4.5:1 for small text; #6b778c on white is 4.48:1. */
color: #505f79;
cursor: default;
}
.pop-over-list .board-view-group-heading:not(:first-child) {
+5
View File
@@ -513,6 +513,10 @@ Template.boardChangeViewPopup.events({
Utils.setBoardView('board-view-chat');
Popup.back();
},
'click .js-open-website-view'() {
Utils.setBoardView('board-view-website');
Popup.back();
},
'click .js-open-version-control-view'() {
Utils.setBoardView('board-view-version-control');
Popup.back();
@@ -1023,6 +1027,7 @@ Template.boardViewMenu.helpers({
'board-view-map': 'board-view-map',
'board-view-email': 'board-view-email',
'board-view-chat': 'board-view-chat',
'board-view-website': 'board-view-website',
'board-view-version-control': 'board-view-version-control',
'board-view-column-sets': 'board-view-column-sets',
'board-view-created-resolved': 'board-view-created-resolved',
@@ -1,42 +0,0 @@
/**
* Pure helpers for building the option labels shown in board / list /
* swimlane selectors (e.g. the move-card and copy-card popups).
*
* Regression #6135 ("numbering boards, list, swim caused some issues"):
* a previous change prepended a sequential number to every option label
* (e.g. "3. My Board"). That broke two things:
*
* 1. Boards whose name itself starts with a digit became hard to read.
* 2. First-letter keyboard navigation in the native <select> dropdown
* stopped working, because every option started with a number instead
* of the board name.
*
* The fix: numbering is OPTIONAL and OFF by default. By default the label is
* exactly the entity name, so its first character is the name's first
* character and first-letter navigation works again. When numbering is
* explicitly enabled, the number is appended as a trailing visual suffix so
* the label still STARTS with the name.
*/
/**
* Build the label for a selectable board/list/swimlane option.
*
* @param {string} name The entity (board/list/swimlane) name/title.
* @param {number} index Zero-based position in the list.
* @param {Object} [opts]
* @param {boolean} [opts.numbered=false] When true, append the 1-based
* number as a trailing suffix. When false (default), return the bare
* name so first-letter keyboard navigation keeps working.
* @returns {string} The option label.
*/
export function boardOptionLabel(name, index, { numbered = false } = {}) {
const label = name == null ? '' : String(name);
if (!numbered) {
return label;
}
const position = Number(index);
const number = Number.isFinite(position) ? position + 1 : index;
return `${label} (${number})`;
}
export default boardOptionLabel;
@@ -81,6 +81,13 @@ template(name="epicProgressView")
template(name="workloadView")
+boardChartView(chartKey="workload" titleKey="board-view-workload")
//- This board's open cards per person; the hours against each person's
capacity, across all their boards, are on the Workload and capacity page.
if allowFeature 'workload'
p.workload-cross-board-link
a(href="{{pathFor 'workload'}}")
i.fa.fa-tachometer
| {{_ 'workload-title'}}
template(name="distributionView")
+boardChartView(chartKey="distribution" titleKey="board-view-distribution")
+28 -2
View File
@@ -249,11 +249,35 @@ const EXPORT_FORMAT_GROUPS = [
{ key: 'mbox', icon: 'fa-envelope-o', label: 'Mail (mbox)', path: 'export/mbox', ext: 'mbox', scopes: BOARD_ONLY },
{ key: 'enex', icon: 'fa-sticky-note', label: 'Evernote (.enex)', path: 'export/enex', ext: 'enex', scopes: BOARD_ONLY },
{ key: 'mattermost', icon: 'fa-comments', label: 'Mattermost', path: 'export/mattermost', ext: 'jsonl', scopes: BOARD_ONLY },
{ key: 'rocketchat', icon: 'fa-comments', label: 'Rocket.Chat', path: 'export/rocketchat', ext: 'zip', scopes: BOARD_ONLY },
// Websites (docs/Features/Board-Sidebar/Board-Settings/Import-Export/Website.md).
{ key: 'wordpress', icon: 'fa-wordpress', label: 'WordPress (.xml)', path: 'export/wordpress', ext: 'xml', scopes: BOARD_ONLY },
{ key: 'wordpressjson', icon: 'fa-wordpress', label: 'WordPress REST API (.json)', path: 'export/wordpressjson', ext: 'json', scopes: BOARD_ONLY },
{ key: 'ghost', icon: 'fa-file-text-o', label: 'Ghost', path: 'export/ghost', ext: 'json', scopes: BOARD_ONLY },
{ key: 'blogger', icon: 'fa-rss', label: 'Blogger (.xml)', path: 'export/blogger', ext: 'xml', scopes: BOARD_ONLY },
{ key: 'markdownsite', icon: 'fa-file-code-o', label: 'Hugo, Jekyll, Eleventy, Astro (.zip)', path: 'export/markdownsite', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'htmlsite', icon: 'fa-globe', label: 'HTML website (.zip)', path: 'export/htmlsite', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'todotxt', icon: 'fa-list-ul', label: 'todo.txt', path: 'export/todotxt', ext: 'txt', scopes: BOARD_ONLY },
{ key: 'taskwarrior', icon: 'fa-terminal', label: 'Taskwarrior', path: 'export/taskwarrior', ext: 'json', scopes: BOARD_ONLY },
{ key: 'focalboard', icon: 'fa-th-large', label: 'Focalboard', path: 'export/focalboard', ext: 'jsonl', scopes: BOARD_ONLY },
{ key: 'todoist', icon: 'fa-check-square-o', label: 'Todoist', path: 'export/todoist', ext: 'csv', scopes: BOARD_ONLY },
{ key: 'planner', icon: 'fa-th-list', label: 'Microsoft Planner', path: 'export/planner', ext: 'xlsx', scopes: BOARD_ONLY },
{ key: 'azuredevops', icon: 'fa-th-list', label: 'Azure DevOps Boards', path: 'export/azuredevops', ext: 'csv', scopes: BOARD_ONLY },
{ key: 'mslists', icon: 'fa-list', label: 'Microsoft Lists', path: 'export/mslists', ext: 'csv', scopes: BOARD_ONLY },
{ key: 'msproject', icon: 'fa-tasks', label: 'Microsoft Project (XML)', path: 'export/msproject', ext: 'xml', scopes: BOARD_ONLY },
{ key: 'outlook', icon: 'fa-envelope-o', label: 'Microsoft Outlook (.eml)', path: 'export/outlook', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'teams', icon: 'fa-comments', label: 'Microsoft Teams', path: 'export/teams', ext: 'json', scopes: BOARD_ONLY },
{ key: 'onenote', icon: 'fa-book', label: 'Microsoft OneNote', path: 'export/onenote', ext: 'zip', scopes: BOARD_ONLY },
// Sandstorm grain backups (.zip) Sandstorm restores (models/lib/sandstorm/grainApps.js).
{ key: 'sandstormprioritize', icon: 'fa-archive', label: 'Sandstorm Prioritize', path: 'export/sandstormprioritize', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'sandstormyatl', icon: 'fa-archive', label: 'Sandstorm Yet Another TODO list', path: 'export/sandstormyatl', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'sandstormmutodo', icon: 'fa-archive', label: 'Sandstorm μTodo', path: 'export/sandstormmutodo', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'sandstormsandchat', icon: 'fa-archive', label: 'Sandstorm SandChat', path: 'export/sandstormsandchat', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'sandstormethercalc', icon: 'fa-archive', label: 'Sandstorm EtherCalc', path: 'export/sandstormethercalc', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'sandstormradicalecalendar', icon: 'fa-archive', label: 'Sandstorm Radicale calendar', path: 'export/sandstormradicalecalendar', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'sandstormradicalecontacts', icon: 'fa-archive', label: 'Sandstorm Radicale address book', path: 'export/sandstormradicalecontacts', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'sandstormdavros', icon: 'fa-archive', label: 'Sandstorm Davros', path: 'export/sandstormdavros', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'sandstormhackercms', icon: 'fa-archive', label: 'Sandstorm Hacker CMS', path: 'export/sandstormhackercms', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'meistertask', icon: 'fa-tasks', label: 'MeisterTask', path: 'export/meistertask', ext: 'csv', scopes: BOARD_ONLY },
{ key: 'obsidian', icon: 'fa-diamond', label: 'Obsidian Kanban', path: 'export/obsidian', ext: 'md', scopes: BOARD_ONLY },
{ key: 'linear', icon: 'fa-bars', label: 'Linear', path: 'export/linear', ext: 'csv', scopes: BOARD_ONLY },
@@ -267,6 +291,7 @@ const EXPORT_FORMAT_GROUPS = [
{ key: 'monday', icon: 'fa-table', label: 'monday.com', path: 'export/monday', ext: 'xlsx', scopes: BOARD_ONLY },
{ key: 'superproductivity', icon: 'fa-check-circle-o', label: 'Super Productivity', path: 'export/superproductivity', ext: 'json', scopes: BOARD_ONLY },
{ key: 'vikunja', icon: 'fa-file-archive-o', label: 'Vikunja', path: 'export/vikunja', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'fizzy', icon: 'fa-file-archive-o', label: 'Fizzy', path: 'export/fizzy', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'wrike', icon: 'fa-table', label: 'Wrike', path: 'export/wrike', ext: 'xlsx', scopes: BOARD_ONLY },
{ key: 'wrikeworkflow', icon: 'fa-sitemap', label: 'Wrike workflow', path: 'export/wrikeworkflow', ext: 'json', scopes: BOARD_ONLY },
{ key: 'teamwork', icon: 'fa-table', label: 'Teamwork.com', path: 'export/teamwork', ext: 'xlsx', scopes: BOARD_ONLY },
@@ -324,14 +349,15 @@ function resolvedFormatGroups() {
}))
.filter(group => group.entries.length)
// The other tools' formats under headings by kind (models/lib/toolGroups.js),
// the same groups as the Import page; WeKan's own JSON keeps "JSON".
// the same groups as the Import page; WeKan's own JSON keeps "JSON", and
// a company with several products is headed by the company's name.
.flatMap(group => {
if (group.key !== 'json') return [group];
const { groupTools } = require('/models/lib/toolGroups');
const parts = [];
for (const entry of groupTools(group.entries)) {
if (entry.groupStart) {
parts.push({ key: `json-${entry.group}`, heading: entry.groupLabelKey ? TAPi18n.__(entry.groupLabelKey) : group.heading, entries: [] });
parts.push({ key: `json-${entry.group}`, heading: entry.groupLabelKey ? TAPi18n.__(entry.groupLabelKey) : entry.groupLabel || group.heading, entries: [] });
}
parts[parts.length - 1].entries.push(entry);
}
+47
View File
@@ -0,0 +1,47 @@
/* Board View / Website: a readable page, whatever the board's colours. */
.website-view {
max-width: 48em;
margin-inline: auto;
padding: 1em;
background: #fff;
color: #222;
line-height: 1.6;
overflow-y: auto;
height: 100%;
box-sizing: border-box;
}
.website-header {
border-block-end: 1px solid #ddd;
margin-block-end: 1em;
}
.website-header h1 a {
color: inherit;
text-decoration: none;
}
.website-nav {
display: flex;
flex-wrap: wrap;
gap: 0.4em 1em;
padding-block-end: 0.6em;
}
.website-nav a.is-current {
font-weight: bold;
}
.website-subnav {
display: inline-flex;
gap: 0.6em;
margin-inline-start: 0.6em;
font-size: 0.9em;
}
.website-date {
color: #666;
font-size: 0.9em;
}
.website-images img {
max-width: 100%;
display: block;
margin-block: 0.6em;
}
.website-summary {
margin-block-end: 1.2em;
}
+46
View File
@@ -0,0 +1,46 @@
//- Board View / Website (models/lib/websiteView.js): the board as a website -
the cards of its Published list, Pages as the menu, the other cards as
posts, newest first - built from the board's own cards and attachments.
A public board can open in it (Board Settings / Board View), so a visitor
sees the site at the board's address instead of the kanban.
template(name="websiteView")
.website-view
header.website-header
h1
a.js-website-home(href="?") {{boardTitle}}
nav.website-nav(aria-label="{{_ 'board-view-website'}}")
each page in site.pages
span.website-nav-item
a.js-website-page(href="?page={{page._id}}" data-id=page._id class="{{#if $eq page._id currentId}}is-current{{/if}}") {{page.title}}
if page.children.length
span.website-subnav
each sub in page.children
a.js-website-page(href="?page={{sub._id}}" data-id=sub._id class="{{#if $eq sub._id currentId}}is-current{{/if}}") {{sub.title}}
main.website-main
if shown.cardId
with shownCard
article.website-article
h2 {{title}}
if postDate
p.website-date {{postDate}}
if description
+viewer
= description
if images.length
.website-images
each image in images
img(src=image.url alt=image.name loading="lazy")
if files.length
ul.website-files
each file in files
li
a(href=file.url target="_blank" rel="noopener noreferrer") {{file.name}}
else if shown.posts
each post in site.posts
article.website-summary
h2
a.js-website-page(href="?page={{post._id}}" data-id=post._id) {{post.title}}
if post.date
p.website-date {{post.date}}
else
p.quiet {{_ 'website-view-empty'}}
+64
View File
@@ -0,0 +1,64 @@
// Board View / Website (websiteView.jade, models/lib/websiteView.js). The
// board's own subscription brings its lists, swimlanes, cards and
// attachments - for a visitor of a public board too - so the site is drawn
// from them as they change. Which page is open is in the address (?page=),
// so a page of the site can be linked to.
import { ReactiveCache } from '/imports/reactiveCache';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { Utils } from '/client/lib/utils';
const { websiteOf, pageFor } = require('/models/lib/websiteView');
function site() {
const boardId = Utils.getCurrentBoardId();
if (!boardId) return websiteOf({});
return websiteOf({
lists: ReactiveCache.getLists({ boardId, archived: false }) || [],
swimlanes: ReactiveCache.getSwimlanes({ boardId, archived: false }) || [],
cards: ReactiveCache.getCards({ boardId, archived: false }) || [],
});
}
function currentId() {
return FlowRouter.getQueryParam('page') || '';
}
Template.websiteView.helpers({
boardTitle() {
const board = Utils.getCurrentBoard();
return board ? board.title : '';
},
site,
currentId,
shown() {
return pageFor(site(), currentId());
},
shownCard() {
const page = pageFor(site(), currentId());
return page.cardId ? ReactiveCache.getCard(page.cardId) : null;
},
postDate() {
const when = this.receivedAt || this.startAt || this.createdAt;
return when ? new Date(when).toISOString().slice(0, 10) : '';
},
images() {
return (ReactiveCache.getAttachments({ 'meta.cardId': this._id }) || [])
.filter(a => a.isImage).map(a => ({ name: a.name, url: typeof a.link === 'function' ? a.link() : '' })).filter(a => a.url);
},
files() {
return (ReactiveCache.getAttachments({ 'meta.cardId': this._id }) || [])
.filter(a => !a.isImage).map(a => ({ name: a.name, url: typeof a.link === 'function' ? a.link() : '' })).filter(a => a.url);
},
});
Template.websiteView.events({
'click .js-website-page'(evt) {
evt.preventDefault();
FlowRouter.setQueryParams({ page: evt.currentTarget.getAttribute('data-id') });
window.scrollTo(0, 0);
},
'click .js-website-home'(evt) {
evt.preventDefault();
FlowRouter.setQueryParams({ page: null });
},
});
+1 -1
View File
@@ -639,7 +639,7 @@ template(name="cardFieldSectionTime")
h3.card-details-item-title
| {{_ 'spent-time-hours'}}
+cardSpentTimeMenu
if getSpentTime
if hasSpentOrEstimatedTime
+cardSpentTime
//- #6688: the two timers each have a Board Settings / Card toggle,
+59
View File
@@ -4,6 +4,14 @@ template(name="editCardSpentTimePopup")
.fields
label(for="time") {{_ 'time'}}
input.js-time-field#time(type="number" step="0.01" name="time" value="{{card.getSpentTime}}" placeholder=timeFormat autofocus)
//- Workload (docs/Features/Workload/Workload.md): what the card is
estimated to take; what is left is this less the time spent.
label(for="estimated-hours") {{_ 'workload-estimated-hours'}}
input.js-estimated-hours-field#estimated-hours(type="number" min="0" max="10000" step="0.25" name="estimatedHours" value="{{card.getEstimatedHours}}")
//- Budget and billing: whether this card's time goes on invoices.
label(for="billable") {{_ 'billing-billable'}}
a.js-toggle-billable
.materialCheckBox#billable(class="{{#if billable}}is-checked{{/if}}" name="billable")
label(for="overtime") {{_ 'overtime'}}
a.js-toggle-overtime
.materialCheckBox#overtime(class="{{#if getIsOvertime}}is-checked{{/if}}" name="overtime")
@@ -13,11 +21,62 @@ template(name="editCardSpentTimePopup")
button.primary.wide.left.js-submit-time(type="submit") {{_ 'save'}}
button.js-delete-time.negate.wide.right {{_ 'delete'}}
+cardTimeEntries(cardId=card._id)
//- The card's time by day (server/timeEntries.js): log time on a day, and see
who logged what. Changing the total above is recorded as an entry too.
template(name="cardTimeEntries")
.card-time-entries
h4 {{_ 'time-entries'}}
form.js-time-entry-add
label(for="time-entry-date") {{_ 'date'}}
input#time-entry-date(type="date" name="date" value=today required)
label(for="time-entry-hours") {{_ 'hours'}}
input#time-entry-hours(type="number" name="hours" min="0.01" max="1000" step="0.25" required)
label(for="time-entry-note") {{_ 'workload-note'}}
input#time-entry-note(type="text" name="note" maxlength="500")
button.primary(type="submit") {{_ 'time-entry-log'}}
if entryError
.warning {{entryError}}
if entries.length
ul.time-entry-list
each entry in entries
li(class="{{#if entry.invoiced}}is-invoiced{{/if}}")
span.time-entry-date
if entry.date
| {{entry.date}}
else
| {{_ 'time-entry-undated'}}
span.time-entry-hours {{entry.hours}} {{_ 'workload-hours-short'}}
if entry.name
span.time-entry-who {{entry.name}}
if entry.note
span.time-entry-note {{entry.note}}
if $eq entry.approval 'approved'
span.time-entry-approved(title="{{_ 'time-entry-approved'}}" aria-label="{{_ 'time-entry-approved'}}")
i.fa.fa-check
if $eq entry.approval 'rejected'
span.time-entry-rejected(title="{{_ 'time-entry-rejected'}}")
i.fa.fa-undo
| {{_ 'time-entry-rejected'}}
if entry.approvalNote
| : {{entry.approvalNote}}
if entry.invoiced
span.time-entry-invoiced(title="{{_ 'time-entry-invoiced'}}")
i.fa.fa-file-text-o
else unless $eq entry.approval 'approved'
if entry.mine
a.js-time-entry-remove(data-id=entry._id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
template(name="cardSpentTime")
if canModifyCard
a.js-edit-time.card-time(title="{{_ 'time'}}" class="{{#if getIsOvertime}}card-label-red{{else}}card-label-green{{/if}}")
i.fa.fa-clock-o
| {{showTime}}
if showEstimate
span.card-time-estimate(title="{{_ 'workload-estimated-hours'}}")
| / {{showEstimate}}
else
a.card-time(title="{{_ 'time'}}" class="{{#if getIsOvertime}}card-label-red{{else}}card-label-green{{/if}}")
i.fa.fa-clock-o
+73
View File
@@ -13,6 +13,7 @@ Template.editCardSpentTimePopup.onCreated(function () {
this.error = new ReactiveVar('');
this.card = Cards.findOne(getCardId());
this.overtime = new ReactiveVar(this.card?.getIsOvertime() || false);
this.billable = new ReactiveVar(!this.card || typeof this.card.isBillable !== 'function' || this.card.isBillable());
});
Template.editCardSpentTimePopup.helpers({
@@ -25,6 +26,9 @@ Template.editCardSpentTimePopup.helpers({
getIsOvertime() {
return Template.instance().overtime.get();
},
billable() {
return Template.instance().billable.get();
},
});
Template.editCardSpentTimePopup.events({
@@ -36,9 +40,25 @@ Template.editCardSpentTimePopup.events({
const spentTime = parseFloat(evt.target.time.value);
const isOvertime = tpl.overtime.get();
const estimateText = evt.target.estimatedHours ? String(evt.target.estimatedHours.value).trim() : '';
const estimatedHours = estimateText === '' ? null : parseFloat(estimateText);
if (estimatedHours !== null && !(estimatedHours >= 0 && estimatedHours <= 10000)) {
tpl.error.set('workload-invalid-estimate');
evt.target.estimatedHours.focus();
return;
}
if (spentTime >= 0) {
card.setSpentTime(spentTime);
card.setIsOvertime(isOvertime);
const currentEstimate = typeof card.getEstimatedHours === 'function' ? card.getEstimatedHours() : null;
if (typeof card.setBillable === 'function' && tpl.billable
&& tpl.billable.get() !== (typeof card.isBillable === 'function' ? card.isBillable() : true)) {
card.setBillable(tpl.billable.get());
}
if (typeof card.setEstimatedHours === 'function'
&& estimatedHours !== (typeof currentEstimate === 'number' ? currentEstimate : null)) {
card.setEstimatedHours(estimatedHours);
}
backIfOwnPopup(evt, 'editCardSpentTimePopup');
} else {
tpl.error.set('invalid-time');
@@ -57,6 +77,10 @@ Template.editCardSpentTimePopup.events({
evt.preventDefault();
tpl.overtime.set(!tpl.overtime.get());
},
'click a.js-toggle-billable'(evt, tpl) {
evt.preventDefault();
tpl.billable.set(!tpl.billable.get());
},
});
Template.cardSpentTime.helpers({
@@ -77,6 +101,12 @@ Template.cardSpentTime.helpers({
const card = Cards.findOne(this._id) || this;
return card.getSpentTime ? formatSpentTime(card.getSpentTime()) : '';
},
// Workload: the estimate beside the time spent, "1h 30m / 4h".
showEstimate() {
const card = Cards.findOne(this._id) || this;
const hours = card.getEstimatedHours ? card.getEstimatedHours() : null;
return typeof hours === 'number' && hours > 0 ? formatSpentTime(hours) : '';
},
getIsOvertime() {
const card = Cards.findOne(this._id) || this;
return card.getIsOvertime ? card.getIsOvertime() : false;
@@ -86,3 +116,46 @@ Template.cardSpentTime.helpers({
Template.cardSpentTime.events({
'click .js-edit-time': Popup.open('editCardSpentTime'),
});
// The card's time by day (server/timeEntries.js).
Template.cardTimeEntries.onCreated(function () {
this.entries = new ReactiveVar([]);
this.error = new ReactiveVar('');
this.load = () => {
const { cardId } = Template.currentData() || {};
if (!cardId) return Promise.resolve();
return Meteor.callAsync('timeEntriesOfCard', cardId)
.then(result => { this.entries.set(result.entries); this.error.set(''); })
.catch(error => this.error.set((error && (error.reason || error.message)) || String(error)));
};
this.autorun(() => {
const card = Cards.findOne((Template.currentData() || {}).cardId);
// Reload when the card's total changes (a timer, the field above).
if (card) card.spentTime; // eslint-disable-line no-unused-expressions
this.load();
});
});
Template.cardTimeEntries.helpers({
entries: () => Template.instance().entries.get(),
entryError: () => Template.instance().error.get(),
today: () => new Date().toISOString().slice(0, 10),
});
Template.cardTimeEntries.events({
'submit .js-time-entry-add'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const entry = { date: form.elements.date.value, hours: parseFloat(form.elements.hours.value) };
if (form.elements.note.value.trim()) entry.note = form.elements.note.value.trim();
Meteor.callAsync('timeEntryAdd', Template.currentData().cardId, entry)
.then(() => { form.elements.hours.value = ''; form.elements.note.value = ''; return tpl.load(); })
.catch(error => tpl.error.set((error && (error.reason || error.message)) || String(error)));
},
'click .js-time-entry-remove'(evt, tpl) {
evt.preventDefault();
Meteor.callAsync('timeEntryRemove', evt.currentTarget.getAttribute('data-id'))
.then(() => tpl.load())
.catch(error => tpl.error.set((error && (error.reason || error.message)) || String(error)));
},
});
+78
View File
@@ -0,0 +1,78 @@
/* Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md). The layout is the
Admin Panel's (.setting-content, the left menu, the table page); only the
panel's own forms, the plan, the Caddyfile and the chat are styled here. */
.cloud-form {
display: flex;
flex-direction: column;
max-width: 40em;
gap: 0.3em;
}
.cloud-form .billing-checkbox {
display: flex;
align-items: center;
gap: 0.4em;
}
.cloud-database {
display: flex;
flex-direction: column;
gap: 0.3em;
}
.cloud-actions {
display: flex;
flex-wrap: wrap;
gap: 0.5em;
margin-block: 0.8em;
}
.cloud-caddyfile {
white-space: pre-wrap;
overflow-wrap: anywhere;
background: #f5f5f5;
padding: 0.8em;
}
.cloud-plan .cloud-plan-create {
color: #2e7d32;
}
.cloud-plan .cloud-plan-update {
color: #8a6d00;
}
.cloud-chat-messages {
list-style: none;
padding-inline-start: 0;
max-height: 60vh;
overflow-y: auto;
}
.cloud-chat-messages li {
margin-block-end: 0.6em;
}
.cloud-chat-messages li.is-mine {
text-align: end;
}
.cloud-chat-who {
font-weight: bold;
}
.cloud-chat-text {
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.cloud-invoice-void td {
text-decoration: line-through;
color: #777;
}
/* Labelled native checkboxes: the app-wide material form rule
(client/components/forms/forms.css) hides native checkboxes three ways -
display, visibility, an offset - which left these with a label and no box
to tick or see ticked. All three are undone, as in cardFlow.css. */
.cloud-panel input[type="checkbox"],
.js-cloud-panel-settings input[type="checkbox"] {
display: inline-block;
visibility: visible;
position: static;
inset-inline-start: auto;
width: 16px;
height: 16px;
min-height: 0;
margin: 0;
margin-inline-end: 4px;
flex: none;
}
+287
View File
@@ -0,0 +1,287 @@
//- Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md): on the panel's own
domain, the Cloud Admins' Cloudflare, Caddy, Domains, Invoices and Chat, and a
customer's own Invoices and Chat. The server decides who sees what
(server/cloudPanel.js); this page draws what it is given.
template(name="cloudPanel")
.setting-content.cloud-panel
if loading
+spinner
else if notAllowed
p.quiet {{_ 'cloud-panel-not-allowed'}}
else
.content-body
+leftMenu(menuItems)
.main-body
+paneTitle(paneTitleData)
if actionError
.warning {{actionError}}
if $eq pane 'cloudflare'
+cloudPanelCloudflare(config=config reload=reload)
else if $eq pane 'caddy'
+cloudPanelCaddy(config=config reload=reload)
else if $eq pane 'domains'
+cloudPanelDomains
else if $eq pane 'invoices'
+cloudPanelInvoices(domains=info.domains isCloudAdmin=info.isCloudAdmin)
else if $eq pane 'chat'
+cloudPanelChat(domains=info.domains isCloudAdmin=info.isCloudAdmin)
template(name="cloudPanelCloudflare")
form.js-cloud-cloudflare.cloud-form
p.quiet {{_ 'cloudflare-api-key-desc'}}
label(for="cloud-cf-token") {{_ 'cloudflare-api-key'}}
input#cloud-cf-token(type="password" name="apiToken" autocomplete="off")
if config.cloudflare.hasToken
p.quiet {{_ 'cloudflare-api-key-set'}}
else
p.quiet {{_ 'cloudflare-api-key-not-set'}}
label(for="cloud-cf-zone") {{_ 'cloud-panel-cloudflare-zone'}}
input#cloud-cf-zone(type="text" name="zoneId" maxlength="32" value=config.cloudflare.zoneId)
label(for="cloud-cf-target") {{_ 'cloud-panel-cloudflare-target'}}
input#cloud-cf-target(type="text" name="target" maxlength="253" value=config.cloudflare.target placeholder="203.0.113.10")
label.billing-checkbox
input(type="checkbox" name="proxied" checked=config.cloudflare.proxied)
| {{_ 'cloud-panel-cloudflare-proxied'}}
button.primary(type="submit") {{_ 'save'}}
.cloud-actions
button.js-cloud-dns-plan(type="button") {{_ 'cloud-panel-dns-check'}}
if plan
button.primary.js-cloud-dns-apply(type="button") {{_ 'cloud-panel-dns-apply'}}
if plan
ul.cloud-plan
each record in plan.create
li.cloud-plan-create + {{record.type}} {{record.name}} → {{record.content}}
each record in plan.update
li.cloud-plan-update ~ {{record.type}} {{record.name}} → {{record.content}}
each record in plan.conflicts
li.warning {{_ 'cloud-panel-dns-conflict' name=record.name type=record.type}}
each name in plan.unchanged
li.quiet {{name}}
template(name="cloudPanelCaddy")
form.js-cloud-caddy.cloud-form
p.quiet {{_ 'cloud-panel-caddy-intro'}}
label(for="cloud-caddy-admin") {{_ 'cloud-panel-caddy-admin'}}
input#cloud-caddy-admin(type="text" name="adminUrl" maxlength="200" value=config.caddy.adminUrl placeholder="http://caddy:2019")
label(for="cloud-caddy-upstream") {{_ 'cloud-panel-caddy-upstream'}}
input#cloud-caddy-upstream(type="text" name="sharedUpstream" maxlength="260" value=config.caddy.sharedUpstream placeholder="wekan:8080")
label(for="cloud-caddy-email") {{_ 'email'}}
input#cloud-caddy-email(type="text" name="email" maxlength="200" value=config.caddy.email)
button.primary(type="submit") {{_ 'save'}}
.cloud-actions
button.js-cloud-caddyfile(type="button") {{_ 'cloud-panel-caddy-show'}}
button.primary.js-cloud-caddy-push(type="button") {{_ 'cloud-panel-caddy-push'}}
if pushed
span.quiet {{_ 'cloud-panel-caddy-pushed'}}
if caddyfile
pre.cloud-caddyfile {{caddyfile}}
template(name="cloudPanelDomains")
+tablePage(tablePageData)
if editing
+cloudPanelDomainForm(domain=editing close=close)
if report
.cloud-report
h3 {{_ 'cloud-panel-import-report'}}
p {{_ 'cloud-panel-import-users' created=report.users.created matched=report.users.matched}}
ul
each item in reportCollections
li {{item.name}}: {{item.copied}} (+{{item.skipped}})
if report.files
p.warning {{_ 'cloud-panel-import-files' count=report.files}}
if reportIsDryRun
button.primary.js-cloud-import-now(type="button" data-id=reportDomainId) {{_ 'cloud-panel-import-now'}}
template(name="cloudPanelDomainNew")
a.js-cloud-domain-new(title="{{_ 'cloud-panel-domain-new'}}")
i.fa.fa-plus
| {{_ 'domain'}}
template(name="cloudPanelDomainRow")
tr(class="cloud-domain-{{domain.mode}}")
td {{domain.domain}}
td {{domain.customerName}}
td {{domain.customerEmail}}
td {{domain.startDate}}
td {{domain.endDate}}
td
if $eq domain.mode 'shared'
| {{_ 'cloud-panel-mode-shared'}}
else
| {{_ 'cloud-panel-mode-own'}}
td {{databaseLabel domain.database}}
td
button.js-cloud-domain-edit(type="button" data-id=domain._id) {{_ 'edit'}}
if domain.database
button.js-cloud-domain-test(type="button" data-id=domain._id) {{_ 'cloud-panel-test'}}
if $eq domain.mode 'own'
button.js-cloud-domain-import(type="button" data-id=domain._id) {{_ 'cloud-panel-import'}}
if tested
span.quiet {{tested}}
template(name="cloudPanelDomainForm")
form.js-cloud-domain.cloud-form
label(for="cloud-domain-domain") {{_ 'domain'}}
input#cloud-domain-domain(type="text" name="domain" maxlength="253" value=domain.domain placeholder="customer1.example.com" required)
label(for="cloud-domain-customer") {{_ 'cloud-customer-name'}}
input#cloud-domain-customer(type="text" name="customerName" maxlength="200" value=domain.customerName)
label(for="cloud-domain-email") {{_ 'cloud-customer-email'}}
input#cloud-domain-email(type="email" name="customerEmail" maxlength="254" value=domain.customerEmail)
label(for="cloud-domain-billing") {{_ 'cloud-billing-email'}}
input#cloud-domain-billing(type="email" name="billingEmail" maxlength="254" value=domain.billingEmail)
label(for="cloud-domain-start") {{_ 'cloud-start-date'}}
input#cloud-domain-start(type="date" name="startDate" value=domain.startDate)
label(for="cloud-domain-end") {{_ 'cloud-end-date'}}
input#cloud-domain-end(type="date" name="endDate" value=domain.endDate)
label(for="cloud-domain-mode") {{_ 'cloud-panel-mode'}}
select#cloud-domain-mode(name="mode")
option(value="own" selected="{{#if $eq domain.mode 'own'}}selected{{/if}}") {{_ 'cloud-panel-mode-own'}}
option(value="shared" selected="{{#if $eq domain.mode 'shared'}}selected{{/if}}") {{_ 'cloud-panel-mode-shared'}}
label(for="cloud-domain-upstream") {{_ 'cloud-panel-upstream'}}
input#cloud-domain-upstream(type="text" name="upstream" maxlength="260" value=domain.upstream placeholder="wekan-customer1:8080")
fieldset.cloud-database
legend {{_ 'cloud-panel-database'}}
label(for="cloud-db-uri") {{_ 'cloud-panel-database-uri'}}
input#cloud-db-uri(type="text" name="uri" maxlength="2000" value=domain.database.uri placeholder="mongodb://…")
label(for="cloud-db-host") {{_ 'cloud-panel-database-host'}}
input#cloud-db-host(type="text" name="host" maxlength="253" value=domain.database.host placeholder="mongodb")
label(for="cloud-db-port") {{_ 'cloud-panel-database-port'}}
input#cloud-db-port(type="number" name="port" min="1" max="65535" value=domain.database.port placeholder="27017")
label(for="cloud-db-name") {{_ 'cloud-panel-database-name'}}
input#cloud-db-name(type="text" name="database" maxlength="64" value=domain.database.database placeholder="wekan")
label(for="cloud-db-user") {{_ 'username'}}
input#cloud-db-user(type="text" name="username" maxlength="200" value=domain.database.username autocomplete="off")
label(for="cloud-db-password") {{_ 'password'}}
input#cloud-db-password(type="password" name="password" maxlength="500" autocomplete="new-password" placeholder="{{#if domain.database.hasPassword}}••••••••{{/if}}")
label(for="cloud-db-authsource") {{_ 'cloud-panel-database-auth-source'}}
input#cloud-db-authsource(type="text" name="authSource" maxlength="64" value=domain.database.authSource placeholder="admin")
label(for="cloud-db-replicaset") {{_ 'cloud-panel-database-replica-set'}}
input#cloud-db-replicaset(type="text" name="replicaSet" maxlength="64" value=domain.database.replicaSet placeholder="rs0")
label.billing-checkbox
input(type="checkbox" name="tls" checked=domain.database.tls)
| TLS
label(for="cloud-domain-customers") {{_ 'cloud-panel-customers'}}
input#cloud-domain-customers(type="text" name="customerUsernames" maxlength="2000" value=customers placeholder="customer1, customer2")
label.billing-checkbox
input(type="checkbox" name="cloudflare" checked=cloudflareOn)
| {{_ 'cloud-panel-domain-cloudflare'}}
label(for="cloud-domain-notes") {{_ 'workload-note'}}
textarea#cloud-domain-notes(name="notes" maxlength="2000" rows="2") {{domain.notes}}
button.primary(type="submit") {{_ 'save'}}
button.js-cloud-domain-close(type="button") {{_ 'close'}}
if domain._id
button.js-cloud-domain-remove(type="button" data-id=domain._id) {{_ 'delete'}}
template(name="cloudPanelInvoices")
.cloud-invoices
if isCloudAdmin
form.js-cloud-invoice.cloud-form
label(for="cloud-invoice-domain") {{_ 'domain'}}
select#cloud-invoice-domain(name="domainId" required)
each domain in allDomains
option(value=domain._id) {{domain.domain}}
label(for="cloud-invoice-number") {{_ 'billing-number'}}
input#cloud-invoice-number(type="text" name="number" maxlength="50" required)
label(for="cloud-invoice-issue") {{_ 'billing-issue-date'}}
input#cloud-invoice-issue(type="date" name="issueDate" required)
label(for="cloud-invoice-due") {{_ 'billing-due-date'}}
input#cloud-invoice-due(type="date" name="dueDate")
label(for="cloud-invoice-amount") {{_ 'billing-total'}}
input#cloud-invoice-amount(type="number" name="amount" min="0" step="0.01" required)
label(for="cloud-invoice-currency") {{_ 'billing-currency'}}
input#cloud-invoice-currency(type="text" name="currency" maxlength="3" value="EUR" required)
label(for="cloud-invoice-status") {{_ 'billing-status'}}
select#cloud-invoice-status(name="status")
option(value="open") {{_ 'cloud-panel-invoice-open'}}
option(value="paid") {{_ 'billing-status-paid'}}
option(value="void") {{_ 'billing-status-void'}}
label(for="cloud-invoice-paid") {{_ 'cloud-panel-paid-on'}}
input#cloud-invoice-paid(type="date" name="paidDate")
label(for="cloud-invoice-description") {{_ 'description'}}
input#cloud-invoice-description(type="text" name="description" maxlength="1000")
label(for="cloud-invoice-link") {{_ 'cloud-panel-invoice-link'}}
input#cloud-invoice-link(type="url" name="link" maxlength="500" placeholder="https://")
button.primary(type="submit") {{_ 'cloud-panel-add-invoice'}}
if invoices.length
.billing-table-wrapper
table.cloud-invoice-table
thead
tr
th {{_ 'domain'}}
th {{_ 'billing-number'}}
th {{_ 'billing-issue-date'}}
th {{_ 'billing-due-date'}}
th {{_ 'billing-total'}}
th {{_ 'billing-status'}}
th {{_ 'cloud-panel-paid-on'}}
th
tbody
each invoice in invoices
tr(class="cloud-invoice-{{invoice.status}}")
td {{invoice.domain}}
td
if invoice.link
a(href=invoice.link target="_blank" rel="noopener noreferrer") {{invoice.number}}
else
| {{invoice.number}}
if invoice.description
.quiet {{invoice.description}}
td {{invoice.issueDate}}
td {{invoice.dueDate}}
td {{money invoice.amountMinor invoice.currency}}
td {{statusLabel invoice.status}}
td {{invoice.paidDate}}
td
if isCloudAdmin
a.js-cloud-invoice-remove(data-id=invoice._id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
else
p {{_ 'billing-no-invoices'}}
template(name="cloudPanelChat")
.cloud-chat
label(for="cloud-chat-domain") {{_ 'domain'}}
select#cloud-chat-domain.js-cloud-chat-domain
each domain in chatDomains
option(value=domain._id selected="{{#if $eq domain._id domainId}}selected{{/if}}") {{domain.domain}}
if domainId
ul.cloud-chat-messages
each message in messages
li(class="{{#if message.mine}}is-mine{{/if}}")
span.cloud-chat-who {{message.authorName}}
if message.room
span.quiet · {{message.room}}
span.quiet · {{when message.at}}
.cloud-chat-text {{message.text}}
unless messages.length
li.quiet {{_ 'cloud-panel-chat-empty'}}
form.js-cloud-chat-send
textarea(name="text" maxlength="20000" rows="2" aria-label="{{_ 'cloud-panel-chat-message'}}" required)
button.primary(type="submit") {{_ 'cloud-panel-chat-send'}}
if isCloudAdmin
form.js-cloud-chat-import.cloud-form
label(for="cloud-chat-source") {{_ 'cloud-panel-chat-import'}}
select#cloud-chat-source(name="source")
option(value="rocketchat") Rocket.Chat (.zip)
option(value="sandchat") Sandstorm SandChat (.zip)
input(type="file" name="file" accept=".zip" aria-label="{{_ 'cloud-panel-chat-import'}}" required)
button(type="submit") {{_ 'import'}}
if imported
span.quiet {{_ 'cloud-panel-chat-imported' count=imported}}
template(name="cloudPanelSettings")
form.js-cloud-panel-settings.cloud-form
p.quiet {{_ 'cloud-panel-settings-intro'}}
label(for="cloud-settings-domain") {{_ 'cloud-panel-domain'}}
input#cloud-settings-domain(type="text" name="domain" maxlength="253" value=settings.domain placeholder="cloud.example.com")
label(for="cloud-settings-admin") {{_ 'cloud-superadmin-username'}}
input#cloud-settings-admin(type="text" name="superAdminUsername" maxlength="254" value=settings.superAdminUsername)
button.primary(type="submit") {{_ 'save'}}
if saved
span.quiet {{_ 'cloud-saved'}}
if error
.warning {{error}}
if settings.domain
p
a(href="https://{{settings.domain}}/cloud" target="_blank" rel="noopener noreferrer") https://{{settings.domain}}/cloud
+474
View File
@@ -0,0 +1,474 @@
// Cloud Panel page (docs/Features/Admin-Panel/Cloud-Panel.md). Everything is
// read and written through the cloudPanel* methods of server/cloudPanel.js,
// which also decide who may see what; nothing is subscribed.
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import { TAPi18n } from '/imports/i18n';
import { leftMenuData, paneTitle } from '/models/lib/leftMenu';
import { buildHeader, pageInfo, TABLE_PAGE_ROWS_PER_PAGE } from '/models/lib/tablePage';
const { formatMoney } = require('/models/lib/billing');
function errorText(error) {
return error ? (error.reason || error.message || String(error)) : '';
}
function language() {
try { return TAPi18n.getLanguage ? TAPi18n.getLanguage() : undefined; } catch (e) { return undefined; }
}
function field(form, name) {
const el = form.elements[name];
return el ? String(el.value).trim() : '';
}
function list(value) {
return String(value || '').split(/[\s,;]+/).map(s => s.trim()).filter(Boolean);
}
// Every pane reports through this one place, shown above the pane. It is a
// module value, not a function handed down in a data context: Spacebars calls
// a function it finds in a data context when it passes it on, so `done=done`
// called done() with nothing and the domain form never rendered.
const panelError = new ReactiveVar('');
function report(promise) {
return promise.then(result => { panelError.set(''); return result; })
.catch(error => { panelError.set(errorText(error)); });
}
// ---------------------------------------------------------------- the page
const ADMIN_MENU = [
{ id: 'domains', icon: 'fa-globe', labelKey: 'domains' },
{ id: 'invoices', icon: 'fa-file-text-o', labelKey: 'billing-invoices' },
{ id: 'chat', icon: 'fa-comments', labelKey: 'board-view-chat' },
{ id: 'cloudflare', icon: 'fa-cloud', label: 'Cloudflare' },
{ id: 'caddy', icon: 'fa-server', label: 'Caddy' },
];
const CUSTOMER_MENU = ADMIN_MENU.filter(item => ['invoices', 'chat'].includes(item.id));
Template.cloudPanel.onCreated(function () {
this.loading = new ReactiveVar(true);
this.info = new ReactiveVar({ onCloudHost: false, isCloudAdmin: false, domains: [] });
this.config = new ReactiveVar(null);
this.pane = new ReactiveVar('');
panelError.set('');
this.loadConfig = () => Meteor.callAsync('cloudPanelConfig').then(config => this.config.set(config));
Meteor.callAsync('cloudPanelWhoAmI')
.then(info => {
this.info.set(info);
this.pane.set(info.isCloudAdmin ? 'domains' : 'invoices');
return info.isCloudAdmin ? this.loadConfig() : null;
})
.catch(error => panelError.set(errorText(error)))
.finally(() => this.loading.set(false));
});
function menu(info) {
return info.isCloudAdmin ? ADMIN_MENU : CUSTOMER_MENU;
}
Template.cloudPanel.helpers({
loading: () => Template.instance().loading.get(),
info: () => Template.instance().info.get(),
config: () => Template.instance().config.get(),
pane: () => Template.instance().pane.get(),
actionError: () => panelError.get(),
// Not at the Cloud Panel Domain, or neither the SuperAdmin nor a customer.
notAllowed() {
const info = Template.instance().info.get();
return !info.onCloudHost || !(info.isCloudAdmin || info.domains.length > 0);
},
menuItems() {
const tpl = Template.instance();
return leftMenuData(menu(tpl.info.get()), tpl.pane.get(), 'js-cloud-menu');
},
paneTitleData() {
const tpl = Template.instance();
return paneTitle(menu(tpl.info.get()), tpl.pane.get());
},
reload() {
const tpl = Template.instance();
return () => tpl.loadConfig();
},
});
Template.cloudPanel.events({
'click a.js-cloud-menu'(event, tpl) {
event.preventDefault();
panelError.set('');
tpl.pane.set(event.currentTarget.getAttribute('data-id'));
},
});
// ---------------------------------------------------------------- Cloudflare
Template.cloudPanelCloudflare.onCreated(function () {
this.plan = new ReactiveVar(null);
});
Template.cloudPanelCloudflare.helpers({
plan: () => Template.instance().plan.get(),
});
Template.cloudPanelCloudflare.events({
'submit .js-cloud-cloudflare'(event) {
event.preventDefault();
const form = event.currentTarget;
const { reload } = Template.currentData();
report(Meteor.callAsync('cloudPanelSetCloudflare', {
apiToken: field(form, 'apiToken'), zoneId: field(form, 'zoneId'), target: field(form, 'target'),
proxied: form.elements.proxied.checked === true,
}).then(() => { form.elements.apiToken.value = ''; return reload(); }));
},
'click .js-cloud-dns-plan'(event, tpl) {
event.preventDefault();
report(Meteor.callAsync('cloudPanelDnsPlan').then(plan => tpl.plan.set(plan)));
},
'click .js-cloud-dns-apply'(event, tpl) {
event.preventDefault();
report(Meteor.callAsync('cloudPanelDnsApply').then(() => Meteor.callAsync('cloudPanelDnsPlan')).then(plan => tpl.plan.set(plan)));
},
});
// ---------------------------------------------------------------- Caddy
Template.cloudPanelCaddy.onCreated(function () {
this.caddyfile = new ReactiveVar('');
this.pushed = new ReactiveVar(false);
});
Template.cloudPanelCaddy.helpers({
caddyfile: () => Template.instance().caddyfile.get(),
pushed: () => Template.instance().pushed.get(),
});
Template.cloudPanelCaddy.events({
'submit .js-cloud-caddy'(event) {
event.preventDefault();
const form = event.currentTarget;
const { reload } = Template.currentData();
report(Meteor.callAsync('cloudPanelSetCaddy', {
adminUrl: field(form, 'adminUrl'), sharedUpstream: field(form, 'sharedUpstream'), email: field(form, 'email'),
}).then(() => reload()));
},
'click .js-cloud-caddyfile'(event, tpl) {
event.preventDefault();
report(Meteor.callAsync('cloudPanelCaddyfile').then(text => tpl.caddyfile.set(text)));
},
'click .js-cloud-caddy-push'(event, tpl) {
event.preventDefault();
tpl.pushed.set(false);
report(Meteor.callAsync('cloudPanelPushCaddy').then(() => tpl.pushed.set(true)));
},
});
// ---------------------------------------------------------------- Domains
// Weddy's Domains columns (caddy-wekan-plugin), and what WeKan adds: where
// the domain's data is.
const DOMAIN_COLUMNS = [
{ labelKey: 'domain', headerTemplate: 'cloudPanelDomainNew' },
{ labelKey: 'cloud-customer-name' },
{ labelKey: 'cloud-customer-email' },
{ labelKey: 'cloud-start-date' },
{ labelKey: 'cloud-end-date' },
{ labelKey: 'cloud-panel-mode' },
{ labelKey: 'cloud-panel-database' },
{ label: '' },
];
// The domain being edited, shared with the header's "New domain" link: a
// table page's header template takes its own clicks (as People's "New" rows
// do), so the link and the pane meet here.
const editingDomain = new ReactiveVar(null);
Template.cloudPanelDomainNew.events({
'click .js-cloud-domain-new'(event) {
event.preventDefault();
editingDomain.set({ mode: 'own', database: {}, customerUsernames: [], cloudflare: true });
},
});
Template.cloudPanelDomains.onCreated(function () {
editingDomain.set(null);
this.editing = editingDomain;
this.searchTerm = new ReactiveVar('');
this.page = new ReactiveVar(1);
this.total = new ReactiveVar(0);
this.rows = new ReactiveVar([]);
this.report = new ReactiveVar(null);
this.loadPage = () => Meteor.callAsync('cloudPanelDomainsPage', { search: this.searchTerm.get(), page: this.page.get() })
.then(rows => this.rows.set(rows));
// The total only when the pane opens or the search changes, never per page.
this.loadAll = () => Meteor.callAsync('cloudPanelDomainsCount', this.searchTerm.get())
.then(total => { this.total.set(total); return this.loadPage(); });
this.loadAll();
});
Template.cloudPanelDomains.helpers({
tablePageData() {
const tpl = Template.instance();
const info = pageInfo(tpl.total.get(), tpl.page.get(), TABLE_PAGE_ROWS_PER_PAGE);
const rows = tpl.rows.get();
return {
emptyKey: 'no-items-message',
searchTerm: tpl.searchTerm.get(),
header: buildHeader(DOMAIN_COLUMNS),
rowTemplate: 'cloudPanelDomainRow',
docs: rows.map(domain => ({ domain })),
rowCount: rows.length,
page: info.page,
totalPages: info.totalPages,
hasPrev: info.hasPrev,
hasNext: info.hasNext,
total: info.total,
totalLabelKey: 'domains',
};
},
editing: () => Template.instance().editing.get(),
report: () => Template.instance().report.get(),
reportCollections() {
const report = Template.instance().report.get();
return Object.entries((report && report.collections) || {}).map(([name, c]) => ({ name, ...c }));
},
reportIsDryRun: () => !!(Template.instance().report.get() || {}).dryRun,
reportDomainId: () => (Template.instance().report.get() || {}).domainId,
close() {
const tpl = Template.instance();
return saved => { tpl.editing.set(null); if (saved) tpl.loadAll(); };
},
});
Template.cloudPanelDomains.events({
'keydown .js-table-page-search'(event, tpl) {
if (event.keyCode !== 13 || event.shiftKey) return;
event.preventDefault();
tpl.searchTerm.set(event.currentTarget.value || '');
tpl.page.set(1);
tpl.loadAll();
},
'click .js-table-page-prev'(event, tpl) {
event.preventDefault();
if (tpl.page.get() > 1) { tpl.page.set(tpl.page.get() - 1); tpl.loadPage(); }
},
'click .js-table-page-next'(event, tpl) {
event.preventDefault();
const { totalPages } = pageInfo(tpl.total.get(), tpl.page.get(), TABLE_PAGE_ROWS_PER_PAGE);
if (tpl.page.get() < totalPages) { tpl.page.set(tpl.page.get() + 1); tpl.loadPage(); }
},
'click .js-cloud-domain-edit'(event, tpl) {
event.preventDefault();
report(Meteor.callAsync('cloudPanelDomain', event.currentTarget.getAttribute('data-id'))
.then(domain => tpl.editing.set({ ...domain, database: domain.database || {} })));
},
'click .js-cloud-domain-import'(event, tpl) {
event.preventDefault();
const domainId = event.currentTarget.getAttribute('data-id');
// A dry run first: what would be copied, and nothing written.
report(Meteor.callAsync('cloudPanelImportDomain', domainId, { dryRun: true })
.then(report => tpl.report.set({ ...report, dryRun: true, domainId })));
},
'click .js-cloud-import-now'(event, tpl) {
event.preventDefault();
const domainId = event.currentTarget.getAttribute('data-id');
report(Meteor.callAsync('cloudPanelImportDomain', domainId, { dryRun: false })
.then(report => { tpl.report.set({ ...report, dryRun: false, domainId }); return tpl.loadAll(); }));
},
});
Template.cloudPanelDomainRow.onCreated(function () {
this.tested = new ReactiveVar('');
});
Template.cloudPanelDomainRow.helpers({
tested: () => Template.instance().tested.get(),
databaseLabel(db) {
if (!db) return '—';
if (db.uri) return db.uri;
return `${db.username ? `${db.username}@` : ''}${db.host}:${db.port}/${db.database}`;
},
});
Template.cloudPanelDomainRow.events({
'click .js-cloud-domain-test'(event, tpl) {
event.preventDefault();
tpl.tested.set('…');
Meteor.callAsync('cloudPanelTestDatabase', event.currentTarget.getAttribute('data-id'))
.then(r => tpl.tested.set(TAPi18n.__('cloud-panel-test-ok', { users: r.users, boards: r.boards, cards: r.cards })))
.catch(error => tpl.tested.set(errorText(error)));
},
});
Template.cloudPanelDomainForm.helpers({
customers: () => (Template.currentData().domain.customerUsernames || []).join(', '),
cloudflareOn: () => Template.currentData().domain.cloudflare !== false,
});
Template.cloudPanelDomainForm.events({
'submit .js-cloud-domain'(event) {
event.preventDefault();
const form = event.currentTarget;
const { domain, close } = Template.currentData();
const database = {};
if (field(form, 'uri')) database.uri = field(form, 'uri');
else if (field(form, 'host')) {
database.host = field(form, 'host');
if (field(form, 'port')) database.port = parseInt(field(form, 'port'), 10);
database.database = field(form, 'database');
for (const name of ['username', 'authSource', 'replicaSet']) if (field(form, name)) database[name] = field(form, name);
if (form.elements.password.value) database.password = form.elements.password.value;
if (form.elements.tls.checked) database.tls = true;
}
const value = {
domain: field(form, 'domain'), customerName: field(form, 'customerName'), mode: field(form, 'mode'),
customerEmail: field(form, 'customerEmail'), billingEmail: field(form, 'billingEmail'),
startDate: field(form, 'startDate'), endDate: field(form, 'endDate'),
upstream: field(form, 'upstream'), customerUsernames: list(field(form, 'customerUsernames')),
notes: field(form, 'notes'), cloudflare: form.elements.cloudflare.checked === true,
};
if (Object.keys(database).length) value.database = database;
report(Meteor.callAsync('cloudPanelSaveDomain', domain._id || null, value).then(() => close(true)));
},
'click .js-cloud-domain-close'(event) {
event.preventDefault();
Template.currentData().close(false);
},
'click .js-cloud-domain-remove'(event) {
event.preventDefault();
const { close } = Template.currentData();
report(Meteor.callAsync('cloudPanelRemoveDomain', event.currentTarget.getAttribute('data-id')).then(() => close(true)));
},
});
// ---------------------------------------------------------------- Invoices
const INVOICE_STATE_KEYS = { open: 'cloud-panel-invoice-open', paid: 'billing-status-paid', void: 'billing-status-void' };
Template.cloudPanelInvoices.onCreated(function () {
this.invoices = new ReactiveVar([]);
this.allDomains = new ReactiveVar([]);
this.load = () => Meteor.callAsync('cloudPanelInvoices').then(invoices => this.invoices.set(invoices));
this.load();
if (Template.currentData().isCloudAdmin) {
Meteor.callAsync('cloudPanelDomainsCount', '')
.then(total => Promise.all(Array.from({ length: Math.ceil(total / TABLE_PAGE_ROWS_PER_PAGE) }, (_, i) =>
Meteor.callAsync('cloudPanelDomainsPage', { page: i + 1 }))))
.then(pages => this.allDomains.set(pages.flat()));
}
});
Template.cloudPanelInvoices.helpers({
invoices: () => Template.instance().invoices.get(),
allDomains: () => Template.instance().allDomains.get(),
money: (minor, currency) => formatMoney(minor, currency, language()),
statusLabel: status => TAPi18n.__(INVOICE_STATE_KEYS[status] || status),
});
Template.cloudPanelInvoices.events({
'submit .js-cloud-invoice'(event, tpl) {
event.preventDefault();
const form = event.currentTarget;
const value = { number: field(form, 'number'), issueDate: field(form, 'issueDate'), amount: parseFloat(field(form, 'amount')),
currency: field(form, 'currency'), status: field(form, 'status') };
for (const name of ['dueDate', 'paidDate', 'description', 'link']) if (field(form, name)) value[name] = field(form, name);
report(Meteor.callAsync('cloudPanelSaveInvoice', field(form, 'domainId'), null, value).then(() => { form.reset(); return tpl.load(); }));
},
'click .js-cloud-invoice-remove'(event, tpl) {
event.preventDefault();
report(Meteor.callAsync('cloudPanelRemoveInvoice', event.currentTarget.getAttribute('data-id')).then(() => tpl.load()));
},
});
// ---------------------------------------------------------------- Chat
Template.cloudPanelChat.onCreated(function () {
this.domains = new ReactiveVar(Template.currentData().domains || []);
this.domainId = new ReactiveVar((this.domains.get()[0] || {})._id || '');
this.messages = new ReactiveVar([]);
this.imported = new ReactiveVar(0);
this.load = () => {
const id = this.domainId.get();
if (!id) return Promise.resolve();
return Meteor.callAsync('cloudPanelChat', id).then(messages => this.messages.set(messages));
};
if (Template.currentData().isCloudAdmin) {
Meteor.callAsync('cloudPanelDomainsCount', '')
.then(total => Promise.all(Array.from({ length: Math.ceil(total / TABLE_PAGE_ROWS_PER_PAGE) }, (_, i) =>
Meteor.callAsync('cloudPanelDomainsPage', { page: i + 1 }))))
.then(pages => {
this.domains.set(pages.flat());
if (!this.domainId.get() && pages.flat()[0]) this.domainId.set(pages.flat()[0]._id);
return this.load();
});
} else {
this.load();
}
// The chat is read again every 15 seconds while the pane is open.
this.poll = Meteor.setInterval(() => this.load(), 15000);
});
Template.cloudPanelChat.onDestroyed(function () {
Meteor.clearInterval(this.poll);
});
Template.cloudPanelChat.helpers({
chatDomains: () => Template.instance().domains.get(),
domainId: () => Template.instance().domainId.get(),
messages: () => Template.instance().messages.get(),
imported: () => Template.instance().imported.get(),
when: at => (at ? new Date(at).toLocaleString(language()) : ''),
});
Template.cloudPanelChat.events({
'change .js-cloud-chat-domain'(event, tpl) {
tpl.domainId.set(event.currentTarget.value);
tpl.load();
},
'submit .js-cloud-chat-send'(event, tpl) {
event.preventDefault();
const form = event.currentTarget;
report(Meteor.callAsync('cloudPanelSendChat', tpl.domainId.get(), { text: form.elements.text.value })
.then(() => { form.reset(); return tpl.load(); }));
},
'submit .js-cloud-chat-import'(event, tpl) {
event.preventDefault();
const form = event.currentTarget;
const file = form.elements.file.files[0];
if (!file) return;
const reader = new FileReader();
reader.onload = () => {
const zipBase64 = String(reader.result).split(',')[1] || '';
report(Meteor.callAsync('cloudPanelImportChat', tpl.domainId.get(), field(form, 'source'), { zipBase64 })
.then(result => { tpl.imported.set(result.imported); form.reset(); return tpl.load(); }));
};
reader.readAsDataURL(file);
},
});
// ---------------------------------------------------------------- Admin Panel
// Admin Panel / People / Cloud: the Cloud Panel Domain and its SuperAdmin.
Template.cloudPanelSettings.onCreated(function () {
this.settings = new ReactiveVar({ domain: '', superAdminUsername: '' });
this.saved = new ReactiveVar(false);
this.error = new ReactiveVar('');
Meteor.callAsync('cloudPanelGetSettings').then(s => this.settings.set(s)).catch(e => this.error.set(errorText(e)));
});
Template.cloudPanelSettings.helpers({
settings: () => Template.instance().settings.get(),
saved: () => Template.instance().saved.get(),
error: () => Template.instance().error.get(),
});
Template.cloudPanelSettings.events({
'submit .js-cloud-panel-settings'(event, tpl) {
event.preventDefault();
const form = event.currentTarget;
tpl.saved.set(false);
Meteor.callAsync('cloudPanelSetSettings', { domain: field(form, 'domain'), superAdminUsername: field(form, 'superAdminUsername') })
.then(s => { tpl.settings.set(s); tpl.saved.set(true); tpl.error.set(''); })
.catch(e => tpl.error.set(errorText(e)));
},
});
+3 -1
View File
@@ -55,7 +55,9 @@ export async function startCsvMapping(importTpl, { rows, excelBase64, uploadId,
}
const mapping = {
columns: { ...((preview.mapping && preview.mapping.columns) || {}) },
customFieldColumns: [],
// The guess ticks every column it has no field for, so nothing is left
// behind unless the user unticks it.
customFieldColumns: [...((preview.mapping && preview.mapping.customFieldColumns) || [])],
listName: TAPi18n.__('scrum-category-todo'),
};
importTpl.csvMappingState.set({
+3 -1
View File
@@ -288,7 +288,9 @@ a.show-mapping {
font-size: 0.85em;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #6b778c;
/* #505f79, not #6b778c: small bold text needs 4.5:1, and #6b778c on
white is 4.48:1 - axe (45-axe-accessibility.e2e.js) failed it. */
color: #505f79;
}
.import-source-list .import-source-group:first-child {
margin-top: 0;
+10 -2
View File
@@ -684,7 +684,8 @@ Template.import.helpers({
const product = productNameOrDefault(setting && setting.productName);
const current = Session.get('importSource');
// Grouped by kind under headings (models/lib/toolGroups.js), the same
// groups the Export menu uses; WeKan's own is headed by the product name.
// groups the Export menu uses; WeKan's own is headed by the product name,
// and a company with several products by the company's name.
const { groupTools } = require('/models/lib/toolGroups');
return groupTools(IMPORT_SOURCES.map(source => ({
key: source.key,
@@ -694,7 +695,9 @@ Template.import.helpers({
selected: source.key === current,
}))).map(source => ({
...source,
groupHeading: source.groupStart ? (source.groupLabelKey ? TAPi18n.__(source.groupLabelKey) : product) : '',
groupHeading: source.groupStart
? (source.groupLabelKey ? TAPi18n.__(source.groupLabelKey) : source.groupLabel || product)
: '',
}));
},
hasImportSource() {
@@ -788,6 +791,11 @@ Template.importTextarea.helpers({
});
}
// Sandstorm's apps share one instruction, naming the app (models/lib/importSources.js).
const spec = importSourceSpec(importSource);
if (spec && spec.instruction === 'sandstorm') {
return TAPi18n.__('import-board-instruction-sandstorm', { app: spec.name.replace(/^Sandstorm /, '') });
}
return TAPi18n.__(`import-board-instruction-${importSource}`);
},
importPlaceHolder() {
+1 -2
View File
@@ -745,8 +745,7 @@ form.inlined-form .list-composer {
display: flex;
/* #5439: always show a scrollbar on the list body across desktop and mobile
browsers (overlay scrollbars on macOS/iOS/Android/Firefox otherwise auto-
hide it). Keep these declarations in sync with models/lib/scrollbarCss.js
(alwaysVisibleScrollbarCss), which is unit tested. */
hide it). tests/scrollbarCss.test.cjs reads these rules. */
overflow-y: scroll;
scrollbar-width: thin;
scrollbar-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.08);
+2 -20
View File
@@ -7,6 +7,7 @@ import { dueFromTitle, resetDueFromTitle } from '/client/components/forms/titleD
import '/client/components/cards/similarCards';
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { displayDefaultTitle } from '/imports/lib/defaultTitle';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { getSpinnerName, getSpinnerTemplate } from '/client/lib/spinner';
import getSlug from 'limax';
@@ -1319,26 +1320,7 @@ Template.linkCardPopup.helpers({
},
isTitleDefault(title) {
// https://github.com/wekan/wekan/issues/4763
// https://github.com/wekan/wekan/issues/4742
// Translation text for "default" does not work, it returns an object.
// When that happens, try use translation "defaultdefault" that has same content of default, or return text "Default".
// This can happen, if swimlane does not have name.
// Yes, this is fixing the symptom (Swimlane title does not have title)
// instead of fixing the problem (Add Swimlane title when creating swimlane)
// because there could be thousands of swimlanes, adding name Default to all of them
// would be very slow.
if (title.startsWith("key 'default") && title.endsWith('returned an object instead of string.')) {
if (`${TAPi18n.__('defaultdefault')}`.startsWith("key 'default") && `${TAPi18n.__('defaultdefault')}`.endsWith('returned an object instead of string.')) {
return 'Default';
} else {
return `${TAPi18n.__('defaultdefault')}`;
}
} else if (title === 'Default') {
return `${TAPi18n.__('defaultdefault')}`;
} else {
return title;
}
return displayDefaultTitle(title, key => TAPi18n.__(key));
},
});
+5 -5
View File
@@ -642,15 +642,15 @@ template(name="listDestinationPicker")
label {{_ 'boards'}}:
select.js-select-boards
each boards
option(value="{{_id}}" selected="{{#if isDialogOptionBoardId _id}}selected{{/if}}") {{add @index 1}}. {{title}}
option(value="{{_id}}" selected="{{#if isDialogOptionBoardId _id}}selected{{/if}}") {{title}}
label {{_ 'swimlanes'}}:
select.js-select-swimlanes
each swimlanes
option(value="{{_id}}" selected="{{#if isDialogOptionSwimlaneId _id}}selected{{/if}}") {{add @index 1}}. {{isTitleDefault title}}
option(value="{{_id}}" selected="{{#if isDialogOptionSwimlaneId _id}}selected{{/if}}") {{isTitleDefault title}}
label {{_ 'lists'}}:
select.js-select-lists
each lists
option(value="{{_id}}" selected="{{#if isDialogOptionListId _id}}selected{{/if}}") {{add @index 1}}. {{title}}
option(value="{{_id}}" selected="{{#if isDialogOptionListId _id}}selected{{/if}}") {{title}}
div
input(type="radio" name="list-position" value="left" checked id="list-position-left" style="display: inline")
label(for="list-position-left") {{_ 'left-of-list'}}
@@ -679,13 +679,13 @@ template(name="addListPopup")
label {{_ 'add-after-list'}}
select.list-position-input.full-line
each swimlaneLists
option(value="{{_id}}" selected="{{$eq _id currentListIdValue}}") {{increment @index}} {{title}}
option(value="{{_id}}" selected="{{$eq _id currentListIdValue}}") {{title}}
else
if currentBoard.lists.length
label {{_ 'add-after-list'}}
select.list-position-input.full-line
each currentBoard.lists
option(value="{{_id}}" selected="{{$eq _id currentListIdValue}}") {{increment @index}} {{title}}
option(value="{{_id}}" selected="{{$eq _id currentListIdValue}}") {{title}}
.edit-controls.clearfix
button.primary.confirm.js-submit-add-list(type="submit") {{_ 'save'}}
unless currentBoard.isTemplatesBoard
+191
View File
@@ -0,0 +1,191 @@
/* Budget and billing page (docs/Features/Billing/Billing.md). */
.billing-page {
padding: 1rem;
max-width: 100%;
box-sizing: border-box;
}
.billing-intro {
max-width: 70ch;
opacity: 0.85;
}
.billing-boards,
.billing-invoice-table,
.billing-print-lines {
border-collapse: collapse;
width: 100%;
margin: 0.5rem 0 1rem;
}
.billing-boards th,
.billing-boards td,
.billing-invoice-table th,
.billing-invoice-table td,
.billing-print-lines th,
.billing-print-lines td {
border: 1px solid rgba(0, 0, 0, 0.12);
padding: 0.35rem 0.5rem;
text-align: start;
vertical-align: top;
}
.billing-boards a {
cursor: pointer;
}
.billing-board-row.is-selected {
background: rgba(0, 121, 191, 0.08);
}
.billing-board-row.is-over,
.billing-over {
color: #c62828;
}
.billing-bar {
height: 0.5rem;
background: rgba(0, 0, 0, 0.08);
border-radius: 3px;
overflow: hidden;
margin-bottom: 0.2rem;
max-width: 12rem;
}
.billing-bar-fill {
height: 100%;
background: #3cb500;
}
.billing-board-row.is-over .billing-bar-fill {
background: #e53935;
}
.billing-summary dl,
.billing-print-meta dl {
display: grid;
grid-template-columns: max-content 1fr;
gap: 0.2rem 1rem;
}
.billing-summary dt,
.billing-print-meta dt {
font-weight: bold;
}
.billing-summary dd,
.billing-print-meta dd {
margin: 0;
}
.billing-sections {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
gap: 1rem;
margin-top: 1rem;
}
.billing-section {
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 4px;
padding: 0.75rem;
margin-top: 1rem;
}
.billing-sections .billing-section {
margin-top: 0;
}
.billing-section h3 {
margin-top: 0;
}
.billing-section label {
display: block;
margin-top: 0.4rem;
}
.billing-list {
padding-inline-start: 1.2rem;
}
.billing-list a {
margin-inline-start: 0.5rem;
cursor: pointer;
}
.billing-invoice-table-wrapper,
.billing-invoices {
overflow-x: auto;
}
.billing-invoice-actions button {
margin: 0 0.25rem 0.25rem 0;
}
.billing-status-void td {
opacity: 0.55;
text-decoration: line-through;
}
.billing-status-paid td:nth-child(6) {
color: #2e7d32;
font-weight: bold;
}
.billing-print {
margin-top: 1rem;
padding: 1rem;
border: 1px solid rgba(0, 0, 0, 0.2);
background: #fff;
color: #000;
}
.billing-print-customer {
white-space: pre-wrap;
font-family: inherit;
}
.billing-print-lines tfoot th {
border-top: 2px solid #000;
}
/* Printing: only the invoice. */
@media print {
body * {
visibility: hidden;
}
.billing-print,
.billing-print * {
visibility: visible;
}
.billing-print {
position: absolute;
inset: 0;
border: none;
}
.billing-print button {
display: none;
}
}
@media screen and (max-width: 800px) {
.billing-page { padding: 0.5rem; }
}
/* Expenses, fees, time to approve and quotes (docs/Features/Billing/Billing.md). */
.billing-hint {
color: #555;
font-size: 0.9em;
}
.billing-list li.is-invoiced {
color: #555;
}
.billing-draft-lines li.billing-line-fee,
.billing-draft-lines li.billing-line-expense {
font-style: italic;
}
.billing-quote-accepted td:first-child {
font-weight: bold;
}
.billing-quote-declined {
color: #777;
text-decoration: line-through;
}
.time-entry-approved {
color: #2e7d32;
margin-inline-start: 0.3em;
}
.time-entry-rejected {
color: #b71c1c;
margin-inline-start: 0.3em;
}
/* Labelled native checkboxes: the app-wide material form rule
(client/components/forms/forms.css) hides native checkboxes three ways -
display, visibility, an offset - which left these with a label and no box
to tick or see ticked. All three are undone, as in cardFlow.css. */
.billing-page input[type="checkbox"] {
display: inline-block;
visibility: visible;
position: static;
inset-inline-start: auto;
width: 16px;
height: 16px;
min-height: 0;
margin: 0;
margin-inline-end: 4px;
flex: none;
}
+632
View File
@@ -0,0 +1,632 @@
//- Budget and billing (docs/Features/Billing/Billing.md): the boards the user
is an admin of, each with its budget, what its work has cost and will cost,
the hourly rates, who invoices and how it is paid, and the invoices of the
time spent. The numbers come from the server (server/billing.js,
models/lib/billing.js); this page draws them.
template(name="billing")
if currentUser
.billing-page
h1 {{_ 'billing-title'}}
p.billing-intro {{_ 'billing-intro'}}
if loading
+spinner
else if error
.warning {{error}}
else
if isAdmin
label.billing-all-boards
input.js-billing-all-boards(type="checkbox" checked=allBoards)
| {{_ 'workload-all-boards'}}
if boards.length
.billing-table-wrapper
table.billing-boards
thead
tr
th {{_ 'board'}}
th {{_ 'billing-budget'}}
th {{_ 'billing-spent'}}
th {{_ 'billing-forecast'}}
th {{_ 'billing-invoiced'}}
tbody
each board in boards
tr.billing-board-row(class="{{#if board.finance.overBudget}}is-over{{/if}} {{#if $eq board._id selectedBoardId}}is-selected{{/if}}")
td
a.js-billing-board(data-id=board._id) {{board.title}}
if board.overdueInvoices
span.billing-over
| · {{_ 'billing-overdue-count' count=board.overdueInvoices}}
td {{budgetLabel board}}
td
.billing-bar
.billing-bar-fill(style="width: {{barWidth board.finance.usedPercent}}%")
span {{money board.finance.spentMinor board.finance.currency}}
if board.finance.usedPercent
| · {{board.finance.usedPercent}} %
td
span {{money board.finance.forecastMinor board.finance.currency}}
if board.finance.forecastPercent
| · {{board.finance.forecastPercent}} %
if board.finance.overBudget
span.billing-over
i.fa.fa-exclamation-triangle
| {{_ 'billing-over-budget'}}
td {{money board.finance.invoicedMinor board.finance.currency}}
else
p {{_ 'billing-no-boards'}}
if detail
+billingBoard(detail=detail reload=reload period=period setPeriod=setPeriod)
template(name="billingBoard")
.billing-board
h2 {{detail.board.title}}
.billing-summary
dl
dt {{_ 'billing-spent'}}
dd {{money detail.finance.spentMinor detail.finance.currency}} ({{hours detail.finance.spentHours}})
dt {{_ 'billing-remaining'}}
dd {{money detail.finance.remainingMinor detail.finance.currency}} ({{hours detail.finance.remainingHours}})
dt {{_ 'billing-forecast'}}
dd(class="{{#if detail.finance.overBudget}}billing-over{{/if}}") {{money detail.finance.forecastMinor detail.finance.currency}} ({{hours detail.finance.forecastHours}})
if hasBudget
dt {{_ 'billing-left'}}
dd
if detail.finance.leftMinor
| {{money detail.finance.leftMinor detail.finance.currency}}
if detail.finance.leftHours
| {{hours detail.finance.leftHours}}
dt {{_ 'billing-invoiced'}}
dd {{money detail.finance.invoicedMinor detail.finance.currency}}
dt {{_ 'billing-paid'}}
dd {{money detail.finance.paidMinor detail.finance.currency}}
dt {{_ 'billing-unbilled'}}
dd.billing-unbilled {{money detail.finance.unbilledMinor detail.finance.currency}}
if detail.finance.expenseMinor
dt {{_ 'billing-expenses'}}
dd {{money detail.finance.expenseMinor detail.finance.currency}}
if detail.finance.hasCostRates
dt {{_ 'billing-cost'}}
dd {{money detail.finance.costMinor detail.finance.currency}}
dt {{_ 'billing-margin'}}
dd.billing-margin(class="{{#if isNegative detail.finance.marginMinor}}billing-over{{/if}}")
| {{money detail.finance.marginMinor detail.finance.currency}}
if detail.finance.marginPercent
| · {{detail.finance.marginPercent}} %
if detail.finance.unratedHours
p.warning {{_ 'billing-unrated' hours=detail.finance.unratedHours}}
if detail.finance.hasCostRates
if detail.finance.uncostedHours
p.warning {{_ 'billing-uncosted' hours=detail.finance.uncostedHours}}
.billing-sections
section.billing-section
h3 {{_ 'billing-budget'}}
form.js-billing-budget
label(for="billing-budget-amount") {{_ 'billing-amount'}}
input#billing-budget-amount(type="number" name="amount" min="0" step="0.01" value=budgetAmount)
label(for="billing-budget-currency") {{_ 'billing-currency'}}
input#billing-budget-currency(type="text" name="currency" maxlength="3" value=budgetCurrency placeholder="EUR")
label(for="billing-budget-hours") {{_ 'billing-budget-hours'}}
input#billing-budget-hours(type="number" name="hours" min="0" step="0.5" value=detail.budget.hours)
label(for="billing-budget-start") {{_ 'start'}}
input#billing-budget-start(type="date" name="start" value=detail.budget.start)
label(for="billing-budget-end") {{_ 'card-end'}}
input#billing-budget-end(type="date" name="end" value=detail.budget.end)
button.primary(type="submit") {{_ 'save'}}
if detail.budget
button.js-billing-remove-budget(type="button") {{_ 'delete'}}
section.billing-section
h3 {{_ 'billing-rates'}}
if detail.rates.length
ul.billing-list
each rate in detail.rates
li
if rate.userId
| {{rate.name}}
else
| {{_ 'billing-default-rate'}}
| · {{money rate.hourlyRateMinor rate.currency}} / {{_ 'workload-hours-short'}}
if isNumber rate.costRateMinor
| · {{_ 'billing-cost-rate'}} {{money rate.costRateMinor rate.currency}}
a.js-billing-remove-rate(data-id=rate._id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
form.js-billing-rate
label(for="billing-rate-person") {{_ 'person'}}
select#billing-rate-person(name="userId")
option(value="") {{_ 'billing-default-rate'}}
each member in detail.members
option(value=member.userId) {{member.name}}
label(for="billing-rate-amount") {{_ 'billing-hourly-rate'}}
input#billing-rate-amount(type="number" name="hourlyRate" min="0" step="0.01" required)
label(for="billing-rate-currency") {{_ 'billing-currency'}}
input#billing-rate-currency(type="text" name="currency" maxlength="3" value=budgetCurrency placeholder="EUR" required)
label(for="billing-rate-cost") {{_ 'billing-cost-rate'}}
input#billing-rate-cost(type="number" name="costRate" min="0" step="0.01")
button.primary(type="submit") {{_ 'save'}}
section.billing-section
h3 {{_ 'billing-issuer'}}
form.js-billing-profile
label(for="billing-issuer-name") {{_ 'billing-issuer-name'}}
input#billing-issuer-name(type="text" name="issuerName" maxlength="200" value=detail.profile.issuerName)
label(for="billing-issuer-address") {{_ 'billing-address'}}
textarea#billing-issuer-address(name="issuerAddress" maxlength="500" rows="3") {{detail.profile.issuerAddress}}
label(for="billing-issuer-country") {{_ 'billing-country'}}
input#billing-issuer-country(type="text" name="issuerCountry" maxlength="2" value=detail.profile.issuerCountry placeholder="FI")
label(for="billing-business-id") {{_ 'billing-business-id'}}
input#billing-business-id(type="text" name="businessId" maxlength="50" value=detail.profile.businessId)
label(for="billing-vat-id") {{_ 'billing-vat-id'}}
input#billing-vat-id(type="text" name="vatId" maxlength="50" value=detail.profile.vatId)
label(for="billing-email") {{_ 'email'}}
input#billing-email(type="text" name="email" maxlength="200" value=detail.profile.email)
label(for="billing-phone") {{_ 'billing-phone'}}
input#billing-phone(type="text" name="phone" maxlength="50" value=detail.profile.phone)
label(for="billing-website") {{_ 'billing-website'}}
input#billing-website(type="text" name="website" maxlength="200" value=detail.profile.website)
label(for="billing-vat-percent") {{_ 'billing-vat'}} %
input#billing-vat-percent(type="number" name="vatPercent" min="0" max="100" step="0.1" value=detail.profile.vatPercent)
label.billing-checkbox
input(type="checkbox" name="reverseCharge" checked=detail.profile.reverseCharge)
| {{_ 'billing-reverse-charge'}}
label(for="billing-terms") {{_ 'billing-payment-terms'}}
input#billing-terms(type="number" name="paymentTermsDays" min="0" max="365" step="1" value=detail.profile.paymentTermsDays)
label(for="billing-penalty") {{_ 'billing-penalty-interest'}} %
input#billing-penalty(type="number" name="penaltyInterestPercent" min="0" max="100" step="0.1" value=detail.profile.penaltyInterestPercent)
label(for="billing-reference-type") {{_ 'billing-payment-reference'}}
select#billing-reference-type(name="referenceType")
each type in referenceTypes
option(value=type.value selected="{{#if $eq type.value detail.profile.referenceType}}selected{{/if}}") {{type.label}}
label(for="billing-footer") {{_ 'billing-footer'}}
textarea#billing-footer(name="footer" maxlength="1000" rows="2") {{detail.profile.footer}}
label.billing-checkbox
input(type="checkbox" name="billTime" checked=billsTime)
| {{_ 'billing-bill-time'}}
label.billing-checkbox
input(type="checkbox" name="approveTime" checked=detail.profile.approveTime)
| {{_ 'billing-approve-time'}}
label(for="billing-default-customer") {{_ 'billing-default-customer'}}
textarea#billing-default-customer(name="customer" maxlength="500" rows="3") {{detail.profile.customer}}
label(for="billing-default-country") {{_ 'billing-country'}}
input#billing-default-country(type="text" name="customerCountry" maxlength="2" value=detail.profile.customerCountry placeholder="FI")
label(for="billing-default-vatid") {{_ 'billing-vat-id'}}
input#billing-default-vatid(type="text" name="customerVatId" maxlength="50" value=detail.profile.customerVatId)
label(for="billing-quote-days") {{_ 'billing-quote-valid-days'}}
input#billing-quote-days(type="number" name="quoteValidDays" min="1" max="365" step="1" value=quoteValidDays)
button.primary(type="submit") {{_ 'save'}}
section.billing-section
h3 {{_ 'billing-payment-methods'}}
if detail.profile.paymentMethods.length
ul.billing-list
each method in paymentMethods
li
| {{method.title}}
if method.summary
| · {{method.summary}}
a.js-billing-remove-method(data-index=method.index title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
form.js-billing-method
label(for="billing-method-type") {{_ 'billing-method'}}
select#billing-method-type.js-billing-method-type(name="type")
each type in methodTypes
option(value=type.value selected="{{#if $eq type.value methodType}}selected{{/if}}") {{type.label}}
each fieldName in methodFields
label(for="billing-method-{{fieldName.name}}") {{fieldName.label}}
if $eq fieldName.name 'details'
textarea(id="billing-method-{{fieldName.name}}" name=fieldName.name rows="2" maxlength="2000")
else
input(id="billing-method-{{fieldName.name}}" type="text" name=fieldName.name maxlength="2000" placeholder=fieldName.placeholder)
button.primary(type="submit") {{_ 'billing-add-method'}}
section.billing-section.billing-expenses
h3 {{_ 'billing-expenses'}}
if detail.expenses.length
ul.billing-list
each expense in detail.expenses
li(class="{{#if expense.invoiced}}is-invoiced{{/if}}")
| {{expense.date}} · {{expenseCategory expense.category}}
if expense.description
| · {{expense.description}}
| · {{money expense.amountMinor expense.currency}}
if expense.markupPercent
| (+{{expense.markupPercent}} % = {{money expense.chargeMinor expense.currency}})
unless expense.billable
| · {{_ 'billing-not-billable'}}
if expense.cardTitle
| · {{expense.cardTitle}}
if expense.name
| · {{expense.name}}
if expense.invoiced
i.fa.fa-file-text-o(title="{{_ 'time-entry-invoiced'}}")
else
a.js-billing-remove-expense(data-id=expense._id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
else
p {{_ 'billing-no-expenses'}}
form.js-billing-expense
label(for="billing-expense-date") {{_ 'date'}}
input#billing-expense-date(type="date" name="date" value=today required)
label(for="billing-expense-amount") {{_ 'billing-amount'}}
input#billing-expense-amount(type="number" name="amount" min="0.01" step="0.01" required)
label(for="billing-expense-currency") {{_ 'billing-currency'}}
input#billing-expense-currency(type="text" name="currency" maxlength="3" value=budgetCurrency placeholder="EUR" required)
label(for="billing-expense-category") {{_ 'billing-expense-category'}}
select#billing-expense-category(name="category")
each category in expenseCategories
option(value=category.value) {{category.label}}
label(for="billing-expense-description") {{_ 'description'}}
input#billing-expense-description(type="text" name="description" maxlength="200")
label(for="billing-expense-markup") {{_ 'billing-markup'}} %
input#billing-expense-markup(type="number" name="markupPercent" min="0" max="100" step="0.1")
label(for="billing-expense-card") {{_ 'card'}}
select#billing-expense-card(name="cardId")
option(value="") —
each card in detail.cards
option(value=card._id) {{card.title}}
label(for="billing-expense-person") {{_ 'person'}}
select#billing-expense-person(name="userId")
option(value="") —
each member in detail.members
option(value=member.userId) {{member.name}}
label.billing-checkbox
input(type="checkbox" name="billable" checked)
| {{_ 'billing-billable'}}
button.primary(type="submit") {{_ 'billing-add-expense'}}
section.billing-section.billing-fees
h3 {{_ 'billing-fees'}}
p.billing-hint {{_ 'billing-fees-intro'}}
if detail.fees.length
ul.billing-list
each fee in detail.fees
li
| {{fee.title}} · {{money fee.amountMinor fee.currency}} · {{fee.date}}
if $eq fee.recurring 'monthly'
| · {{_ 'billing-recurring-monthly'}}
if fee.end
| – {{fee.end}}
| · {{_ 'billing-fee-billed' billed=fee.billedCount due=fee.dueCount}}
a.js-billing-remove-fee(data-id=fee._id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
else
p {{_ 'billing-no-fees'}}
form.js-billing-fee
label(for="billing-fee-title") {{_ 'title'}}
input#billing-fee-title(type="text" name="title" maxlength="200" required)
label(for="billing-fee-amount") {{_ 'billing-amount'}}
input#billing-fee-amount(type="number" name="amount" min="0.01" step="0.01" required)
label(for="billing-fee-currency") {{_ 'billing-currency'}}
input#billing-fee-currency(type="text" name="currency" maxlength="3" value=budgetCurrency placeholder="EUR" required)
label(for="billing-fee-date") {{_ 'date'}}
input#billing-fee-date(type="date" name="date" value=today required)
label(for="billing-fee-recurring") {{_ 'billing-recurring'}}
select#billing-fee-recurring(name="recurring")
option(value="none") {{_ 'billing-recurring-none'}}
option(value="monthly") {{_ 'billing-recurring-monthly'}}
label(for="billing-fee-end") {{_ 'card-end'}}
input#billing-fee-end(type="date" name="end")
button.primary(type="submit") {{_ 'billing-add-fee'}}
if detail.profile.approveTime
section.billing-section.billing-approval
h3 {{_ 'billing-time-to-approve'}}
if detail.pendingTime.length
form.js-billing-approval
ul.billing-list
each entry in detail.pendingTime
li
label.billing-checkbox
input(type="checkbox" name="entry" value=entry._id checked)
| {{entry.date}} · {{entry.title}} · {{entry.name}} · {{entry.hours}} {{_ 'workload-hours-short'}}
if entry.note
| · {{entry.note}}
label(for="billing-approval-note") {{_ 'workload-note'}}
input#billing-approval-note(type="text" name="note" maxlength="200")
button.primary.js-billing-decide(type="button" data-decision="approved") {{_ 'billing-approve'}}
button.js-billing-decide(type="button" data-decision="rejected") {{_ 'billing-reject'}}
else
p {{_ 'billing-nothing-to-approve'}}
section.billing-section
h3 {{_ 'billing-new-invoice'}}
form.js-billing-period
label(for="billing-period-start") {{_ 'billing-period'}}
.billing-period
input#billing-period-start(type="date" name="periodStart" value=period.periodStart)
| –
input#billing-period-end(type="date" name="periodEnd" value=period.periodEnd aria-label="{{_ 'card-end'}}")
label.billing-checkbox
input.js-billing-undated(type="checkbox" name="includeUndated" checked=period.includeUndated)
| {{_ 'billing-include-undated'}}
if detail.draft
if detail.draft.lines.length
p {{_ 'billing-draft-summary' hours=detail.draft.totalHours amount=draftTotal}}
ul.billing-draft-lines
each line in detail.draft.lines
li(class="billing-line-{{lineKind line}}")
if line.kind
| {{lineKindLabel line}}: {{line.title}} · {{line.firstDate}} · {{money line.amountMinor detail.draft.currency}}
else
| {{line.title}} · {{line.name}} · {{line.hours}} {{_ 'workload-hours-short'}} · {{money line.amountMinor detail.draft.currency}}
else
p {{_ 'billing-nothing-to-invoice'}}
if detail.draft.undatedHours
p {{_ 'billing-undated-included' hours=detail.draft.undatedHours}}
if detail.draft.unratedHours
p.warning {{_ 'billing-unrated' hours=detail.draft.unratedHours}}
if detail.draft.unapprovedHours
p.warning {{_ 'billing-unapproved' hours=detail.draft.unapprovedHours}}
else
p {{_ 'billing-set-rate-first'}}
form.js-billing-invoice
label(for="billing-invoice-customer") {{_ 'billing-customer'}}
textarea#billing-invoice-customer(name="customer" maxlength="500" rows="3" placeholder=detail.profile.customer)
label(for="billing-invoice-country") {{_ 'billing-country'}}
input#billing-invoice-country(type="text" name="customerCountry" maxlength="2" placeholder="FI")
label(for="billing-invoice-vatid") {{_ 'billing-vat-id'}}
input#billing-invoice-vatid(type="text" name="customerVatId" maxlength="50")
label(for="billing-invoice-reference") {{_ 'billing-reference'}}
input#billing-invoice-reference(type="text" name="reference" maxlength="100")
label(for="billing-invoice-issue") {{_ 'billing-issue-date'}}
input#billing-invoice-issue(type="date" name="issueDate" value=today)
label(for="billing-invoice-due") {{_ 'billing-due-date'}}
input#billing-invoice-due(type="date" name="dueDate")
label(for="billing-invoice-vat") {{_ 'billing-vat'}} %
input#billing-invoice-vat(type="number" name="vatPercent" min="0" max="100" step="0.1" placeholder=detail.profile.vatPercent)
label(for="billing-invoice-notes") {{_ 'workload-note'}}
textarea#billing-invoice-notes(name="notes" maxlength="2000" rows="2")
button.primary(type="submit" disabled=cannotInvoice) {{_ 'billing-create-invoice'}}
section.billing-section.billing-invoices
h3 {{_ 'billing-invoices'}}
if detail.invoices.length
.billing-table-wrapper
table.billing-invoice-table
thead
tr
th {{_ 'billing-number'}}
th {{_ 'billing-issue-date'}}
th {{_ 'billing-due-date'}}
th {{_ 'billing-customer'}}
th {{_ 'hours'}}
th {{_ 'billing-total'}}
th {{_ 'billing-amount-due'}}
th {{_ 'billing-status'}}
th
tbody
each invoice in detail.invoices
tr(class="billing-status-{{invoice.status}} billing-state-{{invoice.state}}")
td {{invoice.number}}
td {{invoice.issueDate}}
td {{invoice.dueDate}}
td {{invoice.customer}}
td {{invoice.totalHours}}
td {{signedMoney invoice invoice.totalMinor}}
td
if invoice.dueMinor
| {{money invoice.dueMinor invoice.currency}}
if invoice.interestMinor
span.billing-over
| + {{money invoice.interestMinor invoice.currency}}
td
| {{statusLabel invoice.state}}
if invoice.daysOverdue
span.billing-over
| ({{_ 'billing-days-overdue' days=invoice.daysOverdue}})
td.billing-invoice-actions
each next in nextStatuses invoice
button.js-billing-status(type="button" data-id=invoice._id data-status=next.value) {{next.label}}
if canCredit invoice
button.js-billing-credit(type="button" data-id=invoice._id) {{_ 'billing-credit'}}
button.js-billing-open(type="button" data-id=invoice._id)
i.fa.fa-eye
| {{_ 'billing-open'}}
each format in fileFormats
button.js-billing-file(type="button" data-id=invoice._id data-format=format.value)
i.fa(class=format.icon)
| {{format.label}}
else
p {{_ 'billing-no-invoices'}}
section.billing-section.billing-quotes
h3 {{_ 'billing-quotes'}}
p.billing-hint {{_ 'billing-quotes-intro'}}
form.js-billing-quote
label(for="billing-quote-customer") {{_ 'billing-customer'}}
textarea#billing-quote-customer(name="customer" maxlength="500" rows="2" placeholder=detail.profile.customer)
label(for="billing-quote-issue") {{_ 'billing-issue-date'}}
input#billing-quote-issue(type="date" name="issueDate" value=today)
label(for="billing-quote-valid") {{_ 'billing-valid-until'}}
input#billing-quote-valid(type="date" name="validUntil")
label(for="billing-quote-notes") {{_ 'workload-note'}}
textarea#billing-quote-notes(name="notes" maxlength="2000" rows="2")
button.primary(type="submit") {{_ 'billing-create-quote'}}
if detail.quotes.length
.billing-table-wrapper
table.billing-quote-table
thead
tr
th {{_ 'billing-number'}}
th {{_ 'billing-issue-date'}}
th {{_ 'billing-valid-until'}}
th {{_ 'billing-customer'}}
th {{_ 'hours'}}
th {{_ 'billing-total'}}
th {{_ 'billing-status'}}
th
tbody
each quote in detail.quotes
tr(class="billing-quote-{{quote.status}}")
td {{quote.number}}
td {{quote.issueDate}}
td
| {{quote.validUntil}}
if quote.expired
span.billing-over
| ({{_ 'billing-quote-expired'}})
td {{quote.customer}}
td {{quote.totalHours}}
td {{money quote.totalMinor quote.currency}}
td {{quoteStatusLabel quote.status}}
td.billing-invoice-actions
each next in nextQuoteStatuses quote
button.js-billing-quote-status(type="button" data-id=quote._id data-status=next.value) {{next.label}}
button.js-billing-quote-open(type="button" data-id=quote._id)
i.fa.fa-eye
| {{_ 'billing-open'}}
each format in quoteFormats
button.js-billing-quote-file(type="button" data-id=quote._id data-format=format.value)
i.fa(class=format.icon)
| {{format.label}}
label.billing-checkbox
input.js-billing-accept-budget(type="checkbox" checked)
| {{_ 'billing-accept-sets-budget'}}
else
p {{_ 'billing-no-quotes'}}
if printed
+billingInvoicePrint(invoice=printed reload=reloadFn setPrinted=setPrinted)
if actionError
.warning {{actionError}}
template(name="billingInvoicePrint")
.billing-print
.billing-print-header
h2
if $eq invoice.kind 'credit'
| {{_ 'billing-credit-note'}} {{invoice.number}}
else if $eq invoice.kind 'quote'
| {{_ 'billing-quote'}} {{invoice.number}}
else
| {{_ 'billing-invoice'}} {{invoice.number}}
.billing-print-issuer
strong {{invoice.profile.issuerName}}
pre {{invoice.profile.issuerAddress}}
if invoice.profile.businessId
div {{_ 'billing-business-id'}}: {{invoice.profile.businessId}}
if invoice.profile.vatId
div {{_ 'billing-vat-id'}}: {{invoice.profile.vatId}}
.billing-print-meta
if invoice.customer
pre.billing-print-customer {{invoice.customer}}
dl
dt {{_ 'billing-issue-date'}}
dd {{invoice.issueDate}}
if invoice.dueDate
if $eq invoice.kind 'quote'
dt {{_ 'billing-valid-until'}}
else
dt {{_ 'billing-due-date'}}
dd {{invoice.dueDate}}
if invoice.creditOfNumber
dt {{_ 'billing-credit-of'}}
dd {{invoice.creditOfNumber}}
if invoice.paymentReference
dt {{_ 'billing-payment-reference'}}
dd {{formattedReference}}
if invoice.reference
dt {{_ 'billing-reference'}}
dd {{invoice.reference}}
if invoice.periodStart
dt {{_ 'billing-period'}}
dd {{invoice.periodStart}} – {{invoice.periodEnd}}
dt {{_ 'billing-status'}}
dd {{statusLabel invoice.state invoice.kind}}
.billing-table-wrapper
table.billing-print-lines
thead
tr
th {{_ 'card'}}
th {{_ 'person'}}
th {{_ 'hours'}}
th {{_ 'billing-hourly-rate'}}
th {{_ 'billing-amount'}}
tbody
each line in invoice.lines
tr
td
| {{line.title}}
if line.firstDate
.billing-line-dates {{line.firstDate}} – {{line.lastDate}}
td {{line.name}}
if line.kind
td
td
else
td {{line.hours}}
td {{money line.rateMinor invoice.currency}}
td {{signedMoney invoice line.amountMinor}}
tfoot
tr
th(colspan="4") {{_ 'billing-net'}}
th {{signedMoney invoice invoice.netMinor}}
tr
th(colspan="4") {{_ 'billing-vat'}} {{invoice.vatPercent}} %
th {{signedMoney invoice invoice.vatMinor}}
tr
th(colspan="4") {{_ 'billing-total'}}
th {{signedMoney invoice invoice.totalMinor}}
if invoice.paidMinor
tr
th(colspan="4") {{_ 'billing-paid'}}
th {{money invoice.paidMinor invoice.currency}}
tr
th(colspan="4") {{_ 'billing-amount-due'}}
th {{money invoice.dueMinor invoice.currency}}
if invoice.reverseCharge
p {{_ 'billing-reverse-charge'}}
if invoice.notes
p.billing-print-notes {{invoice.notes}}
if isInvoice invoice
if invoice.instructions.length
h3 {{_ 'billing-payment-methods'}}
.billing-pay
each item in invoice.instructions
.billing-pay-method
strong {{methodTitle item}}
each l in item.lines
div {{l}}
if item.link
div
a(href=item.link target="_blank" rel="noopener noreferrer") {{item.link}}
if item.error
div.warning {{item.error}}
if item.qr
.billing-qr
| {{{qrSvg item}}}
small {{_ 'billing-pay-by-scanning'}}
if item.barcode
.billing-barcode
| {{{barcodeSvg item.barcode}}}
small {{item.barcode}}
unless $eq invoice.status 'draft'
.billing-payments.no-print
h3 {{_ 'billing-payments'}}
if invoice.payments.length
ul.billing-list
each payment in invoice.payments
li
| {{payment.date}} · {{money payment.amountMinor invoice.currency}}
if payment.method
| · {{payment.method}}
a.js-billing-remove-payment(data-id=payment.id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
if invoice.dueMinor
form.js-billing-payment
input(type="date" name="date" value=today aria-label="{{_ 'date'}}" required)
input(type="number" name="amount" min="0.01" step="0.01" value=dueAmount aria-label="{{_ 'billing-amount'}}" required)
input(type="text" name="method" maxlength="50" placeholder="{{_ 'billing-method'}}" aria-label="{{_ 'billing-method'}}")
button.primary(type="submit") {{_ 'billing-add-payment'}}
if invoice.profile.footer
p.billing-print-footer {{invoice.profile.footer}}
.no-print
button.js-billing-print-now(type="button")
i.fa.fa-print
| {{_ 'billing-print'}}
button.js-billing-print-close(type="button") {{_ 'close'}}
+555
View File
@@ -0,0 +1,555 @@
// Budget and billing page (docs/Features/Billing/Billing.md). It asks the
// server for the numbers (billingBoards / billingBoard, server/billing.js) and
// writes through the other billing* methods.
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import qrcode from 'qrcode-generator';
import { TAPi18n } from '/imports/i18n';
const { formatMoney, EXPENSE_CATEGORIES } = require('/models/lib/billing');
const { minorToText } = require('/models/lib/currencies');
const { PAYMENT_METHODS, code128CModules, formatReference, formatIban } = require('/models/lib/paymentCodes');
function t(key, options) {
return TAPi18n.__(key, options);
}
function errorText(error) {
return error ? (error.reason || error.message || String(error)) : '';
}
function language() {
try { return TAPi18n.getLanguage ? TAPi18n.getLanguage() : undefined; } catch (e) { return undefined; }
}
function money(minor, currency) {
return formatMoney(minor, currency, language());
}
const STATE_KEYS = {
draft: 'billing-status-draft', sent: 'billing-status-sent', paid: 'billing-status-paid', void: 'billing-status-void',
credited: 'billing-status-credited', partial: 'billing-status-partial', overdue: 'billing-status-overdue',
};
const NEXT = { draft: ['sent', 'void'], sent: ['paid', 'draft', 'void'], paid: [], void: [], credited: [] };
const ACTION_KEYS = { sent: 'billing-mark-sent', paid: 'billing-mark-paid', void: 'billing-void', draft: 'billing-back-to-draft' };
// A quote's statuses, and what each may become (models/lib/billing.js).
const QUOTE_STATE_KEYS = { draft: 'billing-status-draft', sent: 'billing-status-sent', accepted: 'billing-quote-accepted', declined: 'billing-quote-declined' };
const QUOTE_NEXT = { draft: ['sent', 'declined'], sent: ['accepted', 'declined', 'draft'], accepted: [], declined: [] };
const QUOTE_ACTION_KEYS = { sent: 'billing-mark-sent', accepted: 'accept', declined: 'decline', draft: 'billing-back-to-draft' };
const METHOD_KEYS = {
sepa: 'billing-method-sepa', 'fi-bank': 'billing-method-fi-bank', 'swiss-qr': 'billing-method-swiss-qr',
'bank-transfer': 'billing-method-bank-transfer', swish: 'billing-method-swish', pix: 'billing-method-pix',
upi: 'billing-method-upi', bitcoin: 'billing-method-bitcoin', paypal: 'billing-method-paypal', link: 'billing-method-link',
cash: 'billing-method-cash', cheque: 'billing-method-cheque', other: 'billing-method-other',
promptpay: 'billing-method-promptpay', paynow: 'billing-method-paynow', vietqr: 'billing-method-vietqr', fps: 'billing-method-fps',
spayd: 'billing-method-spayd', zbp: 'billing-method-zbp', mnb: 'billing-method-mnb', ips: 'billing-method-ips',
'dk-fik': 'billing-method-dk-fik', ethereum: 'billing-method-ethereum', litecoin: 'billing-method-litecoin',
};
const FIELD_KEYS = {
name: 'billing-field-name', iban: 'billing-field-iban', bic: 'billing-field-bic', street: 'billing-field-street',
building: 'billing-field-building', postcode: 'billing-field-postcode', town: 'billing-field-town', country: 'billing-country',
details: 'billing-field-details', payee: 'billing-field-payee', key: 'billing-field-pix-key', city: 'billing-field-town',
vpa: 'billing-field-vpa', address: 'billing-field-crypto-address', user: 'billing-field-paypal-user', label: 'billing-field-label',
url: 'billing-field-url', target: 'billing-field-promptpay-target', proxy: 'billing-field-proxy', bin: 'billing-field-bank-bin',
account: 'billing-field-account', nip: 'billing-field-nip', creditor: 'billing-field-creditor',
};
const PLACEHOLDERS = {
iban: 'FI21 1234 5600 0007 85', bic: 'NDEAFIHH', country: 'CH', url: '…?amount={amount}&reference={reference}', vpa: 'shop@bank',
target: '081 234 5678', proxy: '+65 9123 4567', bin: '970436', creditor: '12345678', nip: '5260250274',
};
// ---------------------------------------------------------------- codes as SVG
// The QR code of a payment, drawn from its matrix: the SVG carries modules
// only, never the payload's text.
function qrSvg(payload, swissCross) {
qrcode.stringToBytes = qrcode.stringToBytesFuncs['UTF-8'];
const qr = qrcode(0, 'M');
qr.addData(payload, 'Byte');
qr.make();
const n = qr.getModuleCount();
const m = 4;
let path = '';
for (let r = 0; r < n; r += 1) for (let c = 0; c < n; c += 1) if (qr.isDark(r, c)) path += `M${c + m} ${r + m}h1v1h-1z`;
const size = n + 2 * m;
let cross = '';
if (swissCross) {
const s = n * 7 / 46;
const x = m + n / 2 - s / 2;
cross = `<rect x="${x}" y="${x}" width="${s}" height="${s}" fill="#fff"/><rect x="${x + s * 0.06}" y="${x + s * 0.06}" width="${s * 0.88}" height="${s * 0.88}" fill="#000"/>`
+ `<rect x="${x + s * 0.4}" y="${x + s * 0.2}" width="${s * 0.2}" height="${s * 0.6}" fill="#fff"/><rect x="${x + s * 0.2}" y="${x + s * 0.4}" width="${s * 0.6}" height="${s * 0.2}" fill="#fff"/>`;
}
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${size} ${size}" width="160" height="160" shape-rendering="crispEdges" role="img">`
+ `<rect width="${size}" height="${size}" fill="#fff"/><path d="${path}" fill="#000"/>${cross}</svg>`;
}
// The Finnish bank barcode: digits only, as bars.
function barcodeSvg(digits) {
if (!/^\d{54}$/.test(String(digits))) return '';
const modules = code128CModules(digits, 10);
let path = '';
for (let i = 0; i < modules.length; i += 1) if (modules[i] === '1') path += `M${i} 0h1v40h-1z`;
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${modules.length} 40" width="100%" height="60" preserveAspectRatio="none" shape-rendering="crispEdges" role="img">`
+ `<rect width="${modules.length}" height="40" fill="#fff"/><path d="${path}" fill="#000"/></svg>`;
}
function download(name, mime, { text, base64 }) {
let blob;
if (base64) {
const bin = atob(base64);
const bytes = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; i += 1) bytes[i] = bin.charCodeAt(i);
blob = new Blob([bytes], { type: mime });
} else {
blob = new Blob([text], { type: mime });
}
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = name;
document.body.appendChild(a);
a.click();
a.remove();
setTimeout(() => URL.revokeObjectURL(url), 1000);
}
// ---------------------------------------------------------------- the page
Template.billing.onCreated(function () {
this.loading = new ReactiveVar(true);
this.error = new ReactiveVar('');
this.boards = new ReactiveVar([]);
this.isAdmin = new ReactiveVar(false);
this.allBoards = new ReactiveVar(false);
this.selected = new ReactiveVar(null);
this.detail = new ReactiveVar(null);
this.period = new ReactiveVar({ periodStart: '', periodEnd: '', includeUndated: false });
// The spinner of this load takes the board pane down with it, so a save
// refreshes through reload below, never through this.
this.loadBoards = () => {
this.loading.set(true);
return Meteor.callAsync('billingBoards', { allBoards: this.allBoards.get() })
.then(result => {
this.boards.set(result.boards);
this.isAdmin.set(result.isAdmin === true);
this.error.set('');
})
.catch(error => this.error.set(errorText(error)))
.finally(() => this.loading.set(false));
};
this.loadDetail = () => {
const boardId = this.selected.get();
if (!boardId) { this.detail.set(null); return Promise.resolve(); }
const p = this.period.get();
const period = {};
if (p.periodStart) period.periodStart = p.periodStart;
if (p.periodEnd) period.periodEnd = p.periodEnd;
if (p.includeUndated) period.includeUndated = true;
return Meteor.callAsync('billingBoard', boardId, period).then(detail => this.detail.set(detail))
.catch(error => this.error.set(errorText(error)));
};
// After a save only the open board is read again, and its row in the list
// takes the numbers from that answer: reading every board after each save
// ran into billingBoards' rate limit (server/billing.js) within a minute of
// filling in a few forms.
this.reload = () => this.loadDetail().then(() => {
const detail = this.detail.get();
if (!detail) return;
this.boards.set(this.boards.get().map(b => (b._id === detail.board._id
? { ...b, budget: detail.budget, finance: detail.finance } : b)));
});
this.loadBoards();
});
Template.billing.helpers({
loading: () => Template.instance().loading.get(),
error: () => Template.instance().error.get(),
boards: () => Template.instance().boards.get(),
isAdmin: () => Template.instance().isAdmin.get(),
allBoards: () => Template.instance().allBoards.get(),
selectedBoardId: () => Template.instance().selected.get(),
detail: () => Template.instance().detail.get(),
period: () => Template.instance().period.get(),
reload() {
const tpl = Template.instance();
return () => tpl.reload();
},
setPeriod() {
const tpl = Template.instance();
return period => { tpl.period.set(period); tpl.loadDetail(); };
},
money,
budgetLabel(board) {
const b = board.budget;
if (!b) return '—';
const parts = [];
if (typeof b.amountMinor === 'number') parts.push(money(b.amountMinor, b.currency));
if (typeof b.hours === 'number') parts.push(`${b.hours} ${t('workload-hours-short')}`);
return parts.join(' · ');
},
barWidth(percent) {
return Math.max(0, Math.min(100, Number(percent) || 0));
},
});
Template.billing.events({
'click .js-billing-board'(evt, tpl) {
evt.preventDefault();
tpl.selected.set(evt.currentTarget.getAttribute('data-id'));
tpl.loadDetail();
},
'change .js-billing-all-boards'(evt, tpl) {
tpl.allBoards.set(evt.currentTarget.checked === true);
tpl.loadBoards();
},
});
// ---------------------------------------------------------------- one board
Template.billingBoard.onCreated(function () {
this.printed = new ReactiveVar(null);
this.actionError = new ReactiveVar('');
this.methodType = new ReactiveVar('sepa');
this.done = promise => promise.then(result => {
this.actionError.set('');
// The instance's own data context: inside a promise there is no current
// template, and the current-data lookup is null there - which left the
// page unrefreshed after every save.
const { reload } = this.data || {};
if (typeof reload === 'function') reload();
return result;
}).catch(error => this.actionError.set(errorText(error)));
});
function detail() {
return Template.currentData().detail;
}
function methodTitle(type) {
return t(METHOD_KEYS[type] || type);
}
function signedMoney(invoice, minor) {
return money(invoice.kind === 'credit' ? -minor : minor, invoice.currency);
}
function stateLabel(state, kind) {
if (kind === 'quote') return t(QUOTE_STATE_KEYS[state] || state);
return t(STATE_KEYS[state] || state);
}
Template.billingBoard.helpers({
money,
signedMoney,
hours: value => `${Math.round((Number(value) || 0) * 100) / 100} ${t('workload-hours-short')}`,
hasBudget: () => !!detail().budget,
budgetAmount() {
const b = detail().budget;
return b && typeof b.amountMinor === 'number' ? minorToText(b.amountMinor, b.currency) : '';
},
budgetCurrency() {
const d = detail();
return (d.budget && d.budget.currency) || d.finance.currency || '';
},
draftTotal() {
const d = detail();
return d.draft ? money(d.draft.netMinor, d.draft.currency) : '';
},
cannotInvoice() {
const d = detail();
return !(d.draft && d.draft.lines.length);
},
today: () => new Date().toISOString().slice(0, 10),
referenceTypes: () => [
{ value: 'rf', label: t('billing-reference-rf') }, { value: 'fi', label: t('billing-reference-fi') },
{ value: 'be', label: t('billing-reference-be') }, { value: 'no', label: t('billing-reference-no') },
{ value: 'se', label: t('billing-reference-se') }, { value: 'none', label: t('billing-reference-none') },
],
methodTypes: () => Object.keys(PAYMENT_METHODS).map(value => ({ value, label: methodTitle(value) })),
methodType: () => Template.instance().methodType.get(),
methodFields() {
const spec = PAYMENT_METHODS[Template.instance().methodType.get()];
return (spec ? spec.fields : []).map(name => ({ name, label: t(FIELD_KEYS[name] || name), placeholder: PLACEHOLDERS[name] || '' }));
},
paymentMethods() {
return (detail().profile.paymentMethods || []).map((m, index) => ({
index, title: m.label || methodTitle(m.type),
summary: m.iban ? formatIban(m.iban) : (m.payee || m.key || m.vpa || m.address || m.user || m.url || m.details || ''),
}));
},
statusLabel: state => t(STATE_KEYS[state] || state),
nextStatuses: invoice => (invoice.kind === 'credit' ? [] : (NEXT[invoice.status] || [])).map(value => ({ value, label: t(ACTION_KEYS[value]) })),
canCredit: invoice => invoice.kind !== 'credit' && ['sent', 'paid'].includes(invoice.status),
fileFormats: () => [
{ value: 'pdf', label: 'PDF', icon: 'fa-file-pdf-o' }, { value: 'svg', label: 'SVG', icon: 'fa-file-image-o' },
{ value: 'xlsx', label: 'Excel', icon: 'fa-file-excel-o' },
{ value: 'csv', label: 'CSV', icon: 'fa-file-text-o' }, { value: 'ubl', label: t('billing-e-invoice'), icon: 'fa-file-code-o' },
],
printed: () => Template.instance().printed.get(),
// The parent's reload, handed on by a helper: written `reload=reload`,
// Spacebars would call the function it finds in this data context instead
// of passing it on.
reloadFn: () => Template.currentData().reload,
setPrinted() {
const tpl = Template.instance();
return invoice => tpl.printed.set(invoice);
},
actionError: () => Template.instance().actionError.get(),
isNegative: value => typeof value === 'number' && value < 0,
isNumber: value => typeof value === 'number',
billsTime: () => detail().profile.billTime !== false,
quoteValidDays: () => detail().profile.quoteValidDays || 30,
expenseCategories: () => EXPENSE_CATEGORIES.map(value => ({ value, label: t(`billing-expense-${value}`) })),
expenseCategory: value => t(`billing-expense-${value}`),
lineKind: line => line.kind || 'time',
lineKindLabel: line => t(line.kind === 'fee' ? 'billing-line-fee' : 'billing-line-expense'),
quoteStatusLabel: status => stateLabel(status, 'quote'),
nextQuoteStatuses: quote => (QUOTE_NEXT[quote.status] || []).map(value => ({ value, label: t(QUOTE_ACTION_KEYS[value]) })),
quoteFormats: () => [
{ value: 'pdf', label: 'PDF', icon: 'fa-file-pdf-o' }, { value: 'svg', label: 'SVG', icon: 'fa-file-image-o' },
{ value: 'xlsx', label: 'Excel', icon: 'fa-file-excel-o' }, { value: 'csv', label: 'CSV', icon: 'fa-file-text-o' },
],
});
function field(form, name) {
const el = form.elements[name];
return el ? String(el.value).trim() : '';
}
function numberOrUndefined(value) {
return value === '' ? undefined : parseFloat(value);
}
function saveProfile(tpl, changes) {
const current = detail().profile || {};
return tpl.done(Meteor.callAsync('billingSetProfile', detail().board._id, { ...current, ...changes }));
}
function openQuote(tpl, id) {
return Meteor.callAsync('billingQuote', id)
.then(quote => tpl.printed.set(quote))
.catch(error => tpl.actionError.set(errorText(error)));
}
function openInvoice(tpl, id) {
return Meteor.callAsync('billingInvoice', id)
.then(invoice => tpl.printed.set(invoice))
.catch(error => tpl.actionError.set(errorText(error)));
}
Template.billingBoard.events({
'submit .js-billing-budget'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const budget = {
amount: numberOrUndefined(field(form, 'amount')),
currency: field(form, 'currency') || undefined,
hours: numberOrUndefined(field(form, 'hours')),
start: field(form, 'start') || undefined,
end: field(form, 'end') || undefined,
};
for (const key of Object.keys(budget)) if (budget[key] === undefined) delete budget[key];
tpl.done(Meteor.callAsync('billingSetBudget', detail().board._id, budget));
},
'click .js-billing-remove-budget'(evt, tpl) {
evt.preventDefault();
tpl.done(Meteor.callAsync('billingSetBudget', detail().board._id, null));
},
'submit .js-billing-rate'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const rate = { hourlyRate: parseFloat(field(form, 'hourlyRate')), currency: field(form, 'currency') };
if (field(form, 'userId')) rate.userId = field(form, 'userId');
if (field(form, 'costRate')) rate.costRate = parseFloat(field(form, 'costRate'));
tpl.done(Meteor.callAsync('billingSetRate', detail().board._id, rate).then(() => form.reset()));
},
'click .js-billing-remove-rate'(evt, tpl) {
evt.preventDefault();
tpl.done(Meteor.callAsync('billingRemoveRate', evt.currentTarget.getAttribute('data-id')));
},
'submit .js-billing-profile'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const changes = {};
for (const name of ['issuerName', 'issuerAddress', 'issuerCountry', 'businessId', 'vatId', 'email', 'phone', 'website', 'referenceType', 'footer',
'customer', 'customerCountry', 'customerVatId']) {
changes[name] = field(form, name);
}
changes.vatPercent = numberOrUndefined(field(form, 'vatPercent')) || 0;
changes.paymentTermsDays = parseInt(field(form, 'paymentTermsDays'), 10);
if (!Number.isInteger(changes.paymentTermsDays)) changes.paymentTermsDays = 14;
changes.penaltyInterestPercent = numberOrUndefined(field(form, 'penaltyInterestPercent')) || 0;
changes.reverseCharge = form.elements.reverseCharge.checked === true;
changes.billTime = form.elements.billTime.checked === true;
changes.approveTime = form.elements.approveTime.checked === true;
changes.quoteValidDays = parseInt(field(form, 'quoteValidDays'), 10);
if (!Number.isInteger(changes.quoteValidDays)) changes.quoteValidDays = 30;
saveProfile(tpl, changes);
},
'submit .js-billing-expense'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const expense = { date: field(form, 'date'), amount: parseFloat(field(form, 'amount')), currency: field(form, 'currency'),
category: field(form, 'category'), description: field(form, 'description'), billable: form.elements.billable.checked === true };
if (field(form, 'markupPercent')) expense.markupPercent = parseFloat(field(form, 'markupPercent'));
for (const name of ['cardId', 'userId']) if (field(form, name)) expense[name] = field(form, name);
tpl.done(Meteor.callAsync('billingAddExpense', detail().board._id, expense).then(() => form.reset()));
},
'click .js-billing-remove-expense'(evt, tpl) {
evt.preventDefault();
tpl.done(Meteor.callAsync('billingRemoveExpense', evt.currentTarget.getAttribute('data-id')));
},
'submit .js-billing-fee'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const fee = { title: field(form, 'title'), amount: parseFloat(field(form, 'amount')), currency: field(form, 'currency'),
date: field(form, 'date'), recurring: field(form, 'recurring') };
if (fee.recurring === 'monthly' && field(form, 'end')) fee.end = field(form, 'end');
tpl.done(Meteor.callAsync('billingAddFee', detail().board._id, fee).then(() => form.reset()));
},
'click .js-billing-remove-fee'(evt, tpl) {
evt.preventDefault();
tpl.done(Meteor.callAsync('billingRemoveFee', evt.currentTarget.getAttribute('data-id')));
},
'click .js-billing-decide'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget.closest('form');
const entryIds = [...form.querySelectorAll('input[name=entry]:checked')].map(el => el.value);
if (!entryIds.length) return;
const approval = { entryIds, decision: evt.currentTarget.getAttribute('data-decision') };
if (field(form, 'note')) approval.note = field(form, 'note');
tpl.done(Meteor.callAsync('billingApproveTime', detail().board._id, approval));
},
'submit .js-billing-quote'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const request = {};
for (const name of ['customer', 'issueDate', 'validUntil', 'notes']) if (field(form, name)) request[name] = field(form, name);
tpl.done(Meteor.callAsync('billingCreateQuote', detail().board._id, request).then(id => { form.reset(); return openQuote(tpl, id); }));
},
'click .js-billing-quote-status'(evt, tpl) {
evt.preventDefault();
const el = evt.currentTarget;
const status = el.getAttribute('data-status');
const box = tpl.find('.js-billing-accept-budget');
const options = status === 'accepted' && box && box.checked ? { setBudget: true } : undefined;
tpl.done(Meteor.callAsync('billingSetQuoteStatus', el.getAttribute('data-id'), status, options));
},
'click .js-billing-quote-open'(evt, tpl) {
evt.preventDefault();
openQuote(tpl, evt.currentTarget.getAttribute('data-id'));
},
'click .js-billing-quote-file'(evt, tpl) {
evt.preventDefault();
const el = evt.currentTarget;
Meteor.callAsync('billingQuoteFile', el.getAttribute('data-id'), el.getAttribute('data-format'))
.then(file => download(file.name, file.mime, file))
.catch(error => tpl.actionError.set(errorText(error)));
},
'change .js-billing-method-type'(evt, tpl) {
tpl.methodType.set(evt.currentTarget.value);
},
'submit .js-billing-method'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const type = field(form, 'type');
const method = { type };
for (const name of PAYMENT_METHODS[type].fields) method[name] = field(form, name);
const methods = [...(detail().profile.paymentMethods || []), method];
saveProfile(tpl, { paymentMethods: methods }).then(() => form.reset());
},
'click .js-billing-remove-method'(evt, tpl) {
evt.preventDefault();
const index = parseInt(evt.currentTarget.getAttribute('data-index'), 10);
saveProfile(tpl, { paymentMethods: (detail().profile.paymentMethods || []).filter((m, i) => i !== index) });
},
'change .js-billing-period'(evt) {
const form = evt.currentTarget;
const { setPeriod } = Template.currentData();
setPeriod({ periodStart: field(form, 'periodStart'), periodEnd: field(form, 'periodEnd'), includeUndated: form.elements.includeUndated.checked === true });
},
'submit .js-billing-invoice'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const request = {};
for (const name of ['customer', 'customerCountry', 'customerVatId', 'reference', 'notes', 'issueDate', 'dueDate']) {
if (field(form, name)) request[name] = field(form, name);
}
if (field(form, 'vatPercent')) request.vatPercent = parseFloat(field(form, 'vatPercent'));
const p = Template.currentData().period || {};
if (p.periodStart) request.periodStart = p.periodStart;
if (p.periodEnd) request.periodEnd = p.periodEnd;
if (p.includeUndated) request.includeUndated = true;
tpl.done(Meteor.callAsync('billingCreateInvoice', detail().board._id, request).then(id => { form.reset(); return openInvoice(tpl, id); }));
},
'click .js-billing-status'(evt, tpl) {
evt.preventDefault();
const el = evt.currentTarget;
tpl.done(Meteor.callAsync('billingSetInvoiceStatus', el.getAttribute('data-id'), el.getAttribute('data-status')));
},
'click .js-billing-credit'(evt, tpl) {
evt.preventDefault();
tpl.done(Meteor.callAsync('billingCreditInvoice', evt.currentTarget.getAttribute('data-id'), {}).then(id => openInvoice(tpl, id)));
},
'click .js-billing-open'(evt, tpl) {
evt.preventDefault();
openInvoice(tpl, evt.currentTarget.getAttribute('data-id'));
},
'click .js-billing-file'(evt, tpl) {
evt.preventDefault();
const el = evt.currentTarget;
Meteor.callAsync('billingInvoiceFile', el.getAttribute('data-id'), el.getAttribute('data-format'))
.then(file => download(file.name, file.mime, file))
.catch(error => tpl.actionError.set(errorText(error)));
},
});
// ---------------------------------------------------------------- the invoice
Template.billingInvoicePrint.helpers({
money,
signedMoney,
statusLabel: (state, kind) => stateLabel(state, typeof kind === 'string' ? kind : ''),
isInvoice: invoice => (invoice.kind || 'invoice') === 'invoice',
methodTitle: item => item.label || methodTitle(item.type),
formattedReference() {
return formatReference(Template.currentData().invoice.paymentReference);
},
qrSvg: item => qrSvg(item.qr, item.swissCross),
barcodeSvg,
today: () => new Date().toISOString().slice(0, 10),
dueAmount() {
const inv = Template.currentData().invoice;
return minorToText(inv.dueMinor, inv.currency);
},
});
// The board template keeps the open invoice; it hands down setPrinted.
function reloadInvoice() {
const data = Template.currentData();
if (typeof data.reload === 'function') data.reload();
return Meteor.callAsync('billingInvoice', data.invoice._id).then(invoice => data.setPrinted(invoice));
}
Template.billingInvoicePrint.events({
'submit .js-billing-payment'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const payment = { date: form.elements.date.value, amount: parseFloat(form.elements.amount.value) };
if (form.elements.method.value.trim()) payment.method = form.elements.method.value.trim();
Meteor.callAsync('billingAddPayment', Template.currentData().invoice._id, payment).then(() => reloadInvoice())
.catch(error => { form.querySelector('[name=amount]').setCustomValidity(errorText(error)); form.reportValidity(); });
},
'click .js-billing-remove-payment'(evt, tpl) {
evt.preventDefault();
Meteor.callAsync('billingRemovePayment', Template.currentData().invoice._id, evt.currentTarget.getAttribute('data-id')).then(() => reloadInvoice());
},
'click .js-billing-print-now'(evt) {
evt.preventDefault();
window.print();
},
'click .js-billing-print-close'(evt) {
evt.preventDefault();
Template.currentData().setPrinted(null);
},
});
+5 -2
View File
@@ -1409,12 +1409,15 @@ body.mobile-mode .pop-over .content-wrapper {
@media screen and (min-width: 801px) {
.pop-over.pop-over--menu-columns {
position: fixed;
width: min(960px, calc(100vw - 24px)) !important;
/* 1200px: four 240px columns on a 1280px screen. At 960px the Board View
menu, grouped under headings, needed a fourth column's worth of height
and ran below a 720px-high window (popup-menu-columns.e2e.js). */
width: min(1200px, calc(100vw - 24px)) !important;
max-width: calc(100vw - 24px) !important;
/* Logical, so RTL mirrors it; the value is symmetric, so both centre.
inset-inline-end: auto is `right` in LTR and `left` in RTL, so it also
overrides the inline left the popup placement code sets. */
inset-inline-start: max(12px, calc((100vw - 960px) / 2)) !important;
inset-inline-start: max(12px, calc((100vw - 1200px) / 2)) !important;
inset-inline-end: auto !important;
top: 12px !important;
margin-top: 0;
+206
View File
@@ -0,0 +1,206 @@
/* Workload page (docs/Features/Workload/Workload.md). */
.workload-page {
padding: 1rem;
max-width: 100%;
box-sizing: border-box;
}
.workload-intro {
max-width: 70ch;
opacity: 0.85;
}
.workload-controls {
display: flex;
flex-wrap: wrap;
gap: 0.4rem 0.8rem;
align-items: center;
}
.workload-controls input,
.workload-controls select {
width: auto;
margin: 0;
}
.workload-legend {
display: flex;
flex-wrap: wrap;
gap: 0.3rem 1rem;
align-items: center;
margin: 0.5rem 0 1rem;
}
.workload-swatch {
display: inline-block;
width: 1rem;
height: 0.6rem;
border-radius: 2px;
margin-inline-end: 0.3rem;
vertical-align: middle;
}
/* The three states, the colours also used by the bars below. Over 100 % is
red; under half full is grey-blue; in between green. */
.workload-swatch.is-ok,
.workload-cell.is-ok .workload-bar-fill { background: #3cb500; }
.workload-swatch.is-under,
.workload-cell.is-under .workload-bar-fill { background: #8ea6c0; }
.workload-swatch.is-over,
.workload-cell.is-over .workload-bar-fill { background: #e53935; }
.workload-table-wrapper {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.workload-table {
border-collapse: collapse;
min-width: 100%;
}
.workload-table th,
.workload-table td {
border: 1px solid rgba(0, 0, 0, 0.12);
padding: 0.35rem 0.45rem;
vertical-align: top;
text-align: start;
}
.workload-week-header span {
display: block;
white-space: nowrap;
}
.workload-week-date {
font-weight: normal;
font-size: 0.85em;
opacity: 0.75;
}
.workload-person {
min-width: 10rem;
}
.workload-person-name {
display: block;
}
.workload-person-capacity {
display: block;
font-weight: normal;
font-size: 0.8em;
opacity: 0.75;
}
.workload-cell {
min-width: 7rem;
}
.workload-cell a {
display: block;
color: inherit;
text-decoration: none;
cursor: pointer;
}
.workload-cell.is-over {
background: rgba(229, 57, 53, 0.1);
}
.workload-bar {
height: 0.5rem;
background: rgba(0, 0, 0, 0.08);
border-radius: 3px;
overflow: hidden;
margin-bottom: 0.2rem;
}
.workload-bar-fill {
height: 100%;
}
.workload-cell-value,
.workload-cell-percent,
.workload-cell-allocation,
.workload-cell-absent,
.workload-cell-holiday {
display: block;
font-size: 0.85em;
white-space: nowrap;
}
.workload-cell.is-over .workload-cell-percent {
color: #c62828;
font-weight: bold;
}
.workload-cell.is-placeholder {
background: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03) 6px, transparent 6px, transparent 12px);
}
.workload-unassigned th,
.workload-placeholder th {
font-style: italic;
}
.workload-overdue { color: #c62828; }
.workload-card-list {
margin: 0;
padding-inline-start: 1.2rem;
}
.workload-card-hours {
margin-inline-start: 0.5rem;
opacity: 0.75;
}
.workload-planning {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
gap: 1rem;
margin-top: 1.5rem;
}
.workload-section {
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 4px;
padding: 0.75rem;
}
.workload-section h2 {
margin-top: 0;
font-size: 1.1rem;
}
.workload-section label {
display: block;
margin-top: 0.4rem;
}
.workload-days {
border: none;
padding: 0;
margin: 0.5rem 0;
}
.workload-days label {
display: inline-block;
margin-inline-end: 0.6rem;
}
.workload-list {
padding-inline-start: 1.2rem;
}
.workload-list a {
margin-inline-start: 0.5rem;
cursor: pointer;
}
.workload-saved {
margin-inline-start: 0.5rem;
color: #2e7d32;
}
@media screen and (max-width: 800px) {
.workload-page { padding: 0.5rem; }
.workload-person { min-width: 7rem; }
.workload-cell { min-width: 5.5rem; }
}
/* Utilization and skills (docs/Features/Workload/Workload.md). */
.workload-person-utilization,
.workload-placeholder-skill,
.workload-candidates {
display: block;
font-size: 0.8em;
color: #555;
}
.workload-person-utilization.is-below {
color: #b71c1c;
}
/* Labelled native checkboxes: the app-wide material form rule
(client/components/forms/forms.css) hides native checkboxes three ways -
display, visibility, an offset - which left these with a label and no box
to tick or see ticked. All three are undone, as in cardFlow.css. */
.workload-page input[type="checkbox"] {
display: inline-block;
visibility: visible;
position: static;
inset-inline-start: auto;
width: 16px;
height: 16px;
min-height: 0;
margin: 0;
margin-inline-end: 4px;
flex: none;
}
+254
View File
@@ -0,0 +1,254 @@
//- Workload (docs/Features/Workload/Workload.md): week by week, how much work
the people of the viewer's boards have against the hours they have, with
their absences, the public holidays, allocations to boards and the roles a
board will need before anybody is named. The numbers come from the server
(server/workload.js, models/lib/workload.js); this page only draws them.
template(name="workloadControls")
//- The controls of this page, a view of the shared page sidebar
(models/lib/pageSidebar.js), like the Due Cards controls.
.workload-controls
label(for="workload-from") {{_ 'workload-from'}}
input.js-workload-from#workload-from(type="date" value=fromDay)
label(for="workload-weeks") {{_ 'workload-weeks'}}
select.js-workload-weeks#workload-weeks
each weekChoice in weekChoices
option(value=weekChoice selected="{{#if $eq weekChoice weeks}}selected{{/if}}") {{weekChoice}}
label(for="workload-unit") {{_ 'workload-show'}}
select.js-workload-unit#workload-unit
option(value="hours" selected="{{#if $eq unit 'hours'}}selected{{/if}}") {{_ 'hours'}}
option(value="points" selected="{{#if $eq unit 'points'}}selected{{/if}}") {{_ 'workload-story-points'}}
if reportIsAdmin
label.workload-all-boards
input.js-workload-all-boards(type="checkbox" checked=allBoards)
| {{_ 'workload-all-boards'}}
template(name="workload")
if currentUser
.workload-page
h1 {{_ 'workload-title'}}
p.workload-intro {{_ 'workload-intro'}}
if loading
+spinner
else if error
.warning {{error}}
else
if truncated
p.warning {{_ 'workload-truncated'}}
.workload-legend
span.workload-swatch.is-ok
| {{_ 'workload-legend-ok'}}
span.workload-swatch.is-under
| {{_ 'workload-legend-under'}}
span.workload-swatch.is-over
| {{_ 'workload-legend-over'}}
.workload-table-wrapper
table.workload-table
thead
tr
th {{_ 'person'}}
each week in weekHeaders
th.workload-week-header
span.workload-week-number {{_ 'workload-week-short' number=week.number}}
span.workload-week-date {{week.label}}
th {{_ 'workload-unscheduled'}}
tbody
each person in people
tr.workload-row
th.workload-person(scope="row")
span.workload-person-name {{person.name}}
span.workload-person-capacity {{capacityLabel person}}
span.workload-person-utilization(class="{{#if person.belowTarget}}is-below{{/if}}" title="{{_ 'workload-utilization-title'}}")
| {{_ 'workload-utilization' percent=(utilizationPercent person) hours=person.billableHours}}
if isNumber person.capacity.utilizationTarget
| / {{person.capacity.utilizationTarget}} %
each cell in cells person
td.workload-cell(class="{{cell.state}}")
a.js-workload-cell(data-user=person.userId data-week=cell.index title=cell.title)
.workload-bar
.workload-bar-fill(style="width: {{cell.barWidth}}%")
span.workload-cell-value {{cell.value}}
if cell.percentLabel
span.workload-cell-percent {{cell.percentLabel}}
if cell.allocationPercent
span.workload-cell-allocation(title="{{_ 'workload-allocated'}}")
i.fa.fa-thumb-tack
| {{cell.allocationPercent}} %
if cell.absentDays
span.workload-cell-absent(title="{{_ 'workload-absent-days'}}")
i.fa.fa-plane
| {{cell.absentDays}}
if cell.holidayDays
span.workload-cell-holiday(title="{{_ 'workload-holiday-days'}}")
i.fa.fa-flag
| {{cell.holidayDays}}
td.workload-unscheduled-cell
if person.unscheduledHours
span {{hoursLabel person.unscheduledHours}}
if person.unestimatedCards
span.workload-unestimated(title="{{_ 'workload-unestimated'}}")
i.fa.fa-question-circle
| {{person.unestimatedCards}}
if person.overdueCards
span.workload-overdue(title="{{_ 'filter-overdue'}}")
i.fa.fa-exclamation-triangle
| {{person.overdueCards}}
if isOpen person.userId
tr.workload-details-row
td(colspan=columnCount)
+workloadCellCards(cards=openCards)
if hasUnassigned
tr.workload-row.workload-unassigned
th(scope="row") {{_ 'workload-unassigned'}}
each cell in unassignedCells
td.workload-cell
span.workload-cell-value {{cell.value}}
td.workload-unscheduled-cell
if unassignedUnscheduled
span {{unassignedUnscheduled}}
each holder in placeholders
tr.workload-row.workload-placeholder
th(scope="row")
span.workload-person-name
i.fa.fa-user-o
| {{holder.roleName}} × {{holder.headcount}}
span.workload-person-capacity {{holder.boardTitle}}
if holder.skill
span.workload-placeholder-skill
i.fa.fa-graduation-cap
| {{holder.skill}} ≥ {{holder.skillLevel}}
if holder.candidates.length
span.workload-candidates {{_ 'workload-candidates'}}: {{candidatesLabel holder}}
else
span.workload-candidates {{_ 'workload-no-candidates'}}
each week in holder.weeks
td.workload-cell.is-placeholder
if week.allocationPercent
span.workload-cell-value {{hoursLabel week.demandHours}}
span.workload-cell-percent {{week.allocationPercent}} %
td
+workloadPlanning(report=report)
template(name="workloadCellCards")
if cards.length
ul.workload-card-list
each card in cards
li
a(href=card.url) {{card.title}}
span.workload-card-hours {{card.label}}
if card.overdue
span.workload-overdue
i.fa.fa-exclamation-triangle
else
p {{_ 'workload-no-cards'}}
template(name="workloadPlanning")
.workload-planning
section.workload-section
h2 {{_ 'workload-my-capacity'}}
form.js-workload-capacity
label(for="workload-hours") {{_ 'workload-hours-per-week'}}
input#workload-hours(type="number" name="hoursPerWeek" min="0" max="168" step="0.5" value=capacity.hoursPerWeek)
label(for="workload-percent") {{_ 'workload-work-percent'}}
input#workload-percent(type="number" name="workPercent" min="0" max="100" step="1" value=capacity.workPercent)
fieldset.workload-days
legend {{_ 'workload-working-days'}}
each day in weekdays
label
input(type="checkbox" name="workingDays" value=day.value checked=day.checked)
| {{day.label}}
label(for="workload-skills") {{_ 'workload-skills'}}
input#workload-skills(type="text" name="skills" maxlength="2000" value=skillsText placeholder="{{_ 'workload-skills-example'}}")
label(for="workload-target") {{_ 'workload-utilization-target'}} %
input#workload-target(type="number" name="utilizationTarget" min="0" max="100" step="1" value=capacity.utilizationTarget)
button.primary(type="submit") {{_ 'save'}}
if capacitySaved
span.workload-saved {{_ 'feature-saved'}}
section.workload-section
h2 {{_ 'workload-my-absences'}}
if myAbsences.length
ul.workload-list
each absence in myAbsences
li
| {{absence.start}} – {{absence.end}} · {{absenceTypeLabel absence.type}}
if absence.note
| · {{absence.note}}
a.js-workload-remove-absence(data-id=absence._id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
form.js-workload-absence
label(for="workload-absence-start") {{_ 'start'}}
input#workload-absence-start(type="date" name="start" required)
label(for="workload-absence-end") {{_ 'card-end'}}
input#workload-absence-end(type="date" name="end" required)
label(for="workload-absence-type") {{_ 'workload-absence-type'}}
select#workload-absence-type(name="type")
each type in absenceTypes
option(value=type.value) {{type.label}}
label(for="workload-absence-note") {{_ 'workload-note'}}
input#workload-absence-note(type="text" name="note" maxlength="200")
button.primary(type="submit") {{_ 'workload-add-absence'}}
if managedBoards.length
section.workload-section
h2 {{_ 'workload-allocations'}}
p {{_ 'workload-allocations-intro'}}
if allocations.length
ul.workload-list
each allocation in allocations
li
| {{allocation.boardTitle}} · {{allocationWho allocation}} · {{allocation.percent}} % · {{allocation.start}} – {{allocation.end}}
if allocation.mayRemove
a.js-workload-remove-allocation(data-id=allocation._id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
form.js-workload-allocation
label(for="workload-allocation-board") {{_ 'board'}}
select#workload-allocation-board.js-workload-allocation-board(name="boardId")
each board in managedBoards
option(value=board._id) {{board.title}}
label(for="workload-allocation-person") {{_ 'person'}}
select#workload-allocation-person(name="userId")
option(value="") {{_ 'workload-role-placeholder'}}
each member in allocationMembers
option(value=member.userId) {{member.name}}
label(for="workload-allocation-role") {{_ 'workload-role'}}
input#workload-allocation-role(type="text" name="roleName" maxlength="100" placeholder="{{_ 'workload-role-example'}}")
label(for="workload-allocation-headcount") {{_ 'workload-headcount'}}
input#workload-allocation-headcount(type="number" name="headcount" min="1" max="100" value="1")
label(for="workload-allocation-skill") {{_ 'workload-skill'}}
input#workload-allocation-skill(type="text" name="skill" maxlength="50")
label(for="workload-allocation-level") {{_ 'workload-skill-level'}}
input#workload-allocation-level(type="number" name="skillLevel" min="1" max="5" value="1")
label(for="workload-allocation-percent") {{_ 'workload-allocation-percent'}}
input#workload-allocation-percent(type="number" name="percent" min="1" max="100" value="50" required)
label(for="workload-allocation-start") {{_ 'start'}}
input#workload-allocation-start(type="date" name="start" required)
label(for="workload-allocation-end") {{_ 'card-end'}}
input#workload-allocation-end(type="date" name="end" required)
button.primary(type="submit") {{_ 'workload-add-allocation'}}
section.workload-section
h2 {{_ 'workload-holidays'}}
if holidays.length
ul.workload-list
each holiday in holidays
li
| {{holiday.date}}
if holiday.name
| · {{holiday.name}}
if isAdmin
a.js-workload-remove-holiday(data-id=holiday._id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
else
p {{_ 'workload-no-holidays'}}
if isAdmin
form.js-workload-holiday
label(for="workload-holiday-date") {{_ 'date'}}
input#workload-holiday-date(type="date" name="date" required)
label(for="workload-holiday-name") {{_ 'workload-holiday-name'}}
input#workload-holiday-name(type="text" name="name" maxlength="100")
button.primary(type="submit") {{_ 'workload-add-holiday'}}
if planningError
.warning {{planningError}}
+336
View File
@@ -0,0 +1,336 @@
// Workload page (docs/Features/Workload/Workload.md). It asks the server for a
// report (Meteor method workloadReport, server/workload.js) and draws it; the
// planning forms below the table write through the other workload* methods.
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import { ReactiveDict } from 'meteor/reactive-dict';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { TAPi18n } from '/imports/i18n';
const { workloadCell, hoursLabel, isoWeekNumber } = require('/models/lib/workloadView');
const { weekStart, dayKey, ABSENCE_TYPES, parseSkills, skillsText } = require('/models/lib/workload');
// The page state, shared by the sidebar controls and the page itself.
const state = new ReactiveDict('workload');
state.setDefault({
from: weekStart(dayKey(new Date())),
weeks: 8,
unit: 'hours',
allBoards: false,
reloadAt: 0,
});
const WEEK_CHOICES = [4, 8, 12, 26];
function t(key, options) {
return TAPi18n.__(key, options);
}
function errorText(error) {
if (!error) return '';
return (error.reason || error.message || String(error));
}
function reload() {
state.set('reloadAt', Date.now());
}
Template.workloadControls.helpers({
fromDay: () => state.get('from'),
weeks: () => state.get('weeks'),
weekChoices: () => WEEK_CHOICES,
unit: () => state.get('unit'),
allBoards: () => state.get('allBoards'),
reportIsAdmin: () => state.get('isAdmin') === true,
});
Template.workloadControls.events({
'change .js-workload-from'(evt) {
const value = evt.currentTarget.value;
if (/^\d{4}-\d\d-\d\d$/.test(value)) state.set('from', weekStart(value));
},
'change .js-workload-weeks'(evt) {
const value = parseInt(evt.currentTarget.value, 10);
if (WEEK_CHOICES.includes(value)) state.set('weeks', value);
},
'change .js-workload-unit'(evt) {
state.set('unit', evt.currentTarget.value === 'points' ? 'points' : 'hours');
},
'change .js-workload-all-boards'(evt) {
state.set('allBoards', evt.currentTarget.checked === true);
},
});
Template.workload.onCreated(function () {
this.report = new ReactiveVar(null);
this.loading = new ReactiveVar(true);
this.error = new ReactiveVar('');
this.open = new ReactiveVar(null); // { userId, week }
this.autorun(() => {
const params = {
from: state.get('from'),
weeks: state.get('weeks'),
allBoards: state.get('allBoards') === true,
};
state.get('reloadAt');
this.loading.set(true);
Meteor.callAsync('workloadReport', params).then(report => {
this.report.set(report);
state.set('isAdmin', report && report.isAdmin === true);
this.error.set('');
}).catch(error => {
this.error.set(errorText(error));
}).finally(() => this.loading.set(false));
});
});
function report() {
return Template.instance().report.get();
}
function boardOf(boardId) {
const r = report();
return (r && r.boards || []).find(b => b._id === boardId);
}
function cardUrl(card) {
const board = boardOf(card.boardId);
return FlowRouter.path('card', { boardId: card.boardId, slug: (board && board.slug) || 'board', cardId: card.cardId });
}
Template.workload.helpers({
// The spinner only until the first report: a refresh after a save keeps the
// page, because the spinner replaces the planning form under it - which
// lost its "saved" note and anything still typed there.
loading() {
const tpl = Template.instance();
return tpl.loading.get() && !tpl.report.get();
},
error: () => Template.instance().error.get(),
report: () => report(),
truncated: () => !!(report() && report().truncated),
people: () => (report() ? report().people : []),
placeholders() {
const r = report();
if (!r) return [];
return r.placeholders.map(p => ({ ...p, boardTitle: (boardOf(p.boardId) || {}).title || '' }));
},
weekHeaders() {
const r = report();
if (!r) return [];
return r.weeks.map(day => ({ number: isoWeekNumber(day), label: day.slice(5).split('-').reverse().join('.') }));
},
columnCount() {
const r = report();
return r ? r.weeks.length + 2 : 2;
},
isNumber: value => typeof value === 'number',
utilizationPercent: person => (typeof person.billablePercent === 'number' ? person.billablePercent : 0),
candidatesLabel(holder) {
const r = report();
const names = new Map((r ? r.people : []).map(p => [p.userId, p.name || p.username || p.userId]));
return holder.candidates.map(c => `${names.get(c.userId) || c.userId} (${c.level}, ${hoursLabel(c.freeHours, t('workload-hours-short'))})`).join(', ');
},
capacityLabel(person) {
const c = person.capacity;
return t('workload-capacity-label', { hours: c.hoursPerWeek, percent: c.workPercent });
},
hoursLabel(hours) {
return hoursLabel(hours, t('workload-hours-short'));
},
cells(person) {
const unit = state.get('unit');
const words = { hours: t('workload-hours-short'), points: t('workload-points-short') };
return person.weeks.map((week, index) => {
const cell = workloadCell(week, unit, words);
const parts = [cell.value];
if (cell.percentLabel) parts.push(cell.percentLabel);
if (week.overloaded) parts.push(t('workload-overloaded'));
return { ...cell, index, title: parts.join(' · ') };
});
},
isOpen(userId) {
const open = Template.instance().open.get();
return !!(open && open.userId === userId);
},
openCards() {
const open = Template.instance().open.get();
const person = open && (report() ? report().people : []).find(p => p.userId === open.userId);
const week = person && person.weeks[open.week];
if (!week) return [];
const unit = state.get('unit');
return week.cards.map(card => ({
...card,
url: cardUrl(card),
label: unit === 'points' ? `${card.points} ${t('workload-points-short')}` : hoursLabel(card.hours, t('workload-hours-short')),
}));
},
hasUnassigned() {
const r = report();
return !!(r && (r.unassigned.unscheduledHours || r.unassigned.weeks.some(w => w.loadHours || w.loadPoints)));
},
unassignedCells() {
const r = report();
const unit = state.get('unit');
if (!r) return [];
return r.unassigned.weeks.map(w => ({
value: unit === 'points' ? `${w.loadPoints} ${t('workload-points-short')}` : hoursLabel(w.loadHours, t('workload-hours-short')),
}));
},
unassignedUnscheduled() {
const r = report();
return r && r.unassigned.unscheduledHours ? hoursLabel(r.unassigned.unscheduledHours, t('workload-hours-short')) : '';
},
});
Template.workload.events({
'click .js-workload-cell'(evt, tpl) {
evt.preventDefault();
const userId = evt.currentTarget.getAttribute('data-user');
const week = parseInt(evt.currentTarget.getAttribute('data-week'), 10);
const open = tpl.open.get();
tpl.open.set(open && open.userId === userId && open.week === week ? null : { userId, week });
},
});
// ---------------------------------------------------------------- planning
Template.workloadPlanning.onCreated(function () {
this.mine = new ReactiveVar(null);
this.saved = new ReactiveVar(false);
this.error = new ReactiveVar('');
this.allocationBoard = new ReactiveVar(null);
this.loadMine = () => Meteor.callAsync('workloadMine').then(mine => this.mine.set(mine))
.catch(error => this.error.set(errorText(error)));
this.loadMine();
this.done = promise => promise.then(() => {
this.error.set('');
this.loadMine();
reload();
}).catch(error => this.error.set(errorText(error)));
});
function mine() {
return Template.instance().mine.get();
}
Template.workloadPlanning.helpers({
capacity: () => (mine() ? mine().capacity : { hoursPerWeek: 37.5, workPercent: 100, workingDays: [1, 2, 3, 4, 5] }),
skillsText: () => skillsText(mine() ? mine().capacity.skills : []),
capacitySaved: () => Template.instance().saved.get(),
weekdays() {
const days = mine() ? mine().capacity.workingDays : [1, 2, 3, 4, 5];
// 2024-01-01 was a Monday: the names come from the browser, in its language.
const lang = TAPi18n.getLanguage ? TAPi18n.getLanguage() : undefined;
return [1, 2, 3, 4, 5, 6, 7].map(value => {
let label = String(value);
try { label = new Date(Date.UTC(2024, 0, value)).toLocaleDateString(lang, { weekday: 'short', timeZone: 'UTC' }); } catch (e) { /* keep the number */ }
return { value, label, checked: days.includes(value) };
});
},
myAbsences: () => (mine() ? mine().absences : []),
absenceTypes: () => ABSENCE_TYPES.map(value => ({ value, label: t(`workload-absence-${value}`) })),
absenceTypeLabel: type => t(`workload-absence-${type}`),
holidays: () => (mine() ? mine().holidays : []),
isAdmin: () => !!(mine() && mine().isAdmin),
managedBoards() {
const r = Template.currentData().report;
return r ? r.boards.filter(b => b.mayManage) : [];
},
allocations() {
const r = Template.currentData().report;
return r ? r.allocations : [];
},
allocationMembers() {
const r = Template.currentData().report;
if (!r) return [];
const boards = r.boards.filter(b => b.mayManage);
const chosen = Template.instance().allocationBoard.get();
const board = boards.find(b => b._id === chosen) || boards[0];
if (!board) return [];
const names = new Map(r.people.map(p => [p.userId, p.name || p.username || p.userId]));
return board.members.map(userId => ({ userId, name: names.get(userId) || userId }));
},
allocationWho(allocation) {
if (allocation.userId) {
const r = Template.currentData().report;
const person = r && r.people.find(p => p.userId === allocation.userId);
return person ? (person.name || person.username) : allocation.userId;
}
return `${allocation.roleName} × ${allocation.headcount}`;
},
planningError: () => Template.instance().error.get(),
});
function formValue(form, name) {
const field = form.elements[name];
return field ? String(field.value).trim() : '';
}
Template.workloadPlanning.events({
'submit .js-workload-capacity'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const workingDays = [...form.querySelectorAll('input[name="workingDays"]:checked')].map(i => parseInt(i.value, 10));
tpl.saved.set(false);
const capacity = {
hoursPerWeek: parseFloat(formValue(form, 'hoursPerWeek')),
workPercent: parseFloat(formValue(form, 'workPercent')),
workingDays,
skills: parseSkills(formValue(form, 'skills')),
};
if (formValue(form, 'utilizationTarget')) capacity.utilizationTarget = parseFloat(formValue(form, 'utilizationTarget'));
tpl.done(Meteor.callAsync('workloadSetCapacity', capacity).then(() => tpl.saved.set(true)));
},
'submit .js-workload-absence'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
tpl.done(Meteor.callAsync('workloadAddAbsence', {
start: formValue(form, 'start'),
end: formValue(form, 'end') || formValue(form, 'start'),
type: formValue(form, 'type'),
note: formValue(form, 'note'),
}).then(() => form.reset()));
},
'click .js-workload-remove-absence'(evt, tpl) {
evt.preventDefault();
tpl.done(Meteor.callAsync('workloadRemoveAbsence', evt.currentTarget.getAttribute('data-id')));
},
'change .js-workload-allocation-board'(evt, tpl) {
tpl.allocationBoard.set(evt.currentTarget.value);
},
'submit .js-workload-allocation'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const userId = formValue(form, 'userId');
const allocation = {
start: formValue(form, 'start'),
end: formValue(form, 'end'),
percent: parseFloat(formValue(form, 'percent')),
};
if (userId) allocation.userId = userId;
else {
allocation.roleName = formValue(form, 'roleName');
allocation.headcount = parseInt(formValue(form, 'headcount'), 10) || 1;
}
if (formValue(form, 'skill')) {
allocation.skill = formValue(form, 'skill');
allocation.skillLevel = parseInt(formValue(form, 'skillLevel'), 10) || 1;
}
tpl.done(Meteor.callAsync('workloadAddAllocation', formValue(form, 'boardId'), allocation));
},
'click .js-workload-remove-allocation'(evt, tpl) {
evt.preventDefault();
tpl.done(Meteor.callAsync('workloadRemoveAllocation', evt.currentTarget.getAttribute('data-id')));
},
'submit .js-workload-holiday'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
tpl.done(Meteor.callAsync('workloadAddHoliday', { date: formValue(form, 'date'), name: formValue(form, 'name') })
.then(() => form.reset()));
},
'click .js-workload-remove-holiday'(evt, tpl) {
evt.preventDefault();
tpl.done(Meteor.callAsync('workloadRemoveHoliday', evt.currentTarget.getAttribute('data-id')));
},
});
@@ -66,6 +66,8 @@ template(name="people")
+templatesGeneral
else if domainSetting.get
+domainGeneral
else if cloudSetting.get
+cloudPanelSettings
template(name="orgGeneral")
+8
View File
@@ -148,6 +148,7 @@ Template.people.onCreated(function () {
// #5850: Admin Panel > People > Domains tab. The domains table itself
// (domainGeneral) now owns its data via getDomainsWithUserCountsPage.
this.domainSetting = new ReactiveVar(false);
this.cloudSetting = new ReactiveVar(false);
this.subscribe('inviteToBoardRolesSettings');
this.findOrgsOptions = new ReactiveVar({});
this.findTeamsOptions = new ReactiveVar({});
@@ -439,6 +440,7 @@ Template.people.onCreated(function () {
this.rolesSetting.set('roles-setting' === targetID);
this.templatesSetting.set('templates-setting' === targetID);
this.domainSetting.set('domains-setting' === targetID);
this.cloudSetting.set('cloud-setting' === targetID);
// The Domains table (domainGeneral) now fetches its own single page from
// getDomainsWithUserCountsPage (server-side search / sort / pagination), so
@@ -549,6 +551,9 @@ function peopleMenu(user) {
// with, so it belongs beside the e-mail settings rather than at the end of
// the menu, after the roles and template checkbox lists.
{ id: 'domains-setting', icon: 'fa-at', labelKey: 'domains' },
// The Cloud Panel's domain and SuperAdmin, as Weddy has them at the same
// place (docs/Features/Admin-Panel/Cloud-Panel.md). Site admins only.
{ id: 'cloud-setting', icon: 'fa-cloud', labelKey: 'cloud' },
{ id: 'org-setting', icon: 'fa-globe', labelKey: 'organizations' },
{ id: 'team-setting', icon: 'fa-users', labelKey: 'teams' },
{ id: 'people-setting', icon: 'fa-user', labelKey: 'people' },
@@ -966,6 +971,9 @@ Template.people.helpers({
domainSetting() {
return Template.instance().domainSetting;
},
cloudSetting() {
return Template.instance().cloudSetting;
},
orgList() {
const tpl = Template.instance();
// The 'org' publication already returns only the current page (server-side
+3 -2
View File
@@ -5,6 +5,7 @@ import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import { ReactiveDict } from 'meteor/reactive-dict';
import { ReactiveCache } from '/imports/reactiveCache';
import { isSelectedSubtaskBoard, isSelectedSubtaskList } from '/models/lib/subtaskSettings';
import { liveAttachments } from '/models/lib/attachmentSoftDelete';
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
@@ -1906,7 +1907,7 @@ Template.boardSubtaskSettingsBody.helpers({
},
isBoardSelected() {
const tpl = Template.instance();
return tpl.currentBoard.subtasksDefaultBoardId === Template.currentData()._id;
return isSelectedSubtaskBoard(tpl.currentBoard, Template.currentData()._id);
},
isNullBoardSelected() {
const tpl = Template.instance();
@@ -1981,7 +1982,7 @@ Template.boardSubtaskSettingsBody.helpers({
// #3876 / #4947: the selected landing list must be compared against
// subtasksDefaultListId (the stored list id), NOT subtasksDefaultBoardId.
const tpl = Template.instance();
return tpl.currentBoard.subtasksDefaultListId === Template.currentData()._id;
return isSelectedSubtaskList(tpl.currentBoard, Template.currentData()._id);
},
presentParentTask() {
// Get the current board reactively using board ID from Session
@@ -119,7 +119,7 @@ template(name="restoreArchivedCardToListPopup")
if availableLists.length
select.js-select-restore-target-list(autofocus)
each availableLists
option(value="{{_id}}" selected="{{#if isSelectedList _id}}selected{{/if}}") {{add @index 1}}. {{title}}
option(value="{{_id}}" selected="{{#if isSelectedList _id}}selected{{/if}}") {{title}}
.edit-controls.clearfix
button.primary.confirm.js-restore-card-to-list {{_ 'restore'}}
@@ -134,7 +134,7 @@ template(name="restoreArchivedListToSwimlanePopup")
p {{_ 'no-results'}}, {{_ 'wip-limit-group-select-swimlane'}}:
select.js-select-restore-target-swimlane(autofocus)
each availableSwimlanes
option(value="{{_id}}" selected="{{#if isSelectedSwimlane _id}}selected{{/if}}") {{add @index 1}}. {{isTitleDefault title}}
option(value="{{_id}}" selected="{{#if isSelectedSwimlane _id}}selected{{/if}}") {{isTitleDefault title}}
.edit-controls.clearfix
button.primary.confirm.js-restore-list-to-swimlane {{_ 'restore'}}
@@ -386,22 +386,22 @@ template(name="selectionDestinationPicker")
label {{_ 'boards'}}:
select.js-select-boards
each boards
option(value="{{_id}}" selected="{{#if isDialogOptionBoardId _id}}selected{{/if}}") {{add @index 1}}. {{title}}
option(value="{{_id}}" selected="{{#if isDialogOptionBoardId _id}}selected{{/if}}") {{title}}
label {{_ 'swimlanes'}}:
select.js-select-swimlanes
each swimlanes
option(value="{{_id}}" selected="{{#if isDialogOptionSwimlaneId _id}}selected{{/if}}") {{add @index 1}}. {{isTitleDefault title}}
option(value="{{_id}}" selected="{{#if isDialogOptionSwimlaneId _id}}selected{{/if}}") {{isTitleDefault title}}
label {{_ 'lists'}}:
select.js-select-lists
each lists
option(value="{{_id}}" selected="{{#if isDialogOptionListId _id}}selected{{/if}}") {{add @index 1}}. {{title}}
option(value="{{_id}}" selected="{{#if isDialogOptionListId _id}}selected{{/if}}") {{title}}
label {{_ 'cards'}}:
select.js-select-cards
each cards
option(value="{{_id}}") {{add @index 1}}. {{title}}
option(value="{{_id}}") {{title}}
div
input(type="radio" name="position" value="above" checked id="position-above-{{idSuffix}}" style="display: inline")
+2 -17
View File
@@ -5,6 +5,7 @@ import { SavedCardFilters } from '/client/lib/savedCardFilters';
import { captureFilterPreset, applyFilterPreset } from '/client/lib/filterPresetState';
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { displayDefaultTitle } from '/imports/lib/defaultTitle';
import { Filter } from '/client/lib/filter';
import { EscapeActions } from '/client/lib/escapeActions';
import { MultiSelection } from '/client/lib/multiSelection';
@@ -617,23 +618,7 @@ Template.selectionDestinationPicker.helpers({
return Template.instance().dialog.selectedListId.get() === listId;
},
isTitleDefault(title) {
if (
title.startsWith("key 'default") &&
title.endsWith('returned an object instead of string.')
) {
const translated = `${TAPi18n.__('defaultdefault')}`;
if (
translated.startsWith("key 'default") &&
translated.endsWith('returned an object instead of string.')
) {
return 'Default';
}
return translated;
}
if (title === 'Default') {
return `${TAPi18n.__('defaultdefault')}`;
}
return title;
return displayDefaultTitle(title, key => TAPi18n.__(key));
},
});
+3 -40
View File
@@ -1,6 +1,7 @@
import { titleSortIndexes } from '/models/lib/multilineTitles';
import { titlesFromComposer } from '/client/components/forms/multilineTitleChoice';
import { TAPi18n } from '/imports/i18n';
import { displayDefaultTitle } from '/imports/lib/defaultTitle';
import { ReactiveCache } from '/imports/reactiveCache';
import { SWIMLANE_COLORS } from '/models/metadata/colors';
import { isHexColor, toHex } from '/models/lib/contrastColor';
@@ -51,51 +52,13 @@ Template.swimlaneFixedHeader.helpers({
return Utils.getSwimlaneCollapseState(swimlane);
},
isTitleDefault(title) {
// https://github.com/wekan/wekan/issues/4763
// https://github.com/wekan/wekan/issues/4742
// Translation text for "default" does not work, it returns an object.
// When that happens, try use translation "defaultdefault" that has same content of default, or return text "Default".
// This can happen, if swimlane does not have name.
// Yes, this is fixing the symptom (Swimlane title does not have title)
// instead of fixing the problem (Add Swimlane title when creating swimlane)
// because there could be thousands of swimlanes, adding name Default to all of them
// would be very slow.
if (title.startsWith("key 'default") && title.endsWith('returned an object instead of string.')) {
if (`${TAPi18n.__('defaultdefault')}`.startsWith("key 'default") && `${TAPi18n.__('defaultdefault')}`.endsWith('returned an object instead of string.')) {
return 'Default';
} else {
return `${TAPi18n.__('defaultdefault')}`;
}
} else if (title === 'Default') {
return `${TAPi18n.__('defaultdefault')}`;
} else {
return title;
}
return displayDefaultTitle(title, key => TAPi18n.__(key));
},
});
Template.editSwimlaneTitleForm.helpers({
isTitleDefault(title) {
// https://github.com/wekan/wekan/issues/4763
// https://github.com/wekan/wekan/issues/4742
// Translation text for "default" does not work, it returns an object.
// When that happens, try use translation "defaultdefault" that has same content of default, or return text "Default".
// This can happen, if swimlane does not have name.
// Yes, this is fixing the symptom (Swimlane title does not have title)
// instead of fixing the problem (Add Swimlane title when creating swimlane)
// because there could be thousands of swimlanes, adding name Default to all of them
// would be very slow.
if (title.startsWith("key 'default") && title.endsWith('returned an object instead of string.')) {
if (`${TAPi18n.__('defaultdefault')}`.startsWith("key 'default") && `${TAPi18n.__('defaultdefault')}`.endsWith('returned an object instead of string.')) {
return 'Default';
} else {
return `${TAPi18n.__('defaultdefault')}`;
}
} else if (title === 'Default') {
return `${TAPi18n.__('defaultdefault')}`;
} else {
return title;
}
return displayDefaultTitle(title, key => TAPi18n.__(key));
},
});
+10
View File
@@ -32,6 +32,16 @@ template(name="memberMenuPopup")
a.js-due-cards(href="{{pathFor 'due-cards'}}")
i.fa.fa-calendar
| {{_ 'dueCards-title'}}
if allowFeature 'workload'
li
a.js-workload(href="{{pathFor 'workload'}}")
i.fa.fa-tachometer
| {{_ 'workload-title'}}
if allowFeature 'billing'
li
a.js-billing(href="{{pathFor 'billing'}}")
i.fa.fa-money
| {{_ 'billing-title'}}
li
a.js-my-attachments(href="{{pathFor 'my-attachments'}}")
i.fa.fa-paperclip
+6
View File
@@ -89,6 +89,12 @@ Template.memberMenuPopup.events({
'click .js-due-cards'() {
Popup.back();
},
'click .js-workload'() {
Popup.back();
},
'click .js-billing'() {
Popup.back();
},
'click .js-my-attachments'() {
Popup.back();
},
-4
View File
@@ -177,10 +177,6 @@ Blaze.registerHelper('canCheckChecklistItem', function canCheckChecklistItem() {
Blaze.registerHelper('canModifyBoard', () => Utils.canModifyBoard());
Blaze.registerHelper('add', (a, b) => a + b);
Blaze.registerHelper('increment', (n) => (n || 0) + 1);
// Operator helpers (replacement for raix:handlebar-helpers)
Blaze.registerHelper('$eq', (a, b) => a === b);
Blaze.registerHelper('$neq', (a, b) => a !== b);
+3
View File
@@ -23,6 +23,7 @@ import '/client/components/boards/bigboardView.jade';
import '/client/components/boards/mapView.jade';
import '/client/components/boards/emailView.jade';
import '/client/components/boards/chatView.jade';
import '/client/components/boards/websiteView.jade';
import '/client/components/boards/versionControlView.jade';
import '/client/components/boards/columnSetsView.jade';
import '/client/components/boards/calendarModeView.jade';
@@ -51,6 +52,7 @@ import '/client/components/boards/bigboardView.js';
import '/client/components/boards/mapView.js';
import '/client/components/boards/emailView.js';
import '/client/components/boards/chatView.js';
import '/client/components/boards/websiteView.js';
import '/client/components/boards/versionControlView.js';
import '/client/components/boards/columnSetsView.js';
import '/client/components/boards/calendarModeView.js';
@@ -72,6 +74,7 @@ import '/client/components/boards/bigboardView.css';
import '/client/components/boards/mapView.css';
import '/client/components/boards/emailView.css';
import '/client/components/boards/chatView.css';
import '/client/components/boards/websiteView.css';
import '/client/components/boards/versionControlView.css';
import '/client/components/boards/columnSetsView.css';
import '/client/components/boards/calendarModeView.css';
+12
View File
@@ -34,6 +34,15 @@ import '/client/components/main/shareTarget.jade';
// #2026 / #1377: the all-boards activity feed.
import '/client/components/main/activityFeed.jade';
import '/client/components/main/activityFeed.css';
// Workload and capacity (docs/Features/Workload/Workload.md).
import '/client/components/main/workload.jade';
import '/client/components/main/workload.css';
// Budget and billing (docs/Features/Billing/Billing.md).
import '/client/components/main/billing.jade';
import '/client/components/main/billing.css';
// Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md).
import '/client/components/cloud/cloudPanel.jade';
import '/client/components/cloud/cloudPanel.css';
import '/client/lib/keyboard';
import '/client/lib/popup';
@@ -62,6 +71,9 @@ import '/client/components/main/spinner.js';
import '/client/components/main/support.js';
import '/client/components/main/shareTarget.js';
import '/client/components/main/activityFeed.js';
import '/client/components/main/workload.js';
import '/client/components/main/billing.js';
import '/client/components/cloud/cloudPanel.js';
import '/client/components/main/mapProvider.css';
import '/client/components/main/accessibility.css';
-1
View File
@@ -66,7 +66,6 @@ import '/client/lib/localStorageValidator';
import '/client/lib/modal';
import '/client/lib/multiSelection';
import '/client/lib/pasteImage';
import '/client/lib/secureDOMPurify';
import '/client/lib/spinner';
import '/client/lib/textComplete';
import '/client/lib/unsavedEdits';
+2 -19
View File
@@ -1,6 +1,7 @@
import { ReactiveVar } from 'meteor/reactive-var';
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { displayDefaultTitle } from '/imports/lib/defaultTitle';
import { Utils } from '/client/lib/utils';
import Boards from '/models/boards';
import Swimlanes from '/models/swimlanes';
@@ -224,25 +225,7 @@ export class BoardSwimlaneListDialog {
/** Fix swimlane title translation issue for "Default" swimlane */
isTitleDefault(title) {
if (
title.startsWith("key 'default") &&
title.endsWith('returned an object instead of string.')
) {
if (
`${TAPi18n.__('defaultdefault')}`.startsWith("key 'default") &&
`${TAPi18n.__('defaultdefault')}`.endsWith(
'returned an object instead of string.',
)
) {
return 'Default';
} else {
return `${TAPi18n.__('defaultdefault')}`;
}
} else if (title === 'Default') {
return `${TAPi18n.__('defaultdefault')}`;
} else {
return title;
}
return displayDefaultTitle(title, key => TAPi18n.__(key));
}
/** get the board data from the server */
-55
View File
@@ -1,55 +0,0 @@
import DOMPurify from 'dompurify';
// Centralized secure DOMPurify configuration to prevent XSS and CSS injection attacks.
//
// options.stripLinks — when true, anchor (<a>) tags are removed while their visible
// text is kept, so every link renders as plain, non-clickable text. Used by the
// Admin Panel / Features "render links as plain text" toggle.
export function getSecureDOMPurifyConfig(options = {}) {
const config = {
// Allow common markdown elements including anchor tags
ALLOWED_TAGS: ['a', 'p', 'br', 'strong', 'em', 'u', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'li', 'blockquote', 'pre', 'code', 'img', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'hr', 'div', 'span', 's'],
// Allow safe attributes including href for anchor tags
ALLOWED_ATTR: ['href', 'title', 'alt', 'src', 'width', 'height', 'target', 'rel'],
// Allow safe protocols for links
ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,
// Allow unknown protocols but be cautious
ALLOW_UNKNOWN_PROTOCOLS: false,
// Sanitize DOM for security
SANITIZE_DOM: true,
// Keep content but sanitize it
KEEP_CONTENT: true,
// Block dangerous elements that can cause XSS
FORBID_TAGS: ['script', 'style', 'iframe', 'object', 'embed', 'applet', 'svg', 'defs', 'use', 'g', 'symbol', 'marker', 'pattern', 'mask', 'clipPath', 'linearGradient', 'radialGradient', 'stop', 'animate', 'animateTransform', 'animateMotion', 'set', 'switch', 'foreignObject', 'link', 'meta', 'form', 'input', 'textarea', 'select', 'option', 'button', 'label', 'fieldset', 'legend', 'frameset', 'frame', 'noframes', 'base', 'basefont', 'isindex', 'dir', 'menu', 'menuitem'],
// Block dangerous attributes but allow safe href
FORBID_ATTR: ['xlink:href', 'onload', 'onerror', 'onclick', 'onmouseover', 'onfocus', 'onblur', 'onchange', 'onsubmit', 'onreset', 'onselect', 'onunload', 'onresize', 'onscroll', 'onkeydown', 'onkeyup', 'onkeypress', 'onmousedown', 'onmouseup', 'onmouseover', 'onmouseout', 'onmousemove', 'ondblclick', 'oncontextmenu', 'onwheel', 'ontouchstart', 'ontouchend', 'ontouchmove', 'ontouchcancel', 'onabort', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting', 'onbeforeunload', 'onhashchange', 'onpagehide', 'onpageshow', 'onpopstate', 'onstorage', 'onunload', 'style', 'class', 'id', 'data-*', 'aria-*'],
// Block data URIs that could contain malicious content
ALLOW_DATA_ATTR: false,
// No HOOKS here: DOMPurify has no such option and never ran the functions
// that used to sit in this key. FORBID_TAGS/FORBID_ATTR above already
// remove every element and attribute those functions described (style,
// class, id, data-*, inputs, svg), and ALLOWED_URI_REGEXP refuses data:
// URLs.
};
if (options.stripLinks) {
// Forbid <a> but keep its inner text, so links become plain, non-clickable text.
config.FORBID_TAGS = config.FORBID_TAGS.concat(['a']);
}
return config;
}
// Convenience function for secure sanitization
export function sanitizeHTML(html, options = {}) {
return DOMPurify.sanitize(html, getSecureDOMPurifyConfig(options));
}
// Convenience function for sanitizing text (no HTML)
export function sanitizeText(text) {
return DOMPurify.sanitize(text, {
ALLOWED_TAGS: [],
ALLOWED_ATTR: [],
KEEP_CONTENT: true
});
}
-65
View File
@@ -1,65 +0,0 @@
/* eslint-env mocha */
import { expect } from 'chai';
import { boardOptionLabel } from '/client/components/boards/boardLabelHelpers';
/**
* Unit tests for board/list/swimlane option label building.
*
* Regression #6135: numbering prepended to option labels broke first-letter
* keyboard navigation and readability of boards whose name starts with a
* number. Numbering must be OFF by default and, when enabled, must not be a
* prefix.
*/
describe('boardOptionLabel (#6135)', function() {
describe('default (numbering off)', function() {
it('returns the name unchanged', function() {
expect(boardOptionLabel('My Board', 0)).to.equal('My Board');
expect(boardOptionLabel('My Board', 4)).to.equal('My Board');
});
it('keeps first-letter navigation: label starts with the name', function() {
const name = 'Zebra';
const label = boardOptionLabel(name, 7);
expect(label.charAt(0)).to.equal(name.charAt(0));
expect(label.indexOf(name)).to.equal(0);
});
it('does not prepend a number to names that start with a digit', function() {
const name = '2024 Roadmap';
const label = boardOptionLabel(name, 2);
expect(label).to.equal(name);
expect(label.charAt(0)).to.equal('2');
});
it('treats an explicit numbered:false the same as the default', function() {
expect(boardOptionLabel('Alpha', 3, { numbered: false })).to.equal('Alpha');
});
it('handles empty / nullish names safely', function() {
expect(boardOptionLabel('', 0)).to.equal('');
expect(boardOptionLabel(null, 0)).to.equal('');
expect(boardOptionLabel(undefined, 0)).to.equal('');
});
});
describe('numbering on', function() {
it('still STARTS with the name (number is a suffix, not a prefix)', function() {
const name = 'Projects';
const label = boardOptionLabel(name, 0, { numbered: true });
expect(label.indexOf(name)).to.equal(0);
expect(label.charAt(0)).to.equal(name.charAt(0));
});
it('appends the 1-based position', function() {
expect(boardOptionLabel('Projects', 0, { numbered: true })).to.equal('Projects (1)');
expect(boardOptionLabel('Projects', 4, { numbered: true })).to.equal('Projects (5)');
});
it('preserves first-letter navigation even for digit-named boards', function() {
const name = '2024 Roadmap';
const label = boardOptionLabel(name, 1, { numbered: true });
expect(label.charAt(0)).to.equal('2');
expect(label.indexOf(name)).to.equal(0);
});
});
});
-1
View File
@@ -6,7 +6,6 @@ import './dueDateColor.tests';
import './dueCards.logic.tests';
import './listAdd.tests';
import './responsive.tests';
import './boardNumbering.tests';
import './subtaskStatus.tests';
import './subtaskViewGuard.tests';
import './calendarFirstDay.tests';
+11 -4
View File
@@ -336,12 +336,18 @@ export const Utils = {
// returned as it is. A view the instance disabled (#6736, Admin Panel /
// Settings / Visibility / Features) is not offered either.
boardView() {
const stored = Utils.storedBoardView();
const board = Utils.getCurrentBoard();
return board ? resolveBoardView(board, stored, allowBoardView, Meteor.userId()) : stored;
if (!board) return Utils.storedBoardView();
// Somebody who never chose a view on this board - a visitor of a public
// board above all - gets the board's own default (Board Settings / Board
// View), not Swimlanes passed off as their choice: that made "Default on
// Public Board" do nothing for everybody who had not picked a view.
return resolveBoardView(board, Utils.storedBoardView({ chosenOnly: true }), allowBoardView, Meteor.userId());
},
storedBoardView() {
// The view this person chose, or - unless only a choice is asked for -
// Swimlanes when they chose none.
storedBoardView({ chosenOnly = false } = {}) {
const pendingChoice = pendingBoardView.get();
// #6745: only the view fields. boardView() is read by every list's card
// loop (listBody's idOrNull/containerSwimlaneId); reading the whole user here
@@ -379,7 +385,8 @@ export const Utils = {
// lacked the four Scrum views, so a visitor's Product Backlog, Sprints,
// Sprint Report or Velocity opened as Swimlanes.
const browserView = window.localStorage.getItem('boardView');
return isKnownBoardView(browserView) ? browserView : DEFAULT_BOARD_VIEW;
if (isKnownBoardView(browserView)) return browserView;
return chosenOnly ? null : DEFAULT_BOARD_VIEW;
},
// `swimlaneId` scopes a BOARD-WIDE list's collapse state to the one
+67
View File
@@ -206,6 +206,16 @@ function startSandstormAutoOpen() {
});
}
// Once a page load: is this the Cloud Panel's domain? Then / opens the panel.
let cloudPanelChecked = false;
function maybeOpenCloudPanel() {
if (cloudPanelChecked || !Meteor.userId()) return;
cloudPanelChecked = true;
Meteor.callAsync('cloudPanelWhoAmI').then(info => {
if (info && info.onCloudHost && FlowRouter.current().path === '/') FlowRouter.go('/cloud');
}).catch(() => {});
}
FlowRouter.route('/', {
name: 'home',
triggersEnter: [ensureSignedInUnlessSandstorm],
@@ -218,6 +228,10 @@ FlowRouter.route('/', {
return;
}
if (maybeRedirectToDefaultBoard()) return;
// On the Cloud Panel's own domain the front page is the panel
// (docs/Features/Admin-Panel/Cloud-Panel.md); the server says whether this
// host is it.
maybeOpenCloudPanel();
// `null`, not 'starred': `/` names no section, so which one to open is the
// PAGE's to decide - Starred when the user has starred boards, Remaining
// when they have none. The router runs before the user document has
@@ -684,6 +698,59 @@ FlowRouter.route('/due-cards', {
},
});
// Workload and capacity (docs/Features/Workload/Workload.md): the people of the
// signed-in user's boards, week by week, against the hours they have.
FlowRouter.route('/workload', {
name: 'workload',
triggersEnter: [ensureSignedInUnlessSandstorm],
action() {
Filter.reset();
Session.set('sortBy', '');
EscapeActions.executeUpTo('popup-close');
Utils.manageCustomUI();
Utils.manageMatomo();
this.render('defaultLayout', {
content: 'workload',
});
},
});
// Budget and billing (docs/Features/Billing/Billing.md): the money of the
// boards the signed-in user is an admin of.
FlowRouter.route('/billing', {
name: 'billing',
triggersEnter: [ensureSignedInUnlessSandstorm],
action() {
Filter.reset();
Session.set('sortBy', '');
EscapeActions.executeUpTo('popup-close');
Utils.manageCustomUI();
Utils.manageMatomo();
this.render('defaultLayout', {
content: 'billing',
});
},
});
// Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md): answers only on the
// panel's own domain; elsewhere the page says so.
FlowRouter.route('/cloud', {
name: 'cloud',
triggersEnter: [ensureSignedInUnlessSandstorm],
action() {
Filter.reset();
EscapeActions.executeUpTo('popup-close');
Utils.manageCustomUI();
this.render('defaultLayout', {
content: 'cloudPanel',
});
},
});
FlowRouter.route('/my-attachments', {
name: 'my-attachments',
triggersEnter: [ensureSignedInUnlessSandstorm],
+5
View File
@@ -17,6 +17,11 @@ it did before. (A), (B), (C) and (E) remain designs — (A) is still the support
topology when customers must not share a process. What each option would cost is
kept below, because choosing (D) is only honest next to what it is *not*.
The [Cloud Panel](../../Features/Admin-Panel/Cloud-Panel.md) manages both at
once: a customer domain either has its own container and database (A), or
shares this WeKan as an Organization (D), and its **Import** merges an (A)
domain's database into this one and makes it (D).
## Related files
Everything the question touches. Paths are from the repository root.
@@ -200,5 +200,17 @@
"drawings"
],
"handling": "#1178: the strokes of the card's drawings, kept so a drawing can be edited again. The drawing itself is a PNG attachment, covered by the attachments manifest; the strokes are not email content."
},
{
"fields": [
"estimatedHours"
],
"handling": "Workload (docs/Features/Workload/Workload.md): the card's estimate in hours. Planning data for the Workload and capacity page, not card content, so it is not part of rule or notification emails."
},
{
"fields": [
"billable"
],
"handling": "Budget and billing (docs/Features/Billing/Billing.md): whether the card's time is invoiced. Money is a board admin's business and is shown only on the Budget and billing page, never in rule or notification emails."
}
]
+1 -2
View File
@@ -12,7 +12,6 @@ for years this page described four directories out of twenty and did not say so.
| [imports/](../../imports) | shared code that is neither a model nor a component: i18n, the reactive cache, the shared SimpleSchema, startup |
| [packages/](../../packages) | the Meteor packages WeKan maintains itself - the accounts integrations (CAS, LDAP, OIDC, Sandstorm), the lockout, markdown |
| [config/](../../config) | the router and the accounts configuration |
| [migrations/](../../migrations) | one file per database migration, run in order at startup |
| [public/](../../public) | files served as-is: icons, fonts, the web app manifest |
| [private/](../../private) | files the SERVER can read and the client cannot |
| [tests/](../../tests) | the suites - `*.test.cjs` run by `tests/run-node-suites.cjs`, plus the Playwright and e2e directories |
@@ -166,7 +165,7 @@ The four directories that hold most of it:
the database, the retry-on-busy wrapper, the error handlers.
* **[statistics.js](../../server/statistics.js)** implements a Meteor server-only [method](https://guide.meteor.com/methods.html) for general-purpose information such as OS, memory, CPUs, PID of the process and so on.
* **[migrations.js](../../migrations)** is where code that update sold databases to new schema is located. Anytime the schema of one of the collection changes in a non-backward compatible way a migration needs to be written in this file.
* **[migrations/](../../server/migrations)** is where code that updates old databases to a new schema is located: one file per migration, run at startup. Anytime the schema of one of the collections changes in a non-backward compatible way, a migration needs to be written there.
* **[authentication.js](../../server/authentication.js)** add the `Authentication`object to Meteor that provides methods for checking access rights.
* **[lib/utils.js](../../server/lib/utils.js)** defines some checks used by [checklists.js](../../models/checklists.js)** model. <span style="color:red">*XXX: these methods are defined in server-only code by are used in models, which are visible by the client (in Checklists.allow)?*</span>
* **[notifications](../../server/notifications)**
@@ -60,6 +60,7 @@ OAuth providers and Passwordless login each have their own menu entry.
| `/admin/people/email` | Email | `email-setting` |
| `/admin/people/notifications` | Notifications | `notify-setting` |
| `/admin/people/domains` | Domains | `domains-setting` |
| `/admin/people/cloud` | Cloud | `cloud-setting` |
| `/admin/people/organizations` | Organizations | `org-setting` |
| `/admin/people/teams` | Teams | `team-setting` |
| `/admin/people/locked-users` | Locked Users | `locked-users-setting` |
+114
View File
@@ -0,0 +1,114 @@
# Cloud Panel
The Cloud Panel is the hosting operator's page for many WeKan customer
domains: `customer1.wekan.team`, `wekan.customer.com`, ... It is on a domain of
its own, the **Cloud Panel Domain** (for example `cloud.wekan.fi`), and it looks
like the Admin Panel: a left menu and a pane beside it.
[Weddy](https://github.com/wekan/weddy) has the same Cloud Panel, in Go
(caddy-wekan-plugin): the same place to turn it on, the same SuperAdmin and the
same Domains columns, so the two read alike.
## Turning it on
**Admin Panel / People / Cloud** (`/admin/people/cloud`), for site
administrators:
- **Cloud Panel Domain** - the panel's own domain;
- **SuperAdmin Username** - the existing WeKan administrator who keeps the
panel, by username or e-mail address.
Then point the Cloud Panel Domain at this WeKan (the Caddy pane below writes
that route too). At `https://<Cloud Panel Domain>/cloud` - and on its front
page - the SuperAdmin has the panel. Anybody else there, or anybody at another
domain, gets *The Cloud Panel is only for the SuperAdmin, at the Cloud Panel
Domain*. Every method checks the host again on the server, so a customer
domain never shows the panel, whoever is signed in.
## The SuperAdmin's menu
### Domains
A table of the customer domains ([Table](../General/Table.md)): **Domain**,
**Customer name**, **Customer email address**, **Start Date** and **End Date**
- a domain is served from its Start Date to its End Date, both included - and
where its data is. Each domain is one of two kinds:
| Kind | What it is |
| --- | --- |
| **Its own WeKan and database** | The customer's own WeKan container and its own MongoDB database. Caddy routes the domain to the container (`host:port`). |
| **Shares this WeKan** | Served by this WeKan, as an Organization that claims the domain ([Multitenancy](../../Design/Multitenancy/Multitenancy.md), option D): its own branding, its own admins, its boards only for its members. |
Editing a domain also keeps its **MongoDB**: a connection string, or host,
port, database name, username, password, authentication database, replica set
and TLS. A database without a password is fine. The password is written on the
server and never shown again; leaving it empty on an edit keeps it.
**Test connection** counts the database's users, boards and cards.
**Import into this WeKan** turns ten containers and ten databases into one:
it reads the domain's own WeKan database and copies its boards, lists,
swimlanes, cards, comments, checklists, custom fields, activities, rules,
integrations, attachment records and time into this database, under the
domain's Organization, and the domain then shares this WeKan.
- It runs as a **dry run first**: what would be copied, and nothing written;
**Import now** does it.
- An account with the same e-mail address **is** the account here. Any other is
created, under its username - with a number added when the username is taken
- and keeps its password. Nobody imported is an administrator here, and no
login session comes along.
- A document whose id is already here is left alone and counted.
- The customer's instance settings stay theirs: product name, SMTP and the
rest are not copied.
- Attachment **files** in GridFS come along; files on the old container's own
disk or object storage have to be copied there too - the import says how many
attachments there are.
### Invoices
The hosting invoices of each domain: number, date, due date, amount and
currency, open, paid (and when) or void, a description and a link to the
invoice itself. The SuperAdmin records them - also the ones from before the
panel.
### Chat
A conversation per domain between its customer and the SuperAdmin. **Import
earlier conversations** brings in a Rocket.Chat export (`.zip`, from "Download
my data" or the CSV importer's zip) or a Sandstorm SandChat grain backup
(`.zip`), with each message's room, author and time - the same readers the
board import uses.
### CloudFlare
A **CloudFlare API key** (with DNS edit on the zone; write-only, never shown
again), the **zone ID**, the **address the domains point at** (an IP address
for A/AAAA records, or a host name for CNAMEs) and whether CloudFlare proxies
them. **Check DNS records** shows what would change; **Create and update DNS
records** creates the missing records and points the existing A, AAAA or CNAME
at the target. A record of another kind on the same name is never replaced: it
is reported.
### Caddy
The Caddyfile of the panel and every domain: the Cloud Panel Domain and each
shared domain to this WeKan, each domain with its own database to its
container, only within its dates. **Show Caddyfile** shows it; **Load into
Caddy** sends it to Caddy's admin API (`http://caddy:2019/load`).
## A customer's menu
A WeKan user whose e-mail address is a domain's Customer or Billing email
address - or who is named among its customers - signs in at the Cloud Panel
Domain and sees **Invoices** (their own, and whether and when each was paid)
and **Chat** with the SuperAdmin. Nothing of another domain.
## Code
| | |
| --- | --- |
| `models/lib/cloudPanel.js` | the rules, as pure functions: settings, domains, databases, who is who, the Caddyfile, the DNS plan, invoices, chat, the import's accounts and ids |
| `models/cloudPanel.js` | the collections `cloudSettings`, `cloudDomains`, `cloudInvoices`, `cloudChatMessages` - no client writes, no publications |
| `server/cloudPanel.js` | the methods, with who may call them, on which host |
| `client/components/cloud/cloudPanel.*` | the panel, and the Admin Panel / People / Cloud pane |
| `tests/cloudPanel.test.cjs` | the rules; `tests/cloudPanelAccess.test.cjs` who may do what, the import, CloudFlare, Caddy and the chat import |
@@ -15,6 +15,7 @@ Who may sign in, who they belong to, and what they may do — in menu order.
| People / E-mail | `email` | [E-mail.md](E-mail.md) | SMTP, the invite domain, and whether users may change their address. |
| People / Notifications | `notifications` | [Notifications.md](Notifications.md) | The site-wide notification default, overridable per board and per member. |
| People / Domains | `domains` | [Domains.md](Domains.md) | The e-mail domains in use, with a user count each. |
| People / Cloud | `cloud` | [Cloud Panel](../Cloud-Panel.md) | The Cloud Panel Domain and its SuperAdmin. |
| People / Organizations | `organizations` | [Organizations.md](Organizations.md) | Organizations, their per-organization switches, and the same-Organization board restriction. |
| People / Teams | `teams` | [Teams.md](Teams.md) | Teams, their per-team switches, and the same-Team board restriction. |
| People / People | `people` | [People.md](People.md) | Every user: e-mail, admin flag, active state, lockout, created date. |
+1
View File
@@ -80,6 +80,7 @@ are not reachable from the current Admin Panel menu. Current storage panes use
| E-mail (`email`) | [settings.js](../../../server/models/settings.js) | Mail service settings, secret masking and test-email method; delivery needs a configured SMTP/provider account. |
| Notifications (`notifications`) | [settings.js](../../../server/models/settings.js) | Site defaults through setAdminNotifyDefault; used by notification resolution. |
| Domains (`domains`) | [peopleBody.js](../../../client/components/settings/peopleBody.js) | Server-backed domain membership counts, search and pagination. |
| Cloud (`cloud`) | [cloudPanel.js](../../../server/cloudPanel.js) | The Cloud Panel Domain and its SuperAdmin, site administrators only; the panel itself answers only on that domain, to the SuperAdmin and a domain's customers ([Cloud Panel](Cloud-Panel.md)). Real methods in [cloudPanelAccess.test.cjs](../../../tests/cloudPanelAccess.test.cjs). |
| Organizations (`organizations`) | [tenant.js](../../../server/methods/tenant.js) | Organization membership, tenant fields and administrator scope. |
| Teams (`teams`) | [team.js](../../../models/team.js) | Team records and membership operations; scoped server permissions. |
| People (`people`) | [users.js](../../../server/models/users.js) | Create/edit, roles, password/email operations, impersonation and removal. |
+2 -1
View File
@@ -39,9 +39,10 @@ table beside it.
| Menu name | Menu path | Description |
| --- | --- | --- |
| Settings | Admin Panel / Settings | **Version** (first, and the pane that opens with the Admin Panel), Appearance, Features, Feature profiles, Security, Activities and notifications, Delete, Announcement, Accessibility, Translation, PWA, Global Webhooks, Shared labels. |
| People | Admin Panel / People | E-mail, Notifications, Domains, Organizations, Teams, People, Locked users, Audit log, Roles, Shared templates, Login, then the sign-in providers (SAML, LDAP, OAuth2, CAS, Header login, OAuth login providers, Passwordless login). |
| People | Admin Panel / People | E-mail, Notifications, Domains, Cloud, Organizations, Teams, People, Locked users, Audit log, Roles, Shared templates, Login, then the sign-in providers (SAML, LDAP, OAuth2, CAS, Header login, OAuth login providers, Passwordless login). |
| Attachments | Admin Panel / Attachments | The storage backends and the attachment/avatar tools. |
| Problems | Admin Panel / Problems | Summary, Backup, then a **Reports** heading over the reports — see [Table](../General/Table.md). |
| Cloud Panel | `/cloud`, at the Cloud Panel Domain | The SuperAdmin's Domains, Invoices, Chat, Cloudflare and Caddy; a customer's Invoices and Chat — see [Cloud Panel](../Admin-Panel/Cloud-Panel.md). |
Four pages, not seven: **Translation** and **Version** became panes of Settings,
and so did **Features**. Security, Activities and notifications and Delete, which
+230
View File
@@ -0,0 +1,230 @@
# Budget and billing
User menu → **Budget and billing** (`/billing`) is where a board's admins plan
and charge for the board's work: its budget, what the work has cost and will
cost, the hourly rates, and invoices of the hours spent. It builds on the time
WeKan already tracks - a card's **spent time**, and its **estimated hours**
(see [Workload](../Workload/Workload.md)).
## Rates
Each board has hourly rates, in a currency (an ISO code such as EUR or USD):
one for a member, and a board default for everybody without one of their own.
A card's hours are charged at the rates of its assignees - shared equally when
it has several - or of its members when nobody is assigned, or at the board
default when it has nobody. Hours with no rate in the board's currency are
reported as unpriced, never billed at zero without saying so.
## Budget
A board's budget is an amount of money, a number of hours, or both, for an
optional period. The page shows for each board:
- **Spent**: the time spent on its cards at their rates, and as a percent of
the budget;
- **Still to do**: on open cards, the estimate less the time spent;
- **Forecast**: spent plus still to do, in red when it is over the budget;
- **Left of budget**, **Invoiced** and **Paid**.
## Expenses
Besides time, a board's work costs money: travel, a hotel, meals, materials,
a subcontractor, software. **Expenses** records each with its day, amount,
currency, category and description, optionally the card and the person, a
**markup** % and whether it is **billable**. An expense spends the budget at
what it cost; a billable one goes on the next invoice of its period at its
amount plus the markup, and like time it is billed once. An expense on an
invoice is a record and cannot be removed; voiding or crediting the invoice
frees it.
## Fixed fees and retainers
Not all work is billed by the hour. A **fixed fee** is billed once, from its
day on - a milestone, a deposit, a fixed price. A **retainer** is a fee billed
every month from its day until its end (on the same day of the month, or the
last day of a shorter month). The draft of an invoice takes the fees due in
its period that no standing invoice has billed; which months are billed is
read from the invoices themselves, so voiding or crediting one frees its
fees. A board whose price is fixed unticks **Bill time by the hour**: its
invoices then carry only its fees and expenses, while the time is still
tracked for the budget and the margin.
## Approving time
With **Approve time before it is invoiced** on, the board's admins see the
billable time waiting for them under **Time to approve**, and approve it or
send it back with a note. Only approved time is invoiced; the draft says how
many hours are still waiting. The person who logged the time sees the
decision in the card's Time popup. Approved time cannot be removed by the
person who logged it; time sent back can, and is logged again.
## Profitability
A rate can also have a **cost per hour** - what an hour of that person costs
(salary and overheads), never shown on an invoice. The board then shows its
**cost** (the hours at their cost rates and the expenses) and its **margin**:
the revenue - invoiced, and **unbilled work** (billable time, fees and
expenses not invoiced yet) - less the cost. Hours of somebody with no cost
rate are reported, never counted as free.
## Quotes
**Create quote** prices the work still to do - each open, billable card's
estimate less the time spent, at its people's rates - and the fees not
invoiced yet (a retainer to its end). A quote is numbered `QUO-2027-0007`,
valid for the days set on the invoicer (30 by default), and goes from draft
to sent to accepted or declined. **Accepting** it can make it the board's
budget. It downloads as PDF, SVG, Excel and CSV, without payment details.
## The board's customer
The invoicer also keeps the board's **customer** - name and address,
country, VAT ID - filled in on each invoice and quote that does not name
another.
## Time by day
A card's **Time** popup now lists its time by day - the day, the hours, who
logged them and a note - and **Log time** adds an entry on a day. A card's
spent time stays its total, so the timers, the REST API, the imports and every
report work as before: whenever the total changes, however it was written, the
server records the difference as an entry of that day by that user (a
correction when it went down). Time spent before entries were kept becomes one
undated entry, once. An entry on an invoice is a record and cannot be removed.
## Invoices
**Create invoice** bills the billable time entries of a **period** (both days
inclusive; leave it empty for all open time) that are on no invoice yet: per
card and per person who logged them, at that person's rate, with the first and
last day of each line. Time from before dates were kept is included only when
*Include time logged before dates were kept* is ticked, and is charged as the
card's assignees. A card is billable unless *Billable* is unticked in its Time
popup. The entries of an invoice are marked with it, so no hour is billed
twice; voiding an invoice frees them.
- **Invoicer**: name, address, country, business ID, VAT ID, email, phone and
website, VAT %, reverse charge, payment terms in days (the due date), penalty
interest % and a footer. An invoice keeps the invoicer as it was when it was
made.
- **Numbers and references**: `INV-2027-0042`, credit notes `CRN-2027-0043`,
one sequence a year. The payment reference is a Finnish reference number
(7-3-1 check digit), the same digits as an ISO 11649 RF creditor reference, or
none.
- **VAT**: the net, the VAT (rounded once, on the net) and the total. With
reverse charge the VAT is 0 and the invoice says so.
- **Status**: Draft → Sent → Paid, or Void; a sent or paid invoice is credited
with a **credit note**, which credits it in full and frees its time. Shown as
*Partially paid* while payments are short of the total, and *Overdue* after
the due date, with the days overdue and the penalty interest so far.
- **Payments**: record a payment (day, amount, method) on a sent invoice; when
the payments reach the total it becomes Paid.
- **Files**: **PDF** (A4, paged), **SVG** (A4 wide, one page as long as the
invoice, text as text), **Excel**, **CSV** (a cell that begins like a formula
is written as text), and an **e-invoice**: UBL 2.1, Peppol BIS Billing 3.0
(EN 16931), a credit note as a UBL CreditNote. **Open** shows the invoice on
the page, to print.
## Payment methods
The invoicer lists the ways to pay; each invoice shows them with their codes,
made by their published standards (models/lib/paymentCodes.js, checked against
the standards' own examples):
| Method | On the invoice |
| --- | --- |
| SEPA credit transfer | QR code, EPC069-12 version 002 ("GiroCode"), EUR |
| Finnish bank barcode | the 54-digit *pankkiviivakoodi* (version 4, or 5 with an RF reference) as a Code 128 barcode, EUR |
| Swiss QR-bill | the SPC 0200 QR code with the Swiss cross, CHF or EUR (the QR code only, not the payment part layout) |
| Swish | the prefilled Swish QR code, SEK |
| Pix | the static BR Code (EMV, CRC16), BRL |
| UPI | the `upi://pay` link and QR code, INR |
| Bitcoin | the BIP 21 URI and QR code (an amount only on a BTC invoice) |
| PayPal | the PayPal.me link with the amount, and its QR code |
| Payment link | any https payment page - Stripe Payment Links, Mollie, Square, MobilePay, Vipps, Revolut, ... - with `{amount}`, `{currency}`, `{reference}` and `{number}` filled in, and its QR code |
| PromptPay (Thailand) | EMVCo QR to a mobile number, national ID or e-wallet, THB |
| PayNow (Singapore) | SGQR (EMVCo) to a mobile number or UEN, SGD |
| VietQR (Vietnam) | NAPAS EMVCo QR to a bank account by BIN, VND |
| FPS (Hong Kong) | EMVCo QR to an FPS ID, mobile number or email, HKD |
| QR Platba (Czechia) | Short Payment Descriptor (SPAYD), CZK, with the variable symbol |
| Polish bank QR | the ZBP 2D code, PLN (up to 9 999.99) |
| Hungary | the MNB instant transfer QR code, HUF |
| Serbia | the NBS IPS QR code, RSD |
| Denmark | the FI card +71 line, DKK |
| Ethereum, Litecoin | EIP-681 and BIP 21-style URIs and QR codes |
| Bank transfer, cash, cheque, other | the instructions, as text |
A method that does not fit an invoice - Swish on a EUR invoice, say - is left
out of it, and the invoice page says why. Nothing is sent to any payment
service: the codes are drawn on the invoice, and the payer's bank or app reads
them.
Payment references: a Finnish reference number, an ISO 11649 RF creditor
reference, a Belgian structured communication (`+++123/4567/89002+++`, put in
the text of a SEPA QR code as Belgian banks read it), a Norwegian KID or a
Swedish OCR reference.
Not included, as they need a merchant agreement or registration with the
scheme, or a contract with the service: Indonesia's QRIS, Japan's JPQR,
Nigeria's NQR, Mexico's CoDi, the Philippines' QR Ph, Alipay, WeChat Pay,
Zelle, Interac, M-Pesa. Slovenia's UPN QR, Slovakia's PAY by square,
Croatia's HUB3 and Brazil's boleto are not drawn yet. For these, a payment link
or the instructions as text work.
## Currencies
Amounts are kept in the minor unit of their currency, as ISO 4217 gives it
(models/lib/currencies.js): two decimals for most, none for JPY, KRW, VND, CLP,
ISK and the others without, three for BHD, KWD, JOD, OMR, TND and IQD. Bitcoin,
Litecoin and Ether are kept to 8 decimals.
## Who sees what
Money is the business of a board's active admins: members, even with write
access, do not see rates, budgets or invoices, and neither does an admin who
sees only the cards assigned to them. Site administrators may manage every
board. Everything goes through server methods; nothing is published to the
browser, and the collections take no client writes. Admin Panel → Features →
Budget and billing turns the page and its methods off.
Amounts are kept as integers of their currency's minor unit, so an invoice
adds up exactly.
## Professional services automation
Together with [Workload](../Workload/Workload.md), these pages cover what a
professional services automation (PSA) system does:
| PSA | In WeKan |
| --- | --- |
| Projects and tasks | boards, cards, checklists, dependencies, Gantt |
| Time tracking | time by day, timers, approval |
| Resource management | Workload: capacity, absences, holidays, allocations, placeholders |
| Skills | skills and levels, and who could fill a placeholder |
| Utilization | billable hours against working time, and a target |
| Budgets and forecasts | Budget and billing: budget, spent, still to do, forecast |
| Expenses | expenses, with markup, billable or not |
| Billing models | time and material, fixed fees, milestones, retainers |
| Quotes | quotes of the work still to do |
| Invoicing | invoices, credit notes, payments, e-invoices, payment codes |
| Profitability | cost rates, cost, margin, unbilled work |
Left to other software, on purpose: a sales pipeline and CRM (a WeKan board
works as one, but leads and contacts are not modelled), a customer portal
(share a board with the customer as a member instead), and accounting -
revenue recognition, the general ledger and payroll - which belong to the
accounting system the invoices go to as e-invoices.
## Code
| | |
| --- | --- |
| `models/lib/billing.js` | the rules, as pure functions: rates, cost, forecast, budget, invoice lines, VAT, state, references, CSV |
| `models/lib/timeEntries.js`, `server/timeEntries.js` | time by day, kept in step with a card's total |
| `models/lib/paymentCodes.js` | IBAN, references, EPC QR, Finnish barcode, Swiss QR, Swish, Pix, UPI, BIP 21, links |
| `models/lib/ublInvoice.js` | the Peppol BIS 3.0 e-invoice |
| `server/lib/invoiceFiles.js` | PDF, SVG and Excel |
| `models/billing.js`, `models/timeEntries.js` | the collections `billingBudgets`, `billingRates`, `billingProfiles`, `billingInvoices`, `billingExpenses`, `billingFees`, `billingQuotes`, `timeEntries` |
| `server/billing.js` | the methods, with who may call them |
| `client/components/main/billing.*` | the page |
| `tests/billing.test.cjs`, `tests/timeEntries.test.cjs`, `tests/paymentCodes.test.cjs`, `tests/ublInvoice.test.cjs`, `tests/invoiceFiles.test.cjs` | the rules and the files; `tests/billingAccess.test.cjs` who may do what |
+1
View File
@@ -94,3 +94,4 @@ Role permissions apply in every view; see
| Distribution | `board-view-distribution` | `distributionView` in `client/components/boards/chartPlaceholderViews.jade` | [Board-Reports](Board-Views/Charts/Board-Reports.md) |
| Dependency Map | `board-view-dependency-map` | `dependencyMapView` in `client/components/boards/chartPlaceholderViews.jade` | [Board-Reports](Board-Views/Charts/Board-Reports.md) |
| Activity Heatmap | `board-view-activity-heatmap` | `activityHeatmapView` in `client/components/boards/chartPlaceholderViews.jade` | [Board-Reports](Board-Views/Charts/Board-Reports.md) |
| Website | `board-view-website` | `websiteView` in `client/components/boards/websiteView.jade` | [Website](../Board-Sidebar/Board-Settings/Import-Export/Website/Website.md) |
@@ -19,7 +19,7 @@ heading (`BOARD_VIEW_GROUPS` in `models/lib/boardViewSettings.js`):
| Scrum | Product Backlog, Sprints, Sprint Report, Velocity, Burndown, Burnup, Release Burndown, Epic Progress |
| Kanban flow | Cumulative Flow, Control, Cycle Time, Lead Time, Flow Efficiency, Throughput Histogram, WIP Run, Aging WIP, Blocker Analysis, Monte Carlo, Process Behavior, Size vs. Cycle Time, Created vs. Resolved, Net Flow, Time in List, Average Age, Throughput Run Chart, Due Date Performance |
| Overview | Dashboard, Pulse, Statistics, Workload, Distribution, Dependency Map, Activity Heatmap |
| Communication and code | Email, Chat, Version Control |
| Communication and code | Email, Chat, Website, Version Control |
The order a board admin drags here decides inside each group; a view stays in
its own group. A group none of whose views is shown has no heading.
@@ -137,6 +137,7 @@ menu's own order**, with the same translation keys the menu uses:
50. Distribution (`board-view-distribution`)
51. Dependency Map (`board-view-dependency-map`)
52. Activity Heatmap (`board-view-activity-heatmap`)
53. Website (`board-view-website`)
The one list is `BOARD_VIEWS` in `models/lib/boardViewSettings.js`. Both the
popup and the Board View menu (`boardChangeViewPopup` in
@@ -221,6 +222,13 @@ view added to WeKan later appears at the end of an existing custom order.
default: Version Control, Email, Chat, Roadmap and the others. A visitor
can not write: every view draws its controls for the person's rights,
and the server refuses a write without them.
- **A website at the board's address.** With **Website** as the public
default, a visitor of a public board sees the board as a website - its
Published cards, Pages as the menu, the other cards as posts, the cards'
attachments as their images and files - built from the board itself
(`models/lib/websiteView.js`). A board imported from WordPress, Ghost,
Blogger or a static site ([Website](Import-Export/Website/Website.md)) is
laid out that way already; any board can be.
- **The Board View menu** (`boardChangeViewPopup`) is rendered from the
board: `boardViewMenuEntries` gives it the views whose *Show* box is ticked
for the side that applies to the person looking (above), in the board's
@@ -127,6 +127,10 @@ What the current code does (`parseAsana` in `models/lib/externalParsers.js`):
| `gid` | Source reference, for parent and dependency links |
| `name`, `notes` | Card title, description |
| `start_at` / `start_on`, `due_at` / `due_on` | Start date, due date |
| `actual_time_minutes` (time tracking) | Spent time (hours), written back on export |
| `html_notes`, when there are no `notes` | Card description, as text |
| `approval_status` of an approval task (not pending) | Label `approval:approved`, `approval:rejected` or `approval:changes requested` |
| `likes` of a comment story | The comment's 👍 reactions, by who liked it; likes the export does not name are counted in the loss report |
| `completed_at` (when completed) | End date |
| `created_at` | Creation date |
| `assignee` | Card member, when mapped |
@@ -0,0 +1,111 @@
# Azure DevOps Boards
WeKan imports the work items of an [Azure DevOps Boards](https://learn.microsoft.com/azure/devops/boards/)
query, and exports a board as the CSV file Azure DevOps' own **Import from CSV**
reads.
## How to import
1. In Azure DevOps, open **Boards → Queries**, run a query that shows the
columns you want (for example ID, Work Item Type, Title, Assigned To, State,
Tags, Board Column, Description), and choose **⋯ → Export to CSV**. A tree
query writes Title 1, Title 2, ... and keeps the parent and child items.
2. In WeKan, go to **All Boards → New → Import → Azure DevOps Boards**.
3. Choose the `.csv` file, or paste its text.
4. Map the people to WeKan members, or leave them as they are.
5. Click **Import**.
## How to import many boards at once
1. On the import page, choose **Azure DevOps Boards**, then under **Import many boards**
choose several files.
2. Each file becomes its own board. The boards are imported without member
mapping; members can be mapped later.
Azure DevOps Boards is imported through the generalized importer
(`models/kanboardCreator.js`), so the page also has the checkbox **One board
per project**.
From a script:
```bash
python3 api.py importboardsfrom azuredevops FILE_OR_DIR ...
```
## How to export
1. Open the board, then **Board Settings → Export**, and choose **Azure DevOps
Boards**. The board downloads as `<board>.csv`.
2. In Azure DevOps, open **Boards → Work items → Import from CSV** and choose
the file.
Every row is a new work item (its ID is empty). Its type is the card's first
label named after a work item type of the built-in processes (Epic, Feature,
User Story, Product Backlog Item, Requirement, Bug, Task, Issue, ...), else
**Task**. Its State is the card's list when the list is named after a state of
those processes (New, Active, Resolved, Closed, To Do, Doing, Done, ...); a list
of another name is written as a tag and the work item starts in its type's
first state. Priority, Story Points, Effort, Area Path and the other fields are
written only when a card of the board has them, so a board that never came from
Azure DevOps gets no column its process may not have. The description is
written as the HTML the field holds; **Assigned To** is the card's owner, which
Azure DevOps has to find among its users.
## How to export all boards at once
1. In WeKan, go to **All Boards**, open the sidebar and choose **Export all
boards**, then **Azure DevOps Boards**.
2. One `.zip` downloads, with one `.csv` per board you can export.
From a script:
```bash
python3 api.py exportallboards azuredevops boards.zip
```
## Format details
Export to CSV writes the query's columns by their display names; a person is
`Display Name <address>`, tags are joined with `; `, and a date is in the
exporting user's regional format (`11/20/2026 3:14:00 PM`, `20.11.2026 15.14`,
`20/11/2026 15:14`) - a file whose slash dates have a first part above 12 is
read day first (`models/lib/microsoftCsvDates.js`). **Board Column** (when the
query has it, else **State**) is the list and **Board Lane** the swimlane
(`models/lib/azureDevOpsCsvFormat.js`).
## What is kept
Work items as cards in their Board Column or State, Board Lane as swimlanes,
the work item type and tags as labels, the ID as the card's reference, the
parent (the Parent column, or the tree query's levels) as the parent card, the
title, the description with Acceptance Criteria and Repro Steps (HTML read as
text), Assigned To as the owner, Created By as "requested by", the created,
start, target and closed dates, Completed Work as spent time, and every other
column - Priority, Story Points, Area Path, Iteration Path, ... - as a custom
field.
## What is not kept
Changed Date, Changed By, Rev, History, Activated and Resolved dates and the
Board Column Done flag (reported); links other than the parent, attachments and
the discussion, which Export to CSV does not write. On export: the dates,
comments, checklists as items, and the parent of a card. What was left out is listed in the import's loss report, also in
**Admin Panel → Problems → Recovery**.
## REST API
- Import: `POST /api/boards/import/azuredevops` with the CSV text.
- Export: `GET /api/boards/:boardId/export/azuredevops`.
## How it is built and tested
`tests/azureDevOpsCsv.test.cjs` reads a query export with HTML descriptions,
regional dates, a parent and custom fields, a tree query's Title 1/2/3 levels,
day-first dates, writes a board and reads it back, writes the header once over
pages, and refuses a file without a Title.
## Sources
- [Import or update work items in bulk by using CSV files](https://learn.microsoft.com/azure/devops/boards/queries/import-work-items-from-csv)
- [Export a list of work items](https://learn.microsoft.com/azure/devops/boards/queries/view-run-query#export-a-query)
- [Default processes and work item types](https://learn.microsoft.com/azure/devops/boards/work-items/guidance/choose-process)
@@ -110,7 +110,7 @@ The fetched JSON, which is also what the REST API takes:
| `created_at` | Created date |
| `completed` | Due date marked done; a completed to-do is archived |
| `assignees` | Members: the first as owner, then the others |
| Card `steps` (`title`, `completed`) | Checklist "Steps" |
| Card `steps` (`title`, `completed`, `due_on`, `assignees`) | Checklist "Steps", each item with the step's due date and first assignee |
| Comments (`content`, `creator`, `created_at`) | Comments |
| Card and to-do `id` | Source reference |
@@ -205,7 +205,7 @@ Last activity and Voting are not imported.
| Parent card | The card's parent, by title |
| Spent time, Overtime, Archived | Spent time, overtime, archived |
| `CustomField-...` | Board custom fields and the card's values |
| Other columns ticked in the mapping step | Text custom fields |
| Every other named column | A text custom field of its name: ticked in the mapping step by default, and always when no mapping is sent (a REST import) |
The export writes every column listed under **Export columns**.
@@ -213,8 +213,8 @@ The export writes every column listed under **Export columns**.
On import:
- columns no field uses and that were not ticked as custom fields,
including WeKan's Last activity and Voting columns;
- columns unticked in the mapping step, and WeKan's own Number, Last
activity and Voting columns, which no card field takes;
- members who were not mapped (Requested By and Assigned By keep them as
text);
- label names with spaces or commas in them: those separate two labels;
@@ -129,7 +129,8 @@ From the current code (`models/lib/clickupCsvFormat.js`):
Name, the board is named **Imported ClickUp tasks**.
The export writes the 31 workspace export columns, from **Task ID** to
**Rolled Up Time Text**, then **Checklist**:
**Rolled Up Time Text**, then **Checklist**, then one column per custom field
of the board that is not one of those named above:
- Task ID is the WeKan card id; Parent ID and Subtask IDs link the cards of
the same board;
@@ -162,6 +163,8 @@ The export writes the 31 workspace export columns, from **Task ID** to
| Due date | Due date |
| Start date | Start date |
| Time Spent / Time Tracked | Spent time, in hours |
| Task Link | `Source: <link>` at the end of the description |
| Any other column (a workspace export writes each custom field as one) | A custom field of the column's name |
| Priority | Custom field Priority |
| Task Type (other than task) | Custom field Task Type |
| Task Custom ID | Custom field Custom ID |
@@ -187,11 +190,11 @@ silently:
- a parent that is not in the same import, a Task ID used twice, and a parent
link that would form a cycle.
Other columns, such as Task Link, Rolled Up Time and the `Text` date columns,
are not read and not reported.
ClickUp's own Rolled Up Time and `Text` date columns repeat other columns,
and are not read.
The export leaves out comments, attachments, done state of checklist items,
spent time, archived cards, and custom fields other than those named above.
The export writes the spent hours as Time Spent (milliseconds). It leaves
out comments, attachments, done state of checklist items and archived cards.
## REST API
@@ -9,7 +9,9 @@ server its swimlane, and the messages the card's comments.
1. Export the channel with DiscordChatExporter in the **JSON** format.
2. In WeKan, go to **All Boards → New → Import → Discord (DiscordChatExporter)**.
3. Choose the `.json` file, or paste its text.
3. Choose the `.json` file, or paste its text - or, when DiscordChatExporter
ran with `--media` (the attachments downloaded beside the JSON), zip the
folder with the `.json` and its `_Files` folder and choose the `.zip`.
4. Map the authors to WeKan members, or leave them as they are.
5. Click **Import**.
@@ -49,9 +51,26 @@ replies are imported; pins, joins and other system messages are not.
Channel name and topic, category, server, messages with author, nickname and time.
## Replies
A reply, found by its `reference`, is a reply to the comment of the message it answers,
one level deep as WeKan's replies are: a reply to a reply goes under the same
comment. A reply to a message that is not in the file is a comment of its own,
starting with "↳".
## Reactions
A message's reactions become the comment's reactions, read from the emoji itself.
WeKan keeps a reaction by who reacted, so a reaction is kept for each person
mapped to a WeKan user in the members step. The loss report counts the
reactions of people who were not mapped, and those with an emoji WeKan cannot
store: a shortcode WeKan does not know, a server's or a chat's own emoji, or an
emoji of several code points (a skin tone, a flag). See
`models/lib/importedReactions.js`.
## What is not kept
Attachments and stickers (counted), embeds, reactions. What was left out is listed in the import's loss report, also in
Attachments that are only links (not downloaded with `--media`) and stickers (counted), embeds, a server's own emoji reactions. An attachment the zipped folder carries is an attachment of the channel's card. What was left out is listed in the import's loss report, also in
**Admin Panel → Problems → Recovery**.
## REST API
@@ -1,7 +1,7 @@
# Import / Export with other tools
WeKan imports boards from, and exports boards to, more than fifty formats and
tools. You use them from the existing menus:
WeKan imports boards from 78 sources and exports boards to some sixty formats
and tools. You use them from the existing menus:
- **Import**: **All Boards → New → Import**, then pick the tool. The import
page says where in that tool to get the file. Choose the file, or paste its
@@ -13,6 +13,14 @@ tools. You use them from the existing menus:
Spreadsheets and tables, Text and outlines, Mail, calendars, chats and
notes, and Fetched from a service - from one table,
`models/lib/toolGroups.js`, so a tool is in the same group on both.
- A company with more than one product there has a heading of its own, right
after WeKan, and its products are listed under it without the company's
name in front: **37signals** (Basecamp, Fizzy), **Atlassian** (Trello,
Jira), **Google** (Takeout, Tasks, Keep) and **Microsoft** (Planner, To Do,
Azure DevOps Boards, Lists, Project, Outlook, Teams, OneNote, Excel,
GitHub). A company with one product stays under the heading of its kind.
- **Sandstorm** is a heading of the same kind, after Microsoft: the apps whose
grain backups WeKan reads and writes (see [Sandstorm](./Sandstorm/Sandstorm.md)).
- **Rules and workflows**: **Board Settings → Rules → Import / Export rules**
(see [Rules](../../../Rules/Rules/Rules.md#import--export)).
@@ -42,6 +50,7 @@ sources of the format.
| [Linear](./Linear/Linear.md) | Issues CSV export | Linear CSV |
| [Notion](./Notion/Notion.md) | *Markdown & CSV* export `.zip`, or one database CSV | Notion database CSV |
| [Redmine](./Redmine/Redmine.md) | Issues list *Also available in: CSV* | Redmine issues CSV |
| [Fizzy](./Fizzy/Fizzy.md) | Account export or personal data export `.zip`, or one card's `.json` | Fizzy account export `.zip` (its account import reads it) |
| [Plane](./Plane/Plane.md) | Workspace Settings → Exports `.zip` (CSV, JSON or XLSX inside), or one file from it | — (Plane has no file import) |
| [Taiga](./Taiga/Taiga.md) | Project export (dump) JSON | Taiga project dump JSON, with sprints |
| [Pivotal Tracker](./Pivotal-Tracker/Pivotal-Tracker.md) | Stories CSV | Pivotal Tracker CSV |
@@ -61,6 +70,10 @@ sources of the format.
| [OpenProject](./OpenProject/OpenProject.md) | Work packages (`GET /api/v3/work_packages`) | OpenProject work packages JSON, with versions |
| [Planka](./Planka/Planka.md) | Fetched from its API with your address, username and password | — |
| [Microsoft To Do](./Microsoft-To-Do/Microsoft-To-Do.md) | Fetched from Microsoft Graph with your access token | — |
| [Azure DevOps Boards](./Azure-DevOps/Azure-DevOps.md) | A query's *Export to CSV* (a tree query keeps parents) | The CSV *Import from CSV* reads |
| [Microsoft Lists](./Microsoft-Lists/Microsoft-Lists.md) | A list's *Export to CSV* | The CSV *New list → From CSV* reads |
| [Microsoft Project (XML)](./Microsoft-Project/Microsoft-Project.md) | *Save As → XML Format* (MSPDI) | Project XML that *File → Open* reads |
| [Microsoft OneNote](./Microsoft-OneNote/Microsoft-OneNote.md) | Fetched from Microsoft Graph with your access token | OneNote pages `.zip` (Graph's create-page XHTML) |
| [KanbanFlow](./KanbanFlow/KanbanFlow.md) | Fetched from its API with the board's API token | — |
| [Basecamp](./Basecamp/Basecamp.md) | Fetched from its API with your account ID and access token: card tables and to-do lists | — |
| [Google Tasks](./Google-Tasks/Google-Tasks.md) | Fetched from its API with your access token | — |
@@ -104,8 +117,45 @@ card, its messages the comments), and dated items in Calendar and Gantt.
| [Telegram](./Telegram/Telegram.md) | Telegram Desktop's JSON export `result.json` | — |
| [WhatsApp](./WhatsApp/WhatsApp.md) | *Export chat* `.txt` | — |
| [Discord (DiscordChatExporter)](./Discord/Discord.md) | DiscordChatExporter JSON | — |
| [Rocket.Chat](./Rocket-Chat/Rocket-Chat.md) | "Download my data" as JSON `.zip`, one room's `.json`, or a CSV importer `.zip` | Rocket.Chat CSV importer `.zip` |
| [Microsoft Outlook (.msg)](./Microsoft-Outlook/Microsoft-Outlook.md) | `.msg` files, or a `.zip` of `.msg` and `.eml` files | Microsoft Outlook (.eml) `.zip` |
| [Microsoft Teams](./Microsoft-Teams/Microsoft-Teams.md) | Fetched from Microsoft Graph, the personal export `.tar`, or Graph chat messages `.json` | Teams chats as Graph chat messages `.json` |
| [Evernote (.enex)](./Evernote/Evernote.md) | Notes export `.enex` | Evernote (.enex) |
## Website
| Tool | Import | Export |
| --- | --- | --- |
| [WordPress (.xml)](./Website/Website.md) | Tools → Export (WXR) `.xml` | WordPress (.xml) |
| [WordPress REST API (.json)](./Website/Website.md) | `/wp-json/wp/v2/posts` and `/pages` `.json` | WordPress REST API (.json) |
| [Ghost](./Website/Website.md) | Settings → Labs → Export `.json` | Ghost |
| [Blogger (.xml)](./Website/Website.md) | Settings → Back up content `.xml` | Blogger (.xml) |
| [Hugo, Jekyll, Eleventy, Astro (.zip)](./Website/Website.md) | The site's Markdown sources `.zip` | Hugo, Jekyll, Eleventy, Astro (.zip) |
| [HTML website, Medium (.zip)](./Website/Website.md) | The site's `.html` files `.zip`, or Medium's export | HTML website (.zip) |
| [Substack (.zip)](./Website/Website.md) | Settings → Exports `.zip` | — |
## Sandstorm
[Sandstorm](https://sandstorm.org) apps' grain backups: under the heading
**Sandstorm** on both the import page and the export menu. Rocket.Chat, Text
Editor, SandForms and Piwik keep their data in MongoDB's or MySQL's own files
and are not read.
| App | Import | Export |
| --- | --- | --- |
| [Sandstorm WeKan](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | — (import only) |
| [Sandstorm Prioritize](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm Prioritize grain backup `.zip` |
| [Sandstorm Yet Another TODO list](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm Yet Another TODO list grain backup `.zip` |
| [Sandstorm μTodo](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm μTodo grain backup `.zip` |
| [Sandstorm SandChat](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm SandChat grain backup `.zip` |
| [Sandstorm EtherCalc](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm EtherCalc grain backup `.zip` |
| [Sandstorm Radicale calendar](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm Radicale calendar grain backup `.zip` |
| [Sandstorm Radicale address book](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm Radicale address book grain backup `.zip` |
| [Sandstorm Davros](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm Davros grain backup `.zip` |
| [Sandstorm Hacker CMS](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | Sandstorm Hacker CMS grain backup `.zip` |
| [Sandstorm Gogs](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | — (import only) |
| [Sandstorm WordPress](./Sandstorm/Sandstorm.md) | The grain backup `.zip` (Download backup) | — (import only) |
## WeKan's own formats and documents
| Format | Import | Export |
@@ -155,8 +205,8 @@ never held whole in the browser or in the server's memory on the way:
that reason, and its partial file is removed;
- with no limit set, an import may be as large as the free disk space lets it
finish;
- a `.zip` export (Slack, Google Takeout, Vikunja, Notion, Plane) is opened from
the disk, its entries read as they are needed, and what they inflate to is
- a `.zip` export (Slack, Google Takeout, Vikunja, Notion, Plane, Rocket.Chat,
Fizzy) is opened from the disk, its entries read as they are needed, and what they inflate to is
counted against the limit or the free space; a mailbox is read a message at
a time, also inside a Takeout zip;
- JSON is built from the file a chunk at a time (`server/lib/streamJson.js`),
@@ -0,0 +1,119 @@
# Fizzy
WeKan imports a board from [Fizzy](https://github.com/basecamp/fizzy), the
kanban tool of 37signals, and exports a board as the account export Fizzy's own
account import reads.
## How to import
1. In Fizzy, export either:
- the whole account: **Account settings → Export** (admins and owners), or
- your own cards: your profile → **Download my data**.
Fizzy e-mails a link to the `.zip`.
2. In WeKan, go to **All Boards → New → Import → Fizzy**.
3. Choose the `.zip`, or one card's `.json` from the personal export, or paste
that file's text.
4. Map the people to WeKan members, or leave them as they are.
5. Click **Import**.
## How to import many boards at once
1. On the import page, choose **Fizzy**, then under **Import many boards**
choose several files.
2. Each file becomes its own board. The boards are imported without member
mapping; members can be mapped later.
Fizzy is imported through the generalized importer
(`models/kanboardCreator.js`), so the page also has the checkbox **One board
per project**: each Fizzy board becomes a WeKan board of its own.
From a script:
```bash
python3 api.py importboardsfrom fizzy FILE_OR_DIR ...
```
## How to export
1. Open the board, then **Board Settings → Export**, and choose **Fizzy**. The
board downloads as `<board>.zip`.
2. In Fizzy, make a new account from the zip with its account import
(**Import** when signing up an account, or `script/import-account` on a
server you run).
Each swimlane is a Fizzy board (a board with one swimlane is one Fizzy board
named after it), each list a column in the board's order, and the lists named
**Maybe?**, **Not now** and **Done** are Fizzy's own places of the same names.
An archived card is closed (Done). The account is named after the board. The
people are users of the new account with no e-mail address, so the import never
joins them to existing accounts; every user can open every board.
## How to export all boards at once
1. In WeKan, go to **All Boards**, open the sidebar and choose **Export all
boards**, then **Fizzy**.
2. One `.zip` downloads, with one Fizzy account export per board you can export.
From a script:
```bash
python3 api.py exportallboards fizzy boards.zip
```
## Format details
The account export (`app/models/account/data_transfer/*` in Fizzy) holds a row
of each table as `data/<table>/<id>.json` with every column of
`db/schema.rb`, `data/account.json`, the users as `data/users/<id>.json`, rich
text as `data/action_text_rich_texts/<id>.json` and the uploaded files as
`storage/<blob key>`. Ids are UUIDv7 written in base36, 25 characters. The
personal data export (`Card::Exportable`) holds `<number>.json` per card -
number, title, board, status, creator, description (HTML), dates and comments -
and its files under `<number>/<blob key>_<filename>`
(`models/lib/fizzyFormat.js`, `server/lib/fizzyArchive.js`).
A Fizzy board becomes a swimlane; its columns become lists in their position
order, after **Maybe?** (cards not yet triaged into a column) and before
**Not now** (postponed) and **Done** (closed) - the status names Fizzy itself
exports.
## What is kept
Boards, columns, cards with title, description, created date and due date,
tags as labels, assignees as the card's members, the creator as "requested by",
steps as the checklist **Steps**, comments by their author at their time, a
golden card as the colour gold, and the files in a description or a comment
(and a card's image) as attachments.
## What is not kept
Drafts never published (counted), reactions, watchers and pins (counted), and
boosts, events, notifications, webhooks and column colours. On export: users'
e-mail addresses, attachments, and a card's other dates. What was left out is
listed in the import's loss report, also in **Admin Panel → Problems →
Recovery**.
## REST API
- Import: `POST /api/boards/import/fizzy` with one card's `.json` text, or a
`.zip` as `{ "zipBase64": "..." }`.
- Export: `GET /api/boards/:boardId/export/fizzy`.
## How it is built and tested
`tests/fizzyFormat.test.cjs` reads an account export with columns out of
order, a triaged, an untriaged, a closed, a postponed and a draft card, tags,
assignments, steps, a comment, an embedded file and a missing one; reads a
personal data export with its files; refuses what is not a Fizzy export and a
file path outside a card's folder; and exports a board, checks every row has
every column Fizzy's import requires, is named by its id and names only users
of the export, and reads it back. The Playwright round trip
(`tests/playwright/specs/export-import-round-trip.e2e.js`) sends it through the
server.
## Sources
- [Fizzy source](https://github.com/basecamp/fizzy)
- [Fizzy account data transfer](https://github.com/basecamp/fizzy/tree/main/app/models/account/data_transfer)
- [Fizzy card export](https://github.com/basecamp/fizzy/blob/main/app/models/card/exportable.rb)
- [Fizzy exports API](https://github.com/basecamp/fizzy/blob/main/docs/api/sections/exports.md)
@@ -129,7 +129,9 @@ metadata and label colors are not imported.
The export (`forgejo` in `models/lib/externalExportFormatters.js`) is the same
as GitHub's: for each card that is not archived, `title`, `body`, `state`
(`closed` when the list name contains done, closed, complete, archiv or
finished, otherwise `open`), `labels` (as `{ "name": ... }`) and `due_date`.
finished, otherwise `open`), `labels` (as `{ "name": ... }`), `due_date`, the
owner as `assignee` (and `assignees`), the creator as `user`, `created_at`,
`closed_at` for a closed issue, and a **Time estimate (hours)** custom field as `time_estimate` (seconds).
## What is kept
@@ -142,6 +144,8 @@ finished, otherwise `open`), `labels` (as `{ "name": ... }`) and `due_date`.
| `state_reason` other than completed | Label `state_reason:...` |
| `milestone.title` | Label `milestone:...` |
| `milestone.due_on`, else `due_date` | Due date |
| `created_at`, and `closed_at` of a closed issue | Created and end dates |
| `time_estimate` (seconds, Gitea 1.23 and later) | Custom field **Time estimate (hours)** |
| First of `assignees` (`assignee`) | Owner, when mapped to a WeKan user |
| Other assignees | Labels `assignee:...` |
| `user.login` | Requested By |
@@ -59,6 +59,13 @@ page or a format in the export menu has no page here.
| [Gitea](./Gitea/Gitea.md) | yes | yes |
| [Forgejo](./Forgejo/Forgejo.md) | yes | yes |
| [Microsoft Planner](./Microsoft-Planner/Microsoft-Planner.md) | yes | yes |
| [Azure DevOps Boards](./Azure-DevOps/Azure-DevOps.md) | yes | yes |
| [Microsoft Lists](./Microsoft-Lists/Microsoft-Lists.md) | yes | yes |
| [Microsoft Project](./Microsoft-Project/Microsoft-Project.md) | yes | yes |
| [Microsoft Outlook](./Microsoft-Outlook/Microsoft-Outlook.md) | yes | yes |
| [Microsoft Teams](./Microsoft-Teams/Microsoft-Teams.md) | yes | yes |
| [Microsoft OneNote](./Microsoft-OneNote/Microsoft-OneNote.md) | yes | yes |
| [Sandstorm grain backups](./Sandstorm/Sandstorm.md) | yes | yes (not WeKan, Gogs, WordPress) |
| [monday.com](./monday-com/monday-com.md) | yes | yes |
| [Wrike and Wrike workflow](./Wrike/Wrike.md) | yes | yes |
| [Teamwork.com](./Teamwork/Teamwork.md) | yes | yes |
@@ -67,6 +74,7 @@ page or a format in the export menu has no page here.
| [Linear](./Linear/Linear.md) | yes | yes |
| [Notion](./Notion/Notion.md) | yes | yes |
| [Redmine](./Redmine/Redmine.md) | yes | yes |
| [Fizzy](./Fizzy/Fizzy.md) | yes | yes |
| [Plane](./Plane/Plane.md) | yes | — |
| [Taiga](./Taiga/Taiga.md) | yes | yes |
| [Pivotal Tracker](./Pivotal-Tracker/Pivotal-Tracker.md) | yes | yes |
@@ -100,7 +108,9 @@ page or a format in the export menu has no page here.
| [Telegram](./Telegram/Telegram.md) | yes | — |
| [WhatsApp](./WhatsApp/WhatsApp.md) | yes | — |
| [Discord](./Discord/Discord.md) | yes | — |
| [Rocket.Chat](./Rocket-Chat/Rocket-Chat.md) | yes | yes |
| [Evernote](./Evernote/Evernote.md) | yes | yes |
| [Website](./Website/Website.md) | yes | yes |
The [overview](./External-Tools.md) groups them by kind.
@@ -149,7 +149,9 @@ creation or close dates, relationships or events.
The export (`models/lib/externalExportFormatters.js`, `githubLike`) writes, for
each card that is not archived: `title`, `body` (the description), `state`
(`closed` when the list name contains done, closed, complete, archiv or
finished, otherwise `open`), `labels` (as `{ "name": ... }`) and `due_date`.
finished, otherwise `open`), `labels` (as `{ "name": ... }`), `due_date`, the
owner as `assignee` (and `assignees`), the creator as `user`, `created_at`,
`closed_at` for a closed issue.
GitHub has no `due_date` field; WeKan reads it back when the file is imported
again.
@@ -164,6 +166,8 @@ again.
| `state_reason` other than completed | Label `state_reason:...` |
| `milestone.title` | Label `milestone:...` |
| `milestone.due_on`, else `due_date` | Due date |
| `created_at`, and `closed_at` of a closed issue | Created and end dates |
| `type.name` (GitHub's issue types: Bug, Feature, Task, or the organization's own) | Label `type:<name>` |
| First of `assignees` (`assignee`) | Owner, when mapped to a WeKan user |
| Other assignees | Labels `assignee:...` |
| `user.login` | Requested By |
@@ -167,8 +167,8 @@ each card that is not archived: `title`, `description`, `state` (`closed` when
the list name contains done, closed, complete, archiv or finished, otherwise
`opened`), `labels` (names), `due_date`, and, when the parts are ticked,
`assignees` (owner first), `author`, `created_at`, `closed_at` (closed items
only), comments as `notes`, and the sprint and release as `iteration` and
`milestone`. It writes no `iid`, so importing the file again does not add a
only), comments as `notes`, the spent hours as `time_stats.total_time_spent`
(seconds), and the sprint and release as `iteration` and `milestone`. It writes no `iid`, so importing the file again does not add a
second `Source:` line.
## What is kept
@@ -182,6 +182,8 @@ second `Source:` line.
| `milestone` | Scrum release, and label `milestone:...` |
| `iteration` | Scrum sprint, and label `iteration:...` |
| `issue_type` other than issue | Label `type:...` |
| `health_status` (on_track, needs_attention, at_risk) | Label `health:...` |
| `severity` of an incident (not UNKNOWN) | Label `severity:...` |
| `confidential` | Label `confidential`, and a warning |
| `due_date`, else `milestone.due_date` | Due date |
| `created_at` | Creation date |
@@ -129,7 +129,9 @@ metadata and label colors are not imported.
The export (`gitea` in `models/lib/externalExportFormatters.js`) is the same
as GitHub's: for each card that is not archived, `title`, `body`, `state`
(`closed` when the list name contains done, closed, complete, archiv or
finished, otherwise `open`), `labels` (as `{ "name": ... }`) and `due_date`.
finished, otherwise `open`), `labels` (as `{ "name": ... }`), `due_date`, the
owner as `assignee` (and `assignees`), the creator as `user`, `created_at`,
`closed_at` for a closed issue, and a **Time estimate (hours)** custom field as `time_estimate` (seconds).
## What is kept
@@ -142,6 +144,8 @@ finished, otherwise `open`), `labels` (as `{ "name": ... }`) and `due_date`.
| `state_reason` other than completed | Label `state_reason:...` |
| `milestone.title` | Label `milestone:...` |
| `milestone.due_on`, else `due_date` | Due date |
| `created_at`, and `closed_at` of a closed issue | Created and end dates |
| `time_estimate` (seconds, Gitea 1.23 and later) | Custom field **Time estimate (hours)** |
| First of `assignees` (`assignee`) | Owner, when mapped to a WeKan user |
| Other assignees | Labels `assignee:...` |
| `user.login` | Requested By |
@@ -90,7 +90,7 @@ The parser (`models/lib/googletasksApiFormat.js`):
| `due` | Due date |
| `status: completed` | Archived card |
| `completed` | End date |
| Subtasks (`parent`) | Checklist "Subtasks", done = completed |
| Subtasks (`parent`) | Checklist "Subtasks", done = completed, with the subtask's due date |
| `position` | Card and checklist item order |
| Hidden (cleared) completed tasks | Archived cards |
@@ -99,8 +99,8 @@ The parser (`models/lib/googletasksApiFormat.js`):
The import reports these on the loss report:
- deleted tasks (`deleted: true`), counted per list;
- the notes, due date and links of a subtask: a checklist item has only a
title and a done mark;
- the notes and links of a subtask: a checklist item has a title, done, a due
date and an assignee;
- a subtask whose parent is missing (it becomes its own card);
- a due date that is not a date;
- a second list with the same title (it is imported as `<title> (2)`);
@@ -94,7 +94,9 @@ What the current code does:
- `responsibleUserId` is the owner and `collaborators` are further
assignees, both by the user's full name (or e-mail without one), mapped to
WeKan members on the members step.
- `subTasks` become a checklist **Subtasks**, `finished` = done.
- `subTasks` become a checklist **Subtasks**, `finished` = done, a subtask's
`dueDate` the item's due date and its `userId` the item's assignee (when
mapped).
- Comments keep their author and date.
- The task id is the source reference.
- Limits: 20,000 tasks; comments are fetched for the first 5,000 tasks
@@ -117,7 +119,7 @@ What the current code does:
| `totalSecondsEstimate` | Custom field "Estimate (hours)" |
| `responsibleUserId` | Card member (owner) |
| `collaborators` | Card members |
| `subTasks` (`name`, `finished`) | Checklist "Subtasks" |
| `subTasks` (`name`, `finished`, `dueDate`, `userId`) | Checklist "Subtasks", with each item's due date and assignee |
| Comments | Comments, with author and date |
## What is not kept
@@ -126,7 +128,7 @@ The import reports these on the loss report:
- the column a due date is tied to (`targetColumnId`): WeKan keeps the date;
- every due date after the first;
- a subtask's own person and due date;
- a subtask due date that is not a date;
- a color that is not one of KanbanFlow's ten;
- a due date that is not a date;
- a task in a column the board does not have, and tasks that are not objects;
@@ -121,8 +121,9 @@ From the [format coverage](../Format-Coverage.md) audit:
creation dates, archive state, colors and source order are kept. Creation
dates survive the schema's `createdAt` autoValue through
`writeImportedEntity`. What has no equivalent is listed in the loss report:
file contents (the JSON carries attachment metadata only), time estimates,
external links, and task links WeKan cannot keep (see below).
file contents (the JSON carries attachment metadata only), a repeat other
than every 1 day, 7 days or 1 month, and task links WeKan cannot keep (see
below).
What the current code does (`parseKanboard` in
`models/lib/externalParsers.js`, `models/kanboardCreator.js`):
@@ -175,8 +176,12 @@ What the current code does (`parseKanboard` in
| `owner_username` (or `assignee_username`, `owner_id`, `owner_name`) | Card member, when mapped |
| `creator_username` (or `creator_name`) | Requested by |
| `tags`, category, `priority` | Board labels |
| `color_id` | Card color |
| `color_id` | Card color, written back on export |
| `time_spent` | Spent time (hours) |
| `time_estimated` | Custom field **Time estimate (hours)** |
| `score`, `reference` | Custom fields **Score** and **Reference** |
| `recurrence_status`, `recurrence_factor`, `recurrence_timeframe`: every 1 day, 7 days or 1 month | The card repeats daily, weekly or monthly |
| `external_links` (`url`, `title`) | A line each at the end of the description |
| `is_active` `0` | Archived card |
| `subtasks` (`title`, `status`) | Checklist **Subtasks** |
| `links` "is a child of" / "is a parent of" | The card's parent card |
@@ -189,7 +194,10 @@ each card: an `id` (1, 2, 3 ... in card order), `title`, `description`,
`column_name`, `swimlane_name`, `date_due`, `date_started`, `date_completed`,
`date_creation`, `owner_username`, `creator_username`, the labels as `tags`,
every checklist item as a `subtasks` entry (status `2` when finished, `0`
otherwise), the comments, and the card's parent and dependencies as `links`
otherwise), the comments, `time_spent`, a repeating open card's
`recurrence_status`, `recurrence_factor` and `recurrence_timeframe`, the
custom fields **Time estimate (hours)**, **Score** and **Reference** as
`time_estimated`, `score` and `reference`, and the card's parent and dependencies as `links`
in the `getAllTaskLinks` shape (`{ "id", "task_id", "label" }`, `task_id`
being the other task). Like Kanboard, each link is written from both tasks,
the second time with the opposite label, and the import folds the two back
@@ -200,10 +208,9 @@ when **Dependencies** is.
The import reports these on the loss report:
- `time_estimated` (WeKan cards have no estimate field; map it to a custom
field by hand);
- `files` (the API export carries metadata, not file contents);
- `external_links` (links to web pages and other systems are not imported);
- a repeat other than every 1 day, 7 days or 1 month (the task is imported
once);
- task links to a task that is not in the file;
- task links whose label is not one of Kanboard's built-in link types
(a link type added in Kanboard's settings);
@@ -93,6 +93,11 @@ What the current code does (`models/lib/leoOutline.js`):
- The outline is the `<v t="gnx">` nodes under `<vnodes>`. A node's body is
the `<t tx="gnx">` under `<tnodes>` with the same id. A node marked in Leo
carries `a="M"`.
- Leo stamps a node's id with the time it was made (`ekr.20260902080910.2`);
that time is the card's creation date. Leo writes it in local time with no
zone, so it is read as UTC.
- Any other attribute of a `<v>` or `<t>` is a Leo plugin's own data (its
"unknown attributes", pickled Python), and is reported.
- A level 3 node with children is a checklist named after it; all its
descendants, at any depth, are the items. Level 3 nodes without children
are the items of one checklist named after the card.
@@ -113,7 +118,8 @@ What the export writes (`models/lib/leoOutlineFormat.js`):
- each list as a top-level node, including lists without cards;
- each card as a child node, with its description as the body, marked when
its list's name looks finished (contains "done", "closed", "complete",
"archiv" or "finished");
"archiv" or "finished"), and its creation time in its id
(`wekan.YYYYMMDDHHMMSS.n`);
- each checklist as a child of the card, with its items as children, marked
when finished.
@@ -128,6 +134,7 @@ Archived cards and archived lists are not exported.
| Level 2 node: headline | Card title |
| Level 2 node: body | Card description |
| Level 2 node marked (`a="M"`) | Card with the label `done` |
| Level 2 node: the time in its id | Creation date |
| Level 3 node with children | Checklist, its descendants the items |
| Level 3 node without children | Item of a checklist named after the card |
| Marked item node | Finished checklist item |
@@ -137,10 +144,12 @@ Archived cards and archived lists are not exported.
The import reports these on the loss report:
- body text of a top-level (list) node: a WeKan list has no text field;
- a Leo plugin's data on a node (an attribute Leo itself does not write);
- nodes deeper than 64 levels.
The Leo export writes only lists, cards, descriptions, the done mark and
checklists. It does not write swimlanes, labels, dates, members, comments,
The Leo export writes only lists, cards, descriptions, the done mark, the
creation date and checklists. It does not write swimlanes, labels, other
dates, members, comments,
custom fields or attachments.
## REST API
@@ -97,10 +97,16 @@ What the import covers:
- `, `-separated labels;
- the created, started, completed (or canceled) and due dates;
- Archived as an archived card;
- Priority, Estimate, Project and Cycle (and Canceled) as custom fields.
- Priority, Estimate, Project and Cycle (and Canceled) as custom fields;
- with Scrum ticked in the import, each cycle as a Scrum sprint with its Cycle
Start and Cycle End, one per team (a cycle number is its team's), and each
project milestone as a Scrum release. The CSV gives a cycle no state: one
whose issues are all done is finished and not imported, as no commitment or
close snapshot is in the export, and any other is imported as planned. A
milestone has no dates in the CSV. Both are noted in the loss report.
Reported: Updated, Triaged, the cycle's dates, Initiatives, milestones, SLA
Status, dates that are not ISO 8601, and unknown priorities. The export writes
Reported: Updated, Triaged, Initiatives, SLA Status, dates that are not ISO
8601, and unknown priorities. The export writes
Linear's columns in its order, with the formula guard.
From the current code (`models/lib/linearCsvFormat.js`):
@@ -95,8 +95,14 @@ What the current code does (`parseMarkdownKanban` in
list called "Imported".
- A line starting with `- ` or `* `, with or without `[ ]`, `[x]` or `[X]`,
is a card. `[x]` adds the label `done`.
- A line that starts with white space, under a card, is added to that card's
description. Indented bullets therefore also become description lines.
- On a card line, `#tag` words are labels (a word that starts with a letter,
so `#1234` and `C#` stay in the title), and `@{2026-12-24}` with an optional
`@@{14:30}` (Obsidian Kanban), `📅 2026-12-24` (Obsidian Tasks) or
`due:2026-12-24` (todo.txt) is the due date. A due day that is no date is
reported.
- An indented `- [ ]` / `- [x]` line under a card is an item of its checklist.
Any other line that starts with white space is added to the card's
description; `\- [ ]` there is a description line, not an item.
- Other headings (`#`, `###` and deeper, or a second `#` line) are skipped.
Any other non-blank line is reported.
- Every card goes to the swimlane Default.
@@ -108,8 +114,12 @@ What the export writes (`formatMarkdownKanban` in
lists without cards are left out.
- Each card as `- [ ] <title>`, or `- [x] <title>` when its list's name looks
finished: it contains "done", "closed", "complete", "archiv" or
"finished" (case does not matter).
- Each non-blank line of the description, indented two spaces.
"finished" (case does not matter); then its labels as `#tags` (a space
written as `-`) and its due date as `@{day}`, with `@@{time}` when it has
one.
- Each non-blank line of the description, indented two spaces, a line that
looks like a checklist item escaped as `\- [ ]`.
- Each checklist item as an indented `- [ ]` / `- [x]` line.
- Archived cards and archived lists are not exported.
## What is kept
@@ -121,6 +131,9 @@ What the export writes (`formatMarkdownKanban` in
| `- [ ] Item`, `- Item`, `* Item` | Card |
| `- [x] Item` | Card with the label `done` |
| Indented lines under an item | Card description |
| `#tag` on an item | Label |
| `@{day}` `@@{time}`, `📅 day`, `due:day` | Due date |
| Indented `- [ ]` / `- [x]` under an item | Checklist item |
## What is not kept
@@ -129,10 +142,12 @@ heading, a card or an indented line under a card (for example a numbered list
item, or text before the first card). Headings other than the first `#` line
and the `##` lines are skipped.
The Markdown export writes only lists, card titles and descriptions. It does
not write swimlanes, labels (including `done`; the checkbox comes from the
list name), dates, members, comments, checklists, custom fields,
attachments, blank lines inside a description, or lists without cards.
The Markdown export writes lists, card titles, descriptions, labels, the due
date and checklist items. It does not write swimlanes, the `done` label (the
checkbox comes from the list name), a label that does not start with a
letter, other dates, members, comments, custom fields, attachments, blank
lines inside a description, or lists without cards. A card's checklists come
back as one checklist.
## REST API
@@ -66,9 +66,26 @@ messages**; a reply starts with `↳`.
Channels with header and purpose, posts and replies with author and time, teams.
## Replies
A reply, found by the post it is nested in, is a reply to the comment of the message it answers,
one level deep as WeKan's replies are: a reply to a reply goes under the same
comment. A reply to a message that is not in the file is a comment of its own,
starting with "↳".
## Reactions
A message's reactions become the comment's reactions, read from Mattermost's `emoji_name`, such as `+1` or `tada`.
WeKan keeps a reaction by who reacted, so a reaction is kept for each person
mapped to a WeKan user in the members step. The loss report counts the
reactions of people who were not mapped, and those with an emoji WeKan cannot
store: a shortcode WeKan does not know, a server's or a chat's own emoji, or an
emoji of several code points (a skin tone, a flag). See
`models/lib/importedReactions.js`.
## What is not kept
Attachments (counted), reactions, emoji, users' profiles and preferences. What was left out is listed in the import's loss report, also in
Attachments (counted), custom emoji, users' profiles and preferences. What was left out is listed in the import's loss report, also in
**Admin Panel → Problems → Recovery**.
## REST API
@@ -0,0 +1,101 @@
# Microsoft Lists
WeKan imports a list from [Microsoft Lists](https://www.microsoft.com/microsoft-365/microsoft-lists)
(and SharePoint lists), and exports a board as a CSV file Lists makes a new list
from.
## How to import
1. In Microsoft Lists, open the list, choose the view whose columns you want,
and choose **Export → Export to CSV** (or **Export to CSV with schema**).
2. In WeKan, go to **All Boards → New → Import → Microsoft Lists**.
3. Choose the `.csv` file, or paste its text.
4. Map the people to WeKan members, or leave them as they are.
5. Click **Import**.
## How to import many boards at once
1. On the import page, choose **Microsoft Lists**, then under **Import many boards**
choose several files.
2. Each file becomes its own board. The boards are imported without member
mapping; members can be mapped later.
Microsoft Lists is imported through the generalized importer
(`models/kanboardCreator.js`), so the page also has the checkbox **One board
per project**.
From a script:
```bash
python3 api.py importboardsfrom mslists FILE_OR_DIR ...
```
## How to export
1. Open the board, then **Board Settings → Export**, and choose **Microsoft
Lists**. The board downloads as `<board>.csv`.
2. In Microsoft Lists, choose **New list → From CSV** and choose the file.
Make **Status** a Choice column, and the list's board view groups the items
by it - as the board's lists.
The columns are Title, Status (the card's list), Assigned to (the owner and
assignees), Start date and Due date (YYYY-MM-DD), Tags (the labels), Description
and a column per custom field of the board, its name without the characters
Lists does not allow in a column name.
## How to export all boards at once
1. In WeKan, go to **All Boards**, open the sidebar and choose **Export all
boards**, then **Microsoft Lists**.
2. One `.zip` downloads, with one `.csv` per board you can export.
From a script:
```bash
python3 api.py exportallboards mslists boards.zip
```
## Format details
Export to CSV writes the view's columns by their display names, Title first in
most lists; a Person column is the display name (with schema: the address),
several people or choices are joined with `;` (older SharePoint `;#`), a Yes/No
column is TRUE or FALSE, and dates are in the user's regional format or, with
schema, ISO 8601 (`models/lib/msListsCsvFormat.js`,
`models/lib/microsoftCsvDates.js`). The board view of a list groups its items
by a Choice column; WeKan takes the first of Status, Progress, Stage, State,
Bucket or Board column as the lists.
## What is kept
Items as cards in the lists of their Status (or Progress, ...) column, Title,
Description (or Notes, Details, Comments), Assigned to (or Owner, Assignee) as
the owner and assignees, Created By as "requested by", the start, due, created
and completed dates, Tags (or Category, Labels) as labels, ID as the card's
reference, and every other column as a custom field (Yes/No as true or false).
## What is not kept
SharePoint's own columns - Modified, Modified By, Item Type, Path, Content
Type, Version, Attachments, Compliance Asset Id and the retention labels - are
reported. Attachments, comments and the list's formatting are not in the CSV.
On export: comments, checklists and attachments. What was left out is listed in the import's loss report, also in
**Admin Panel → Problems → Recovery**.
## REST API
- Import: `POST /api/boards/import/mslists` with the CSV text.
- Export: `GET /api/boards/:boardId/export/mslists`.
## How it is built and tested
`tests/msListsCsv.test.cjs` reads the Issue tracker template's export with
several people and dates, the Work progress tracker's Progress column with
`;#` people and a Yes/No column, writes a board with custom fields and reads it
back, and refuses a file without items.
## Sources
- [Export to Excel from SharePoint or Lists](https://support.microsoft.com/office/export-to-excel-from-sharepoint-or-lists-bfb2ea48-6118-4fa9-abb6-cced9424e5d9)
- [Create a list based on a spreadsheet](https://support.microsoft.com/sharepoint/lists/data-and-lists/create-a-list-based-on-a-spreadsheet)
- [Create a list from CSV and export to CSV with schema](https://supersimple365.com/new-in-microsoft-lists-create-a-list-from-csv-and-export-to-csv/)
@@ -0,0 +1,104 @@
# Microsoft OneNote
WeKan imports a notebook of [Microsoft OneNote](https://www.microsoft.com/microsoft-365/onenote),
fetched from Microsoft Graph, and exports a board as OneNote pages.
## How to import
1. In Microsoft Graph Explorer (developer.microsoft.com/graph/graph-explorer),
sign in, consent to the **Notes.Read** permission and copy the token from the
**Access token** tab.
2. In WeKan, go to **All Boards → New → Import → Microsoft OneNote**, paste the
token and click **List**. The token is used for this fetch only and is not
stored.
3. Choose a notebook and click **Fetch**, then **Import**.
The `.zip` WeKan exports for OneNote, or the JSON a fetch returns, can be
chosen as a file instead.
## How to import many boards at once
1. On the import page, choose **Microsoft OneNote**, then under **Import many boards**
choose several files.
2. Each file becomes its own board. The boards are imported without member
mapping; members can be mapped later.
Microsoft OneNote is imported through the generalized importer
(`models/kanboardCreator.js`), so the page also has the checkbox **One board
per project**.
From a script:
```bash
python3 api.py importboardsfrom onenote FILE_OR_DIR ...
```
## How to export
1. Open the board, then **Board Settings → Export**, and choose **Microsoft
OneNote**. The board downloads as `<board>.zip`.
2. The `.zip` has a page per card under `<notebook>/<section>/`, each in the
XHTML Graph's **create page** takes (`POST /me/onenote/sections/{id}/pages`),
so a script can send them to a section; `onenote.json` beside them is the
same notebook in the shape WeKan reads back.
A list is a section, a card a page: its title, created time, description as
paragraphs and checklist items as to-do boxes, ticked when done; a subtask is a
subpage of its parent.
## How to export all boards at once
1. In WeKan, go to **All Boards**, open the sidebar and choose **Export all
boards**, then **Microsoft OneNote**.
2. One `.zip` downloads, with one `.zip` per board you can export.
From a script:
```bash
python3 api.py exportallboards onenote boards.zip
```
## Format details
Graph lists the notebooks (`/me/onenote/notebooks`), their sections and each
section's pages (title, level, order, createdDateTime); a page's content is its
HTML (`/me/onenote/pages/{id}/content`): a `<title>`, `<meta name="created">`,
then outlines of paragraphs, lists and tables, `<img>` and `<object>` for
files, and a note tag as `data-tag` on an element - `to-do` an open to-do box,
`to-do:completed` a ticked one (`models/lib/onenoteApiFormat.js`,
`models/lib/apiImport/onenote.js`).
## What is kept
Sections as lists, pages as cards in their order, the page's text as the
description, its to-do boxes as the checklist **To-do**, a subpage (level 1 or
2) as a subtask of the page above it, and the page's created time. A board with
several notebooks would have one swimlane per notebook.
## What is not kept
Images and files on a page (counted), note tags other than to-do, ink,
formatting and the page's layout. On export: comments, labels, dates other than
the created time and attachments. What was left out is listed in the import's loss report, also in
**Admin Panel → Problems → Recovery**.
## REST API
- Import: `POST /api/boards/import/onenote` with the JSON, or `{ "zipBase64": "..." }` for the `.zip`.
- Export: `GET /api/boards/:boardId/export/onenote`.
## How it is built and tested
`tests/onenoteApiImport.test.cjs` reads a page as Graph answers it - with
to-do boxes, another note tag, an image and a file - with a subpage and an
empty page; writes a board as pages and reads `onenote.json` back; reads the
exported `.zip`; fetches through the API client from a fake Graph; and refuses
data that is not a fetch, a next link to another host and a path the export
does not write.
## Sources
- [OneNote API overview](https://learn.microsoft.com/graph/integrate-with-onenote)
- [Get OneNote content and structure](https://learn.microsoft.com/graph/onenote-get-content)
- [Create OneNote pages](https://learn.microsoft.com/graph/onenote-create-page)
- [Use note tags in OneNote pages](https://learn.microsoft.com/graph/onenote-note-tags)
@@ -0,0 +1,102 @@
# Microsoft Outlook
WeKan imports mail saved from [Microsoft Outlook](https://www.microsoft.com/microsoft-365/outlook)
as `.msg` files, and exports a board as `.eml` messages Outlook opens. The mail
shows in **Board View → Email**.
## How to import
1. In Outlook (classic), drag a message to a folder on your computer, or choose
**File → Save As** with the type **Outlook Message Format (\*.msg)**. Put
several in a `.zip` to import them together; `.eml` files may be in the same
`.zip`.
2. In WeKan, go to **All Boards → New → Import → Microsoft Outlook (.msg)**.
3. Choose the `.msg` or the `.zip` file.
4. Map the people to WeKan members, or leave them as they are.
5. Click **Import**.
## How to import many boards at once
1. On the import page, choose **Microsoft Outlook**, then under **Import many boards**
choose several files.
2. Each file becomes its own board. The boards are imported without member
mapping; members can be mapped later.
Microsoft Outlook is imported through the generalized importer
(`models/kanboardCreator.js`), so the page also has the checkbox **One board
per project**.
From a script:
```bash
python3 api.py importboardsfrom outlook FILE_OR_DIR ...
```
## How to export
1. Open the board, then **Board Settings → Export**, and choose **Microsoft
Outlook (.eml)**. The board downloads as `<board>.zip`.
2. Unpack it and open an `.eml` in Outlook, or drag the files into an Outlook
folder.
A card is a message, and each of its comments a reply to it - the messages of
the **Mail (mbox)** export, one per file. A card that came from mail keeps its
sender, recipients and Message-ID.
## How to export all boards at once
1. In WeKan, go to **All Boards**, open the sidebar and choose **Export all
boards**, then **Microsoft Outlook (.eml)**.
2. One `.zip` downloads, with one `.zip` per board you can export.
From a script:
```bash
python3 api.py exportallboards outlook boards.zip
```
## Format details
A `.msg` is a Compound File Binary file (\[MS-CFB\]): storages and streams in
512- or 4096-byte sectors chained by a FAT, with small streams in a mini stream.
The message (\[MS-OXMSG\]) is its root storage: a stream per property
(`__substg1.0_PPPPTTTT`), the fixed-size properties with the send time, a
storage per recipient and per attachment. WeKan reads it without any library
(`models/lib/outlookMsgFormat.js`): subject, sender (its SMTP address), To and
Cc, the time it was sent, the Message-ID, In-Reply-To and References, the plain
body (or the HTML body as text) and the attachments. The messages then go
through the same mail import as an `.mbox` (`models/lib/mailFormat.js`), so a
reply joins its thread.
## What is kept
Each thread as a card in the list **Inbox**: the first message's subject,
sender, recipients, time and body, the replies as comments, and the messages'
attachments as the card's files.
## What is not kept
An attachment that is itself a message (an embedded `.msg`) and an attachment
larger than 32 MB (counted); the RTF body, categories, flags and reminders.
On export: labels, checklists and attachments. What was left out is listed in the import's loss report, also in
**Admin Panel → Problems → Recovery**.
## REST API
- Import: `POST /api/boards/import/outlook` with `{ "binaryBase64": "..." }` for a `.msg`, or `{ "zipBase64": "..." }` for a `.zip`.
- Export: `GET /api/boards/:boardId/export/outlook`.
## How it is built and tested
`tests/outlookMsg.test.cjs` writes `.msg` files with a small Compound File
writer - small streams in the mini stream, a large attachment in FAT sectors -
reads them, threads a reply, reads a `.zip` of `.msg` and `.eml` files, writes
a board as `.eml` files and reads them back, and refuses a file that is not a
Compound File and one whose sector chain loops. The reader was also checked
against `.msg` files saved by Outlook.
## Sources
- [\[MS-CFB\]: Compound File Binary File Format](https://learn.microsoft.com/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b)
- [\[MS-OXMSG\]: Outlook Item (.msg) File Format](https://learn.microsoft.com/openspecs/exchange_server_protocols/ms-oxmsg/b046868c-9fbf-41ae-9ffb-8de2bd4eec82)
- [\[MS-OXPROPS\]: Exchange Server Protocols Master Property List](https://learn.microsoft.com/openspecs/exchange_server_protocols/ms-oxprops/f6ab1613-aefe-447d-a49c-18217230b148)
@@ -89,7 +89,10 @@ writes:
Columns are matched by name. The layout follows a real export: the test data
of the [plannr](https://github.com/program--/plannr) package, copied to
`tests/fixtures/planner/`.
`tests/fixtures/planner/`. The newer Planner's **Export as Excel** is described by
Microsoft's [Export a plan to Excel](https://support.microsoft.com/en-us/planner/export-a-plan-to-excel)
with Status, Task title and Assignments; those names are read as Progress,
Task Name and Assigned To.
What the import covers:
@@ -0,0 +1,106 @@
# Microsoft Project
WeKan imports a plan saved by [Microsoft Project](https://www.microsoft.com/microsoft-365/project/project-management-software)
as XML, and exports a board as a plan Project opens. ProjectLibre and
GanttProject read and write the same XML. The `.mpp` file itself is a closed
binary format and is not read.
## How to import
1. In Microsoft Project, choose **File → Save As**, and as the type **XML
Format (\*.xml)**.
2. In WeKan, go to **All Boards → New → Import → Microsoft Project (XML)**.
3. Choose the `.xml` file, or paste its text.
4. Map the people to WeKan members, or leave them as they are.
5. Click **Import**.
## How to import many boards at once
1. On the import page, choose **Microsoft Project (XML)**, then under **Import many boards**
choose several files.
2. Each file becomes its own board. The boards are imported without member
mapping; members can be mapped later.
Microsoft Project is imported through the generalized importer
(`models/kanboardCreator.js`), so the page also has the checkbox **One board
per project**.
From a script:
```bash
python3 api.py importboardsfrom msproject FILE_OR_DIR ...
```
## How to export
1. Open the board, then **Board Settings → Export**, and choose **Microsoft
Project (XML)**. The board downloads as `<board>.xml`.
2. In Microsoft Project, choose **File → Open**, and open the file as **XML
Format**.
Each swimlane is a summary task, its cards the tasks under it and their
subtasks one level further down. A task runs from the card's start to its due
date (one day when it has only one of them, from its creation when it has
neither); a card in a list named done or complete is 100 % complete, a card
with the label Milestone a milestone, the people its resources, and what blocks
a card its finish-to-start predecessors.
## How to export all boards at once
1. In WeKan, go to **All Boards**, open the sidebar and choose **Export all
boards**, then **Microsoft Project (XML)**.
2. One `.zip` downloads, with one `.xml` per board you can export.
From a script:
```bash
python3 api.py exportallboards msproject boards.zip
```
## Format details
The XML is MSPDI, the schema at `http://schemas.microsoft.com/project`:
`<Project>` with its Name and Title, `<Tasks>` with a `<Task>` per row of the
Gantt chart (UID, OutlineLevel, Summary, Milestone, Start, Finish,
ActualFinish, Duration as `PT8H0M0S`, PercentComplete, Priority 0-1000, Notes,
`<PredecessorLink>`), `<Resources>` and `<Assignments>`. Task UID 0 at outline
level 0 is the project's own summary row. WeKan reads it with a small XML
reader of its own that never resolves a DTD or an entity, so nothing in the file
can make it read another file (`models/lib/msProjectXmlFormat.js`).
## What is kept
Summary tasks at outline level 1 as swimlanes, every other task as a card
(a summary task further down is the parent card of the tasks under it), the
lists **Not started**, **In progress** and **Completed** by PercentComplete,
the start, finish (due), actual finish (end) and created dates, Notes as the
description, Milestone as a label, the assigned resources as the owner and
assignees, predecessors as "blocked by" dependencies, the UID as the card's
reference, and Priority (when not 500), the duration in hours, the percent
complete and WBS as custom fields.
## What is not kept
Calendars, baselines, extended attributes and the work and cost of
assignments; a link type other than finish-to-start is imported as blocked-by,
and a link's lag is not kept (both reported). On export: comments, checklists,
labels other than Milestone and attachments. What was left out is listed in the import's loss report, also in
**Admin Panel → Problems → Recovery**.
## REST API
- Import: `POST /api/boards/import/msproject` with the XML text.
- Export: `GET /api/boards/:boardId/export/msproject`.
## How it is built and tested
`tests/msProjectXml.test.cjs` reads a plan with phases, a milestone, a
completed task, a nested summary task, resources, assignments and links of two
types; reads Project's durations; writes a board with lanes, subtasks, people
and a dependency and reads it back; and refuses broken XML, and never expands
a DOCTYPE's entity.
## Sources
- [Microsoft Project XML schema (MSPDI)](https://learn.microsoft.com/office-project/xml-data-interchange/introduction-to-project-xml-data)
- [Project XML elements: Task](https://learn.microsoft.com/office-project/xml-data-interchange/task-element)
@@ -0,0 +1,119 @@
# Microsoft Teams
WeKan imports chats and channels of [Microsoft Teams](https://www.microsoft.com/microsoft-teams),
fetched from Microsoft Graph or from an export file, and exports a board as
Teams chats. They show in **Board View → Chat**.
## How to import
Fetch them (a work or school account):
1. In Microsoft Graph Explorer (developer.microsoft.com/graph/graph-explorer),
sign in, consent to **Chat.Read** (and, for channels, **Team.ReadBasic.All**,
**Channel.ReadBasic.All** and **ChannelMessage.Read.All**, which needs an
administrator's consent), and copy the token from the **Access token** tab.
2. In WeKan, go to **All Boards → New → Import → Microsoft Teams**, paste the
token and click **List**. The token is used for this fetch only and is not
stored.
3. Choose a chat or a channel and click **Fetch**, then **Import**.
Or choose a file:
- a personal account's export: **teams.live.com/dataexport**, choose **Chat
history**, and choose the `.tar` file it gives you (its `messages.json` is
read);
- a `.json` of Graph chat messages - one chat's or channel's messages, or the
Teams Export API's `messages_<user>.json`;
- the `.json` or `.zip` WeKan exports.
## How to import many boards at once
1. On the import page, choose **Microsoft Teams**, then under **Import many boards**
choose several files.
2. Each file becomes its own board. The boards are imported without member
mapping; members can be mapped later.
Microsoft Teams is imported through the generalized importer
(`models/kanboardCreator.js`), so the page also has the checkbox **One board
per project**.
From a script:
```bash
python3 api.py importboardsfrom teams FILE_OR_DIR ...
```
## How to export
1. Open the board, then **Board Settings → Export**, and choose **Microsoft
Teams**. The board downloads as `<board>.json`.
2. Teams has no file import: a script sends the messages with Teams' migration
API (`POST /teams/{id}/channels/{id}/messages` with the channel in migration
mode), which takes these chat messages as they are. WeKan reads the file
back.
A card is a chat, its comments the messages, each a Graph chat message with
its author, time and HTML body; the card's description, list and swimlane are
kept beside the chat.
## How to export all boards at once
1. In WeKan, go to **All Boards**, open the sidebar and choose **Export all
boards**, then **Microsoft Teams**.
2. One `.zip` downloads, with one `.json` per board you can export.
From a script:
```bash
python3 api.py exportallboards teams boards.zip
```
## Format details
A chat message of Microsoft Graph v1.0 has an id, replyToId, messageType
(`message`, the others being system events), createdDateTime, deletedDateTime,
subject, body (`contentType` and `content`, usually HTML), from (a user's id
and displayName), attachments and reactions. A chat is oneOnOne, group or
meeting; a channel message fetched with `$expand=replies` has its replies.
The personal export's `messages.json` is not documented by Microsoft; it is
read as the Skype export it shares its layout with: `conversations`, each with a
`MessageList` of `originalarrivaltime`, `messagetype`, `content` and `from`
(`models/lib/chatExportFormats.js` parseTeamsExport,
`models/lib/apiImport/teams.js`, `server/lib/microsoftArchives.js`).
## What is kept
Each chat or channel as a card in the list Direct messages (oneOnOne), Groups,
Meetings or Channels, in the swimlane of its team; its messages and replies as
comments by their author at their time, the HTML as text, a file attachment as
its name and link, and reactions.
## What is not kept
System events (calls, members joining) and deleted messages are counted, not
imported; files themselves, mentions as links, and message edits. Graph does
not serve personal Teams accounts, so their chats come from the personal
export. On export: checklists, labels and attachments. What was left out is listed in the import's loss report, also in
**Admin Panel → Problems → Recovery**.
## REST API
- Import: `POST /api/boards/import/teams` with the JSON, `{ "binaryBase64": "..." }` for a `.tar`, or `{ "zipBase64": "..." }` for a `.zip`.
- Export: `GET /api/boards/:boardId/export/teams`.
## How it is built and tested
`tests/teamsApiImport.test.cjs` reads Graph chat messages with HTML, a file, a
reaction, a system event and a deleted message; a channel with replies; the
Export API's messages of many chats; the personal export's `messages.json` from
a `.tar`; writes a board and reads it back; and fetches through the API client
from a fake Graph, every page and only from graph.microsoft.com, refusing a next
link to another host.
## Sources
- [chatMessage resource type](https://learn.microsoft.com/graph/api/resources/chatmessage)
- [List messages in a chat](https://learn.microsoft.com/graph/api/chat-list-messages)
- [List channel messages](https://learn.microsoft.com/graph/api/channel-list-messages)
- [Import third-party platform messages to Teams](https://learn.microsoft.com/microsoftteams/platform/graph-api/import-messages/import-external-messages-to-teams)
- [Export options for switching from Microsoft Teams](https://learn.microsoft.com/microsoftteams/migration-from-teams)
@@ -100,7 +100,8 @@ What the current code does (`parseNextcloudDeck` in
mark a card done with a timestamp). Either form, a date or Deck's REST API's
plain `true`, marks the card's due date done. A card without a due date has
no due date to mark, so `true` alone is not kept for it.
- Label colors are not read: labels are created black.
- A label keeps its color (Deck's hex `color`, such as `0082c9`); a label
without one is created black.
## What is kept
@@ -116,12 +117,13 @@ What the current code does (`parseNextcloudDeck` in
| `archived: true` | Archived card |
| `assignedUsers` | Card members, when mapped |
| `owner` | Requested by |
| `labels` (title) | Board labels |
| `labels` (`title`, `color`) | Board labels, with their colors |
| `comments` (`message`, `actorId`, `creationDateTime`) | Comments |
The export writes the board `title` and a stack per list, in order. Each card
has `title`, `description`, `duedate`, the labels as `{ title }`, `createdAt`,
the end date as `done`, the owner and further people as `assignedUsers`, the
the end date as `done` (or `done: true` for a due date ticked done without an
end date), the owner and further people as `assignedUsers`, the
creator as `owner` and the comments.
## Attachment files
@@ -118,7 +118,9 @@ them:
and a range `A → B`. WeKan also reads `YYYY-MM-DD`, `MM/DD/YYYY` and a
`(GMT+3)` style zone at the end. A time without a zone is taken as UTC.
- Checkboxes are `Yes` and `No`.
- Relations are the related page's title and its encoded path or URL.
- Relations are the related page's title and its encoded path or URL. A
related page that is one row of the export, in any of its databases, is a
"related to" dependency between the two cards.
- A row's page file starts with `# Title`, a blank line, one
`Property: value` line per non-empty property, a blank line, then the page
body.
@@ -262,7 +264,8 @@ The export writes, per card:
The import reports these on the loss report, rather than dropping them
silently:
- relation columns (links to other pages);
- a relation to a page that is not a row of the export, or to a title that
two rows share (it is not guessed which one);
- a **Last edited time** column;
- date columns after the ones above; they are kept as text fields, and the
report says which column was the due date;
@@ -97,7 +97,12 @@ What the import must cover:
- deeper outlines become checklists, with their descendants as items
(completed = finished);
- the head title becomes the board title;
- a list's note and `url` / `htmlUrl` / `xmlUrl` links are reported.
- on a card, OPML 2.0's `created` becomes the creation date and `category`
the labels, a `url` / `htmlUrl` / `xmlUrl` link goes at the end of the
description, and any other attribute (OmniOutliner writes its columns this
way) becomes a custom field;
- a list's note, and an attribute of a list or a checklist item, are
reported.
The export writes the same, with Workflowy's attribute names. Line breaks in
notes survive as `&#10;`. The file is parsed on the server only, and DTDs and
@@ -122,9 +127,10 @@ What the export writes (`models/lib/opmlOutlineFormat.js`):
- `<opml version="2.0">` with the board title in `<head><title>`;
- each list as a top-level `<outline text="…">`, including lists without
cards;
- each card as a child outline, with its description as `_note` and
- each card as a child outline, with its description as `_note`,
`_complete="true"` when its list's name looks finished (contains "done",
"closed", "complete", "archiv" or "finished");
"closed", "complete", "archiv" or "finished"), its creation date as
`created` (RFC 822) and its labels as `category`;
- each checklist as a child of the card, with its items as children,
`_complete="true"` when finished.
@@ -140,6 +146,10 @@ reader gives them back. Archived cards and archived lists are not exported.
| Level 2 outline: `text` (or `title`) | Card title |
| Level 2 outline: `_note` | Card description |
| Level 2 outline: `_complete` / `complete` = true | Card with the label `done` |
| Level 2 outline: `created` | Creation date |
| Level 2 outline: `category` (comma-separated, leading `/` taken off) | Labels |
| Level 2 outline: `url`, `htmlUrl`, `xmlUrl` | A link at the end of the description |
| Level 2 outline: any other attribute | Custom field of that name (a leading `_` taken off) |
| Level 3 outline with children | Checklist, its descendants the items |
| Level 3 outline without children | Item of a checklist named after the card |
| Completed item | Finished checklist item |
@@ -149,14 +159,17 @@ reader gives them back. Archived cards and archived lists are not exported.
The import reports these on the loss report:
- a `_note` on a top-level (list) outline;
- `url`, `htmlUrl` and `xmlUrl` attributes, on any outline;
- an attribute of a list or a checklist item other than its text and
complete state;
- a `created` that is not a date;
- outlines deeper than 64 levels.
Other attributes, such as `created`, are not read.
`type`, `isComment` and `isBreakpoint` only say how an outliner draws a row,
and are not read.
The OPML export writes only lists, cards, notes, the complete state and
checklists. It does not write swimlanes, labels, dates, members, comments,
custom fields or attachments.
The OPML export writes lists, cards, notes, the complete state, the creation
date, labels and checklists. It does not write swimlanes, other dates,
members, comments, custom fields or attachments.
## REST API
@@ -133,9 +133,11 @@ What the current code does (`parseOpenProject` in
(`_embedded.schemas`, or a work package's `_embedded.schema`); without a
schema the field keeps the name `customFieldN`. Values are read from the
work package (`raw` for formatted text) and from `_links` (the title).
- `estimatedTime` (ISO 8601 duration) becomes the custom field **Estimated
time (hours)**, and `percentageDone` the custom field **Progress (%)**.
`spentTime` becomes the card's spent hours.
- `estimatedTime` and `remainingTime` (ISO 8601 durations) become the custom
fields **Estimated time (hours)** and **Remaining time (hours)**, and
`percentageDone` the custom field **Progress (%)**. `spentTime` becomes the
card's spent hours, and the export writes a card's spent hours back as
`spentTime` (`PT1.5H`).
- Relations embedded on a work package are kept from their `from` side:
`blocks`, `blocked` (is blocked by), `duplicates`, `duplicated`; any other
type is kept as related-to.
@@ -161,7 +163,7 @@ What the current code does (`parseOpenProject` in
| Embedded `relations` | Dependencies |
| Embedded `watchers` | Card watchers, when mapped to a board member |
| Type, priority, category, version | Labels |
| `customFieldN`, `estimatedTime`, `percentageDone` | Custom fields |
| `customFieldN`, `estimatedTime`, `remainingTime`, `percentageDone` | Custom fields |
| `storyPoints` | Number field **Story points**, the Scrum estimate |
| `version`, `sprint`, `position` | Scrum release, sprint, backlog rank |
| Embedded comment activities | Comments |
Loaded 100 of 691 files, more files were not shown because too many files have changed in this diff. Show more