Compare commits

...
504 Commits
Author SHA1 Message Date
github-actions[bot] 9da7639123 Bump versions for v13.28 2026-11-22 23:29:04 +00:00
Lauri Ojansivu 46da0ba75a Prepare v13.28 release 2026-11-23 01:28:01 +02:00
Lauri Ojansivu f533d16aca Translations: Swiss German writes ss, not ß, in the Omi sync exclusion string.
Thanks to xet7 !
2026-11-23 00:31:09 +02:00
Lauri Ojansivu 0e2fb14856 Translations: Omi's repository delete and "do not sync this repository any more", in every language.
14 new gitea- keys for Omi's Gitea folder pages - excluding one repository
from the GitHub sync and including it again, deleting one repository and its
files after a dry run with owner/name typed, the list of deleted
repositories ("Deleted <date>, <size> freed") and a size index out of date
since a deletion - added to en.i18n.json and filled for every locale, so Omi
copies them from here. WeKan does not use them yet. No key has a
placeholder.

Low confidence: ace, ak, ay, bm, bi, bua, chr, csb, dz, bo, ee, ary, bho, cv,
ba, ff, fj, gn, gv, haw, iu, kl, kw, ks, lg, lld, nah, nap, nd, nso, ny, om,
ig, kok, mai, tig, tlh, wal, ve, ve-PP, ve-CC, zgh, rup, sah, qu, wo, ss, tpi,
to, sm, vo, szl.

Thanks to xet7 !
2026-11-23 00:23:15 +02:00
Lauri Ojansivu df965e7dab Tests: the Tigre Star guard counts the Star strings from English instead of a fixed 20.
The help button's texts added five Tigre strings that mention Star, all with
the corpus-attested word, and the fixed count failed on them. The guard still
checks every one.

Thanks to xet7 !
2026-11-23 00:22:36 +02:00
Lauri Ojansivu 52e6453e5a Translations: Tigre files are ፋይላት in the Gitea folder strings, as the corpus spells them.
Thanks to xet7 !
2026-11-23 00:22:36 +02:00
Lauri Ojansivu ef3163dfcc Translations: the help button's descriptions in Tswana.
Tswana is a lower-confidence translation; technical terms are new coinages.

Thanks to xet7 !
2026-11-23 00:21:51 +02:00
Lauri Ojansivu 1c99a6bf29 TODO: more wrong-language words the help-text translators saw.
Thanks to xet7 !
2026-11-23 00:10:29 +02:00
Lauri Ojansivu d32f30941c Translations: the help button's descriptions in Silesian.
Silesian is a lower-confidence translation; some menu names are new coinages.

Thanks to xet7 !
2026-11-23 00:10:18 +02:00
Lauri Ojansivu 72615db30a Translations: the help button's descriptions in Chichewa, Occitan, Oromo and Papiamentu.
Lower confidence: Chichewa, Oromo and Papiamentu.

Thanks to xet7 !
2026-11-23 00:10:06 +02:00
Lauri Ojansivu d7701ffd56 Translations: the help button's descriptions in Southern Sotho.
Southern Sotho is a lower-confidence translation.

Thanks to xet7 !
2026-11-23 00:00:45 +02:00
Lauri Ojansivu f35b828ef9 TODO: the wrong-language and wrong-meaning words the help-text translators saw.
Thanks to xet7 !
2026-11-22 23:59:45 +02:00
Lauri Ojansivu c4d0e41a5f Translations: the help button's descriptions in Kirundi, Kinyarwanda and Shona.
Kirundi is low confidence; Kinyarwanda and Shona medium.

Thanks to xet7 !
2026-11-22 23:59:18 +02:00
Lauri Ojansivu 8904a84488 Translations: the help button's descriptions in Quechua, Romansh, Sardinian, Sicilian, Northern Sami and Samoan.
Quechua and Northern Sami are low confidence; Romansh, Sardinian, Sicilian and Samoan medium.

Thanks to xet7 !
2026-11-22 23:59:18 +02:00
Lauri Ojansivu e3acbceae4 Translations: the help button's descriptions in Yiddish and Tamazight.
Low confidence: Tamazight (zgh); medium: Yiddish.

Thanks to xet7 !
2026-11-22 23:58:55 +02:00
Lauri Ojansivu a34f977968 Translations: the help button's descriptions in Malay, Malay (Malaysia), Maltese, Nahuatl, Neapolitan, Norwegian Bokmal, Northern Ndebele, Dutch, Dutch (Netherlands) and Northern Sotho.
Lower confidence: Maltese, Nahuatl, Neapolitan, Northern Ndebele and Northern Sotho.

Thanks to xet7 !
2026-11-22 23:49:34 +02:00
Lauri Ojansivu 82c067855a Translations: the help button's descriptions in Swati.
Swati is a low-confidence translation.

Thanks to xet7 !
2026-11-22 23:49:16 +02:00
Lauri Ojansivu 15add8144d Translations: the help button's descriptions in Klingon.
Klingon is a low-confidence translation; many technical terms are new compounds.

Thanks to xet7 !
2026-11-22 23:36:51 +02:00
Lauri Ojansivu 530b6b8619 Translations: the help button's descriptions in Kannada.
Thanks to xet7 !
2026-11-22 23:36:40 +02:00
Lauri Ojansivu b957af7402 Translations: the help button's descriptions in Inuktitut.
Low confidence: Inuktitut.

Thanks to xet7 !
2026-11-22 23:29:32 +02:00
Lauri Ojansivu 8617782dfa Translations: the help button's descriptions in Kurdish, Cornish, Latin, Luxembourgish, Luganda, Ladin, Malagasy and Maori.
Lower confidence: Cornish, Latin, Luxembourgish, Luganda, Ladin, Malagasy and Maori.

Thanks to xet7 !
2026-11-22 23:28:22 +02:00
Lauri Ojansivu 378aff443c TODO: wekan-meteor3-html4 is left out for now.
Thanks to xet7 !
2026-11-22 23:25:35 +02:00
Lauri Ojansivu 5fe04bfb67 Translations: the help button's descriptions in Tigre.
Tigre is a low-confidence translation; the vocabulary follows the existing Tigre catalog and its terminology guards.

Thanks to xet7 !
2026-11-22 23:25:31 +02:00
Lauri Ojansivu cd3e5ec7e2 Translations: the help button's descriptions in Venetian (ve-CC) and Veps (ve-PP).
Low confidence: Venetian, Veps.

Thanks to xet7 !
2026-11-22 23:25:00 +02:00
Lauri Ojansivu b9529540cd Translations: the help button's descriptions in Slovenian, Sinhala, Albanian and Aromanian.
Aromanian is low confidence and Sinhala medium.

Thanks to xet7 !
2026-11-22 23:21:22 +02:00
Lauri Ojansivu a1932a2a42 Translations: the help button's descriptions in Georgian and Khmer.
Low confidence: Khmer.

Thanks to xet7 !
2026-11-22 23:18:41 +02:00
Lauri Ojansivu 4d3d12ff97 TODO: the Estonian board is juhatus in two menu names, to be corrected.
Thanks to xet7 !
2026-11-22 23:16:56 +02:00
Lauri Ojansivu 081d2d919f Translations: the help button's descriptions in Fula (Pulaar).
Fula is a lower-confidence translation.

Thanks to xet7 !
2026-11-22 23:16:18 +02:00
Lauri Ojansivu 8dc88d96d1 Translations: the help button's descriptions in Greenlandic.
Low confidence: Greenlandic.

Thanks to xet7 !
2026-11-22 23:16:11 +02:00
Lauri Ojansivu c767eafa97 TODO: a table of where things are in WeKan and its repositories, WeLite and Weddy included.
Thanks to xet7 !
2026-11-22 23:15:12 +02:00
Lauri Ojansivu 9836304f0b Translations: the help button's descriptions in Uzbek (Arabic script) and Venda.
Low confidence: Uzbek (Arabic script), Venda.

Thanks to xet7 !
2026-11-22 23:13:23 +02:00
Lauri Ojansivu 28cae50f02 Translations: the help button's descriptions in Wolaytta.
Low confidence: Wolaytta.

Thanks to xet7 !
2026-11-22 23:13:11 +02:00
Lauri Ojansivu febd5cf16a TODO: the progress of the work in progress, what needs a person, and the repositories left out.
Thanks to xet7 !
2026-11-22 23:11:18 +02:00
Lauri Ojansivu 89d946cde4 Translations: the Gitea folder is Gitea mapa in Bosnian.
Thanks to xet7 !
2026-11-22 23:11:18 +02:00
Lauri Ojansivu b7d36b0bf4 Translations: the help button's descriptions in Arabic, Moroccan Arabic, Azerbaijani, Bashkir, Buryat, Belarusian, Bulgarian, Bosnian, Bhojpuri, Bengali, Assamese, Catalan and Valencian.
Low confidence: Bashkir, Buryat, Bhojpuri and Assamese.

Thanks to xet7 !
2026-11-22 23:10:25 +02:00
Lauri Ojansivu 5f38b7a80e Translations: the help button's descriptions in Tigrinya.
Tigrinya is a lower-confidence translation; some technical terms are descriptive coinages.

Thanks to xet7 !
2026-11-22 23:09:42 +02:00
Lauri Ojansivu 590cafcd5d Translations: the help button's descriptions in Fijian.
Fijian is a lower-confidence translation.

Thanks to xet7 !
2026-11-22 23:08:34 +02:00
Lauri Ojansivu d2e9340471 Translations: the help button's descriptions in Igbo.
Low confidence: Igbo.

Thanks to xet7 !
2026-11-22 23:06:31 +02:00
Lauri Ojansivu acd353f154 Translations: the help button's descriptions in Icelandic.
Thanks to xet7 !
2026-11-22 23:03:38 +02:00
Lauri Ojansivu 74df995e7d Translations: the help button's descriptions in Kazakh.
Thanks to xet7 !
2026-11-22 23:03:32 +02:00
Lauri Ojansivu 540f5ec5d4 Translations: the help button's descriptions in Volapük.
Low confidence: Volapük.

Thanks to xet7 !
2026-11-22 23:03:30 +02:00
Lauri Ojansivu ecbfb856e6 Translations: the help button's descriptions in Kashmiri, Kyrgyz, Macedonian and Mongolian.
Lower confidence: Kashmiri, Kyrgyz and Mongolian.

Thanks to xet7 !
2026-11-22 23:01:46 +02:00
Lauri Ojansivu c7d6d3e490 Translations: the help button's descriptions in Urdu and Uzbek (uz, uz-LA, uz-UZ).
Lower confidence: some Scrum and Kanban terms in Urdu and Uzbek.

Thanks to xet7 !
2026-11-22 23:00:51 +02:00
Lauri Ojansivu 620dadbf5e Translations: the help button's descriptions in Friulian.
Friulian is a lower-confidence translation.

Thanks to xet7 !
2026-11-22 22:59:52 +02:00
Lauri Ojansivu f22985a9ad Translations: the help button's descriptions in Hawaiian.
Low confidence: Hawaiian.

Thanks to xet7 !
2026-11-22 22:59:02 +02:00
Lauri Ojansivu d1cb4e3516 Translations: the help button's descriptions in Hausa.
Low confidence: Hausa.

Thanks to xet7 !
2026-11-22 22:57:28 +02:00
Lauri Ojansivu cd9aae2d88 Translations: the help button's descriptions in Manx.
Low confidence: Manx.

Thanks to xet7 !
2026-11-22 22:56:11 +02:00
Lauri Ojansivu 5f8a7cf482 Translations: the help button's descriptions in Waray (wa-RR).
Low confidence: Waray.

Thanks to xet7 !
2026-11-22 22:55:47 +02:00
Lauri Ojansivu 287d08fbe5 Translations: the help button's descriptions in Javanese.
Thanks to xet7 !
2026-11-22 22:55:07 +02:00
Lauri Ojansivu 9a4fd217f3 Translations: the help button's descriptions in Telugu.
Telugu is a medium-confidence translation; some button names had no existing Telugu term.

Thanks to xet7 !
2026-11-22 22:53:29 +02:00
Lauri Ojansivu cc5b8f311a Translations: the help button's descriptions in Faroese.
Faroese is a lower-confidence translation.

Thanks to xet7 !
2026-11-22 22:51:49 +02:00
Lauri Ojansivu ebc5071835 Translations: the help button's descriptions in Armenian.
Low confidence: Armenian.

Thanks to xet7 !
2026-11-22 22:51:48 +02:00
Lauri Ojansivu a8c9e08aa2 Translations: the help button's descriptions in Tatar and Uyghur.
Lower confidence: technical terms in Tatar and Uyghur.

Thanks to xet7 !
2026-11-22 22:49:49 +02:00
Lauri Ojansivu 9524bb7b65 Translations: the help button's descriptions in Guarani.
Low confidence: Guarani.

Thanks to xet7 !
2026-11-22 22:47:00 +02:00
Lauri Ojansivu 7a1fe9f42d Translations: the help button's descriptions in Wolof.
Low confidence: Wolof.

Thanks to xet7 !
2026-11-22 22:46:19 +02:00
Lauri Ojansivu 73469e2d37 Translations: the help button's descriptions in Scottish Gaelic.
Scottish Gaelic is a lower-confidence translation.

Thanks to xet7 !
2026-11-22 22:43:08 +02:00
Lauri Ojansivu 8de8a5aa67 Translations: the help button's descriptions in Upper Sorbian.
Low confidence: Upper Sorbian.

Thanks to xet7 !
2026-11-22 22:41:30 +02:00
Lauri Ojansivu 03bd5d6ae6 Translations: the help button's descriptions in Tamil.
Tamil is a medium-confidence translation; some menu names had no existing Tamil term.

Thanks to xet7 !
2026-11-22 22:40:56 +02:00
Lauri Ojansivu 18831b501e Translations: the help button's descriptions in Pashto, Sindhi and Somali.
Pashto and Sindhi are low confidence, and some Somali admin terms are too.

Thanks to xet7 !
2026-11-22 22:39:47 +02:00
Lauri Ojansivu 9fab402b4a Translations: the help button's descriptions in Portuguese (pt, pt-BR, pt-PT, pt_PT) and Romanian.
Thanks to xet7 !
2026-11-22 22:39:46 +02:00
Lauri Ojansivu 342d2871e3 Translations: the Gitea folder strings in Tigre use the established Tigre words for file and name.
The gitea- keys added in 713176878c wrote file and name with the Tigrinya
words; tests/tigreAllEstablishedNounContexts.test.cjs requires the Tigre
ones, as the rest of the catalog has them.

Thanks to xet7 !
2026-11-22 22:38:56 +02:00
Lauri Ojansivu 7e5ff7dea5 Translations: the help button's descriptions in Walloon.
Low confidence: Walloon.

Thanks to xet7 !
2026-11-22 22:37:17 +02:00
Lauri Ojansivu 3474d6ef45 Translations: the help button's descriptions in Gujarati (gu-IN).
Thanks to xet7 !
2026-11-22 22:36:46 +02:00
Lauri Ojansivu 7829f10089 Translations: the help button's descriptions in Punjabi and Odia.
Lower confidence: Odia.

Thanks to xet7 !
2026-11-22 22:34:36 +02:00
Lauri Ojansivu eb832428cd Translations: the help button's descriptions in Xitsonga.
Low confidence: Xitsonga.

Thanks to xet7 !
2026-11-22 22:33:23 +02:00
Lauri Ojansivu 9097bc17f6 Translations: the help button's descriptions in Irish.
Irish is a lower-confidence translation.

Thanks to xet7 !
2026-11-22 22:32:26 +02:00
Lauri Ojansivu 713176878c Translations: the Gitea folder pages of Omi, in every language.
48 new keys (prefix gitea-) for Omi's Gitea folder pages - measuring a
Gitea's folders, orphans, deleting a user or organization after a dry run,
importing from GitHub, jobs - added to en.i18n.json and filled for every
locale, so Omi copies them from here. WeKan does not use them yet. Gitea's
own terms (organization, user, packages, versions, LFS) are not added: Omi
takes those from gitea-patches' gitea-locale. No key has a placeholder.

Low confidence: ace, ig, ary, br, ast-ES, fy, fy-NL, cy, cy-GB, hy, gu-IN,
chr, iu, kl, gv, kw, ff, bm, ak, ee, lg, ay, gn, fj, haw, bi, bua, dz, bo,
ks, nah, qu, sah, rup, se, sm, mi, ss, nd, nso, st, sn, ny, rn, rw, om, so,
pap, nap, scn, sc, rm, szl, mt, or_IN, sd, ps, my, tlh, vo, tig, wal, zgh,
ve, ve-PP, ve-CC, wa, wa-RR, wo, to, tpi, wuu-Hans, uz-AR.

Thanks to xet7 !
2026-11-22 22:29:48 +02:00
Lauri Ojansivu cb1b30c25d Translations: the help button's descriptions in Yoruba.
Low confidence: Yoruba.

Thanks to xet7 !
2026-11-22 22:27:56 +02:00
Lauri Ojansivu 0675109501 Translations: the help button's descriptions in Turkmen.
Turkmen is a lower-confidence translation.

Thanks to xet7 !
2026-11-22 22:27:48 +02:00
Lauri Ojansivu b71bcdecf1 Translations: the help button's descriptions in Haitian Creole.
Low confidence: Haitian Creole.

Thanks to xet7 !
2026-11-22 22:26:23 +02:00
Lauri Ojansivu e51cdd3ba5 Translations: the help button's descriptions in Hindi (hi, hi-IN).
Thanks to xet7 !
2026-11-22 22:25:12 +02:00
Lauri Ojansivu 7e2bde2cce Translations: the help button's descriptions in Afrikaans, Akan, Bambara, Amharic, Tibetan, Aragonese, Asturian and Breton.
Low confidence: Akan, Bambara, Tibetan, Aragonese, Asturian and Breton.

Thanks to xet7 !
2026-11-22 22:24:36 +02:00
Lauri Ojansivu fabf89355f Translations: the help button's descriptions in West Frisian (fy, fy-NL).
Thanks to xet7 !
2026-11-22 22:22:03 +02:00
Lauri Ojansivu 49912490dc CLAUDE.md, AGENTS.md: the prototypes copy WeKan's translations and gitea-patches' Gitea translations directly, and use no other source.
Gitea's strings come from gitea-patches' dist/translations/gitea-locale, which
alone has the complete Finnish and is refreshed from upstream with its
build.sh; they are not added to WeKan's catalogs.

Thanks to xet7 !
2026-11-22 22:18:51 +02:00
Lauri Ojansivu c977c6f649 Translations: the help button's descriptions in Tok Pisin.
Low confidence: Tok Pisin.

Thanks to xet7 !
2026-11-22 22:18:48 +02:00
Lauri Ojansivu 5e4fcf78d1 Translations: the help button's descriptions in Hiragana Japanese (ja-HI).
Converted from the standard Japanese text to kana with pykakasi and manual reading fixes; readings are medium confidence.

Thanks to xet7 !
2026-11-22 22:18:36 +02:00
Lauri Ojansivu fd8f265b3d Translations: the help button's descriptions in Tajik.
Tajik is a lower-confidence translation.

Thanks to xet7 !
2026-11-22 22:18:07 +02:00
Lauri Ojansivu 19d0d1dd17 Translations: the help button's descriptions in Hebrew (he, he-IL).
Thanks to xet7 !
2026-11-22 22:15:50 +02:00
Lauri Ojansivu 679d2d8549 Translations: the help button's descriptions in Xhosa.
Low confidence: Xhosa.

Thanks to xet7 !
2026-11-22 22:15:43 +02:00
Lauri Ojansivu f892edd08c Translations: the help button's descriptions in Basque.
Thanks to xet7 !
2026-11-22 22:13:52 +02:00
Lauri Ojansivu cd6f572d40 Translations: the help button's descriptions in Marathi, Burmese and Nepali.
Lower confidence: Burmese and Nepali.

Thanks to xet7 !
2026-11-22 22:12:44 +02:00
Lauri Ojansivu 1caa26ee5c Translations: the help button's descriptions in Tongan.
Low confidence: Tongan.

Thanks to xet7 !
2026-11-22 22:10:05 +02:00
Lauri Ojansivu 16b8d496ea Translations: the help button's descriptions in Korean (ko, ko-KR).
Thanks to xet7 !
2026-11-22 22:08:15 +02:00
Lauri Ojansivu 7d1e6ddbdb Translations: the help button's descriptions in Thai.
Thanks to xet7 !
2026-11-22 22:07:15 +02:00
Lauri Ojansivu 14aee38339 Translations: the help button's descriptions in Zulu (zu, zu-ZA).
Low confidence: Zulu.

Thanks to xet7 !
2026-11-22 22:05:00 +02:00
Lauri Ojansivu a5b46cfd11 Translations: the help button's descriptions in Estonian (et-EE).
Thanks to xet7 !
2026-11-22 22:04:41 +02:00
Lauri Ojansivu 72c54bb77d CLAUDE.md, AGENTS.md: Omi is one of the prototypes that take WeKan's translations, and Gitea's own terms may come from Gitea's and gitea-patches' translations.
What neither has is added to WeKan's catalog and used from there in WeKan and
in the .tools repositories.

Thanks to xet7 !
2026-11-22 22:02:10 +02:00
Lauri Ojansivu 133e84c185 Translations: the help button's descriptions in Japanese (ja, ja-JP).
Thanks to xet7 !
2026-11-22 22:01:42 +02:00
Lauri Ojansivu daabd51426 Translations: the help button's descriptions in Russian, Sakha and Serbian.
Sakha is low confidence, and Serbian follows the existing Serbian UI vocabulary.

Thanks to xet7 !
2026-11-22 22:01:28 +02:00
Lauri Ojansivu 926250b1df Translations: the help button's descriptions in Tagalog.
Thanks to xet7 !
2026-11-22 21:58:00 +02:00
Lauri Ojansivu 3721b8b31d Translations: the help button's descriptions in Mandarin Chinese, Dzongkha, Cherokee and Central Kurdish.
Low confidence: Dzongkha, Cherokee.

Thanks to xet7 !
2026-11-22 21:57:26 +02:00
Lauri Ojansivu 780a76ed10 Translations: the help button's descriptions in Spanish (Argentina), Spanish (Chile), Corsican, Welsh, Welsh (United Kingdom) and Ewe.
Low confidence: Corsican, Ewe.

Thanks to xet7 !
2026-11-22 21:57:25 +02:00
Lauri Ojansivu 7ab3417446 Translations: the help button's descriptions in Czech, Czech (Czechia), Kashubian, Greek, Greek (Greece) and Chuvash.
Low confidence: Kashubian, Chuvash.

Thanks to xet7 !
2026-11-22 21:57:25 +02:00
Lauri Ojansivu f0601b6cfb Translations: the help button's descriptions in German, German (Austria), German (Switzerland), German (Germany), Danish and Esperanto.
Low confidence: Esperanto (medium; coined technical terms).

Thanks to xet7 !
2026-11-22 21:57:25 +02:00
Lauri Ojansivu a158f12b1b Translations: the help button's descriptions in Finnish.
Thanks to xet7 !
2026-11-22 21:56:43 +02:00
Lauri Ojansivu 207f737da4 Translations: the help button's descriptions in Konkani, Lithuanian, Latvian, Maithili and Malayalam.
Lower confidence: Konkani and Maithili.

Thanks to xet7 !
2026-11-22 21:55:06 +02:00
Lauri Ojansivu 66bedb80a7 Meteor 3 hosting: with a server set, localhost limit reads the settings here and the server over SSH, and keeps its jump before ufw's.
The settings - 1createdb.sh, the customers' <name>.txt and restore/<name>/ -
need not be on the server, so build.sh now runs localhost-limit.sh on this
machine with --host <server>: the server's containers, cgroups and
/etc/caddy/Caddyfile come back in one SSH call, the rules go in one more, and
a third shows them. Root and cgroup v2 are asked of the server. ufw accepts
all loopback traffic in ufw-before-output, so the jump must come first in
OUTPUT: apply inserts it there and status says when a ufw reload has put
ufw's first again.

Thanks to xet7 !
2026-11-22 21:54:58 +02:00
Lauri Ojansivu 1306e1b98e Translations: the help button's descriptions in Galician.
Thanks to xet7 !
2026-11-22 21:53:05 +02:00
Lauri Ojansivu 933fb07d04 Meteor 3 hosting: Limit localhost access to current node.js port and database port only.
The containers run with network_mode: host, so one customer's WeKan could open
every other customer's 127.0.0.1:<port>. localhost-limit.sh, in build.sh's
Server setup menu, finds the WeKan containers (docker ps, *-app and *-tenant),
their PORT and MONGO_URL (docker inspect, else restore/<customer>/docker-compose.yml),
compares them with /etc/caddy/Caddyfile and 1createdb.sh, and lets each one
reach on this machine only its own port, its database port, DNS and the answers
to Caddy: an iptables/ip6tables chain on OUTPUT -o lo matching each container
by its cgroup v2 path. plan (the default) changes nothing; apply, status, remove.
Run over SSH like every other script when a server is set.

Thanks to xet7 !
2026-11-22 21:51:59 +02:00
Lauri Ojansivu c48a51f727 Translations: the help button's descriptions in Persian (fa, fa-IR).
Thanks to xet7 !
2026-11-22 21:48:31 +02:00
Lauri Ojansivu 5c13a21df8 Translations: the help button's descriptions in Swahili.
Thanks to xet7 !
2026-11-22 21:47:41 +02:00
Lauri Ojansivu 36695df2a5 Translations: the help button's descriptions in Croatian.
Thanks to xet7 !
2026-11-22 21:47:04 +02:00
Lauri Ojansivu b379bb53db Translations: WeLite's message for a WeKan data folder with no readable database, in every language.
Adds wekan-data-no-database, "No readable WeKan database was found.", for
WeLite's read-only WeKan data pages. WeKan's catalogs are the source of
translations for the prototypes under .tools/, so the key is added here first
and copied to WeLite from here. The other captions of those pages reuse
existing keys.

Low confidence, written from each locale's existing words for "database" and
word lists, and open to correction by a speaker: Acehnese, Akan, Aragonese,
Aymara, Bashkir, Bislama, Bambara, Tibetan, Buryat, Cherokee, Kashubian,
Chuvash, Dzongkha, Ewe, Fula, Fijian, Guarani, Manx, Inuktitut, Greenlandic,
Konkani, Kashmiri, Cornish, Luganda, Ladin, Nahuatl, Northern Sotho,
Aromanian, Yakut, Northern Sami, Swati, Tigre, Klingon, Venda, Venetian,
Veps, Volapuk, Walloon, Waray, Wolaytta, Wolof, Tamazight, hiragana Japanese
and Uzbek in Arabic script.

Thanks to xet7 !
2026-11-22 21:46:50 +02:00
Lauri Ojansivu 8da1088c59 Translations: the help button's descriptions in Acehnese, Bislama and Aymara.
Low confidence: Acehnese and Aymara.

Thanks to xet7 !
2026-11-22 21:45:52 +02:00
Lauri Ojansivu 8ea6a96a0a Translations: the help button's descriptions in Flemish (vl-SS).
Thanks to xet7 !
2026-11-22 21:43:18 +02:00
Lauri Ojansivu 8358b2227b ListLockMoveBleed: a Playwright spec, and the Hall of Fame coverage guard counts it.
tests/playwright/specs/list-lock-move.e2e.js replays GHSA-394w-8q99-q4qx: a
normal member of boards A and B, refused write in one list of A, gets 403 from
POST /api/boards/:boardId/swimlanes/:swimlaneId/move, every card stays on board
A, and the attempt is in Admin Panel / Problems as ListLockMoveBleed; the board
admin moves it. Negative: the same member moves a swimlane with no refusing
list with 200, every card arriving on board B, which also pins the card move's
guarded Meteor.userId() read, and an allowed move records nothing.

tests/securityRegressionCoverage.test.cjs maps listlockmovebleed to
tests/listLockStructure.test.cjs and the spec, and counts 153 published names.

Thanks to adityasunny06help-coder and xet7 !
2026-11-22 21:41:21 +02:00
Lauri Ojansivu e1b10f883e Translations: the help button's descriptions in Indonesian.
Thanks to xet7 !
2026-11-22 21:40:35 +02:00
Lauri Ojansivu 51eea5c444 Translations: the help button's descriptions in Ukrainian.
Thanks to xet7 !
2026-11-22 21:39:50 +02:00
Lauri Ojansivu 93cc236fea Translations: the help button's descriptions in Galician (gl-ES).
Thanks to xet7 !
2026-11-22 21:39:30 +02:00
Lauri Ojansivu 8ee8cb73fe Translations: the help button's descriptions in Vietnamese (vi, vi-VN).
Thanks to xet7 !
2026-11-22 21:36:11 +02:00
Lauri Ojansivu d623c9802b Translations: the help button's descriptions in Slovak.
Thanks to xet7 !
2026-11-22 21:35:42 +02:00
Lauri Ojansivu 52a056160d Translations: the help button's descriptions in Hungarian.
Thanks to xet7 !
2026-11-22 21:34:05 +02:00
Lauri Ojansivu eeacb60455 Translations: the help button's descriptions in Turkish.
Thanks to xet7 !
2026-11-22 21:33:48 +02:00
Lauri Ojansivu 7d356b5e19 Translations: the help button's descriptions in Spanish (es, es-CO, es-LA, es-MX, es-PE, es-PY, es_CO).
Thanks to xet7 !
2026-11-22 21:33:14 +02:00
Lauri Ojansivu 321c0925c9 Translations: the help button's descriptions in Polish.
Thanks to xet7 !
2026-11-22 21:32:04 +02:00
Lauri Ojansivu 6ca0dff202 Translations: the help button's descriptions in Italian.
Thanks to xet7 !
2026-11-22 21:30:58 +02:00
Lauri Ojansivu f3a0476c00 Translations: the help button's descriptions in Chinese (Simplified and Traditional variants), Cantonese and Wu.
Low confidence: Cantonese (yue_CN) and Wu (wuu-Hans), adapted from the Chinese text.

Thanks to xet7 !
2026-11-22 21:30:36 +02:00
Lauri Ojansivu ecf63b0ccc ListLockMoveBleed: the REST swimlane move asks the per-list gate, as its delete and the moveSwimlane method do.
A member refused write access to a list could move the whole swimlane to
another board with POST /api/boards/:boardId/swimlanes/:swimlaneId/move: the
route asked only for board write access, and the locked list's cards landed
in lists on the other board with no exceptions, where the member could edit
or delete them. Now the route refuses with 403 when a list holding the
swimlane's cards refuses the caller's role, and the attempt is shown in
Admin Panel / Problems as ListLockMoveBleed (authz.list-locked-move). A test
fails when any server code moves a swimlane without asking the gate.

Also: a card move outside a Meteor method read Meteor.userId(), which throws
on the server there, so every REST swimlane move answered 500 after its first
card had moved. The mover is read without throwing.

GHSA-394w-8q99-q4qx.

Thanks to adityasunny06help-coder and xet7 !
2026-11-22 21:30:17 +02:00
Lauri Ojansivu 0bf3f94458 Translations: the help button's descriptions in French (fr, fr-BE, fr-CA, fr-CH, fr-FR).
Thanks to xet7 !
2026-11-22 21:27:08 +02:00
Lauri Ojansivu 185570c6a4 Translations: the help button's descriptions in Swedish.
Thanks to xet7 !
2026-11-22 21:26:40 +02:00
Lauri Ojansivu 259ba4939c Translations: Product is Artikel in Dutch and Flemish, and Artitgel in Romansh.
Thanks to xet7 !
2026-11-22 21:25:52 +02:00
Lauri Ojansivu f794709270 Docs: the Product kind of an invoice line, on the Budget and billing and Shop pages.
Budget and billing lists the four kinds of a line - time, Fee, Expense and
Product - as one list, and how the e-invoice writes each; Shop says its
invoice lines are products, with their quantity and unit price, adding up to
the net. Both list the commits.

Thanks to xet7 !
2026-11-22 21:19:06 +02:00
Lauri Ojansivu 1abb202030 Tests: a Shop invoice line is a Product, an unknown kind is refused, and every list of the line kinds names Product.
tests/billingLineKinds.test.cjs:
- Product is a kind with a label, and isInvoiceLineKind takes it;
- negative: an unknown kind ('gift', a wrong case, empty, not a string) is
  refused, the schema lists exactly the library's kinds, and the Shop's
  invoice refuses a line of a kind billing does not know;
- a shop invoice line is a product with its card, quantity and unit price,
  and the lines add up to the net with VAT taken out;
- the e-invoice writes a product as pieces (H87) at its unit price, one unit
  (C62) when there is no whole unit price, and a fee as before;
- a source scan of models, server, client, imports and config: every place
  that names the fee and the expense kinds together - as strings, label keys
  or style classes - names product too, so a new output that forgets it
  fails;
- the label is translated in every language, with no placeholder.

tests/billingAccess.test.cjs holds the schema's kinds to the library's list,
and the Shop mocha test expects its invoice line as a product of 3 at 5 EUR.

Thanks to xet7 !
2026-11-22 21:18:58 +02:00
Lauri Ojansivu 070c72759a Translations: Product, the new kind of a Budget and billing invoice line, in every language.
The label of a product line, beside Fee and Expense on the Budget and billing
page, in English and translated into every language WeKan has, with the word
each language already uses for a product in the Shop.

Lower-confidence translations: ace, ak, ay, bho, bm, bo, chr, dz, ff, fj,
gv, iu, kl, ks, kw, lg, nah, ny, om, qu, sd, ss, tlh, tpi, uz-AR, ve-PP, vo,
wal, wo and zgh.

Thanks to xet7 !
2026-11-22 21:18:58 +02:00
Lauri Ojansivu ac7c3d93fe Budget and billing: a Product kind of invoice line, and the Shop's invoices use it.
An invoice line was time, a fee or an expense; an order of Board View /
Shop was invoiced as fees. Product is now a kind of its own: a quantity at a
unit price, naming the product card.

- The kinds are one list, INVOICE_LINE_KINDS in models/lib/billing.js, with
  a label key for each kind a line names (LINE_KIND_LABEL_KEYS) and
  isInvoiceLineKind; the invoice schema takes exactly these kinds and the new
  optional quantity and unitMinor of a product line. An unknown kind is
  still refused, by the schema and by the Shop's invoice before it is
  written.
- The Budget and billing page labels a line by that table, so a product
  line reads Product; the draft list styles it like a fee or an expense.
- The e-invoice (UBL 2.1, Peppol BIS 3.0) writes a product as its quantity
  in pieces (UN/ECE H87) at its unit price, and - when the net does not
  divide into a whole unit price - as one unit (C62) at its amount, as a fee
  and an expense are written. Time lines are unchanged.
- The Shop's invoice lines are products, and they add up to the invoice's
  NET: with prices that include VAT the net is shared over the lines in
  proportion to their prices, the rounding remainder on the last line, so
  the lines, net, VAT and total agree on the invoice and in the e-invoice.
  Before, those lines carried the prices with the VAT in them.

Existing fee lines are unchanged, and nothing is migrated: the PDF, SVG,
Excel and CSV write a line by its amount whatever its kind, as before.

Thanks to xet7 !
2026-11-22 21:18:28 +02:00
Lauri Ojansivu 165326abca Docs: Help button - What is it? and How it works? at every feature place.
Thanks to xet7 !
2026-11-22 21:12:43 +02:00
Lauri Ojansivu 20ac1563ee Help button: tests - the texts have no links in any language, every place reaches a known help, and the popup returns the focus.
tests/featureHelp.test.cjs: every help id has both English texts and an
existing docs page; no text in any locale has a link, an address, a file
name, Markdown or a placeholder; every literal +featureHelp id and every
mapped popup, view, card section and Admin Panel pane is known, every
help is shown somewhere, and an unknown id has none (negative); the
button, the popup's order, the focus return, the logical CSS and the
wide popup. tests/playwright/specs/feature-help.e2e.js opens a help,
reads both headings, presses Escape and checks the focus, opens one from
inside the Board Settings popup, and checks Arabic mirrors the ?.

Thanks to xet7 !
2026-11-22 21:12:36 +02:00
Lauri Ojansivu 8a8b5e8b09 Help button: a ? at every feature place opens What is it? and How it works?
One reusable component, featureHelp and featureHelpPopup, and one pure
module, models/lib/featureHelp.js, that maps every place to its help
and every help to the docs page its texts were written from. The ? is
a real button, named and titled How it works?, at least 28 pixels,
with a focus ring, at the inline end of the place's header so it is
mirrored under right-to-left languages and never on top of another
button:

- beside the Board View menu, for the view that is on;
- in the heading of the board sidebar's open view;
- in every mapped popup's title bar, before maximize and close;
- in each card section's heading, before its hamburger;
- beside every Admin Panel, Cloud Panel and All Boards pane title
  (paneTitle() now also returns the open entry's paneId);
- in the Workload, Budget and billing and Rules headings.

The popup is wide on a desktop and a full-screen sheet on a phone,
titled How it works, with What is it? and How it works? as headings
and the texts as plain text. Escape closes it and gives the focus back
to the ?; from inside a popup, Popup.back() now focuses the element
the sub-popup's returnFocusSelector names.

Thanks to xet7 !
2026-11-22 21:09:25 +02:00
Lauri Ojansivu 4015192f16 Translations: the Help button's What is it? and How it works? in every language.
The three shared keys - what-it-is, how-it-works (also the tooltip of
the ? button) and featureHelpPopup-title, the popup's title - are
translated in every language. The 322 per-feature descriptions,
help-<id>-what-it-is-description and help-<id>-how-it-works-description
for 161 help points, are in English in en.i18n.json and, as English
placeholders, in every locale file in en's order, and listed in
pending-transifex.json, so fill-translations.mjs --list <lang> lists
them for translation.

Low-confidence translations of the shared keys: ace, ak, ay, bm, bo, dz,
bua, chr, csb, ee, ff, fj, gv, haw, hsb, iu, kl, ks, kw, lg, lld, nso,
rup, sah, szl, tig, tlh, tn, ts, uz-AR, ve, ve-PP, ve-CC, vo, wa, wa-RR,
wal, wo, zgh, wuu-Hans.

Thanks to xet7 !
2026-11-22 21:09:02 +02:00
Lauri Ojansivu 3dd68d3e65 Update WeKan changelog: the Shop's invoice, email and board copy, Admin Panel allowed addresses, and turning off all webhooks.
Thanks to xet7 !
2026-11-22 20:45:33 +02:00
Lauri Ojansivu 9d44b3f3e2 Docs: Shop - the order as a Budget and billing invoice, the confirmation email, and a board copy.
Board View / Shop and Board Settings / Shop say how an order becomes an
invoice with the order's own payment reference while Budget and billing is
on, what the buyer's confirmation email contains, when it is not sent and
that it never fails an order, and that a copy of the board starts with its
shop closed and without the source's Orders list and fields - with the
commits that did it.

Thanks to xet7 !
2026-11-22 20:41:55 +02:00
Lauri Ojansivu 1083b52a36 Shop tests: the invoice, the confirmation email and the board copy, and what each must never do.
- tests/shop.test.cjs: a copied board's shop is closed with no Orders list,
  fields or lists of the source, and Board.copy() - the only place a board is
  inserted from another - resets it before the insert, while an import leaves
  it out; the email has the number, lines, VAT, total, how to pay and the
  reference, a one-line subject a shop title can not inject a header into,
  no javascript: link, and an HTML part that escapes a product title; the
  three new strings keep their placeholders in every language; the server
  makes the invoice only with billing on, removes it with a failed order,
  uses billing's numbering and the order's reference, and sends the email
  after the order is stored through a sender that never throws.
- server/lib/tests/shop.tests.js: with Budget and billing off no invoice is
  made; on, the invoice has the order's reference and total and the card
  names it; the confirmation is captured in Finnish with the IBAN line and an
  escaped HTML part; a mail server that fails leaves the order standing; the
  shop's setting turns the email off; copyBoard gives a closed shop with no
  Orders list that takes no order.
- tests/playwright/specs/shop-view.e2e.js: the checkout shows the invoice
  number, and the invoice has the order card's payment reference.

Thanks to xet7 !
2026-11-22 20:41:47 +02:00
Lauri Ojansivu 9f22d02b5d Translations: the Shop's confirmation email and its setting in every language.
Three new strings - the Board Settings / Shop row "Send the buyer an order
confirmation by email", the email's subject "Your order __number__ at
__shop__" and its "How to pay:" - in English and translated into every
language WeKan has, in each language's own words for order, shop and
payment, with the placeholders unchanged.

Lower-confidence translations: ace, ak, ay, ba, bi, bm, bo, bua, chr, co,
csb, cv, dz, ee, ff, fj, gn, gv, haw, hsb, ig, iu, kl, kok, ks, kw, lg, lld,
mai, mg, mi, my, nah, nap, nd, om, or_IN, pap, ps, qu, rn, rup, sah, sc,
scn, sd, se, sm, sn, ss, szl, ti, tig, tlh, to, tpi, tt, uz-AR, ve-PP, vo,
wa, wa-RR, wal and zgh.

Thanks to xet7 !
2026-11-22 20:41:39 +02:00
Lauri Ojansivu c7b48bce2f Shop: an order is also a Budget and billing invoice, the buyer gets a confirmation email, and a board copy closes its shop.
Budget and billing invoice. When Budget and billing is on (Admin Panel /
Settings / Features) for the admin whose Board Settings / Shop takes the
orders, and they are still an admin of the shop's board, shopPlaceOrder also
writes the order into billing's own invoices of that board
(server/lib/shopInvoice.js): billing's numbering INV-<year>-<number>, the
board's Invoicer profile and payment terms, status Sent, the order number as
its reference, the buyer as its customer, one fixed-price line per product
naming its card, and the ORDER's payment reference, so the card, the invoice
and the payment all name the same one. The order card says which invoice it
is, and the checkout shows its number. An order that fails after the invoice
was made removes it again. With Budget and billing off, no invoice.

Confirmation email. After the order is stored the buyer gets its number,
lines, totals with VAT, the payment method with its reference and account
lines, an https payment link and the shop's name, in the language of their
browser (server/lib/shopEmail.js, models/lib/shop.js orderEmail). It goes
through Meteor's Email, so Admin Panel / E-mail / Bounces takes out a stopped
address and the SMTP limits hold; it is not sent without MAIL_URL, when the
new Board Settings / Shop row "Send the buyer an order confirmation by email"
is unticked, or to a stopped address. The subject is one line; the HTML part
is the account email layout of the plain text, which escapes every
character. A failed send is recorded in Admin Panel / Problems / Email and
never fails the order. No QR image: the mail code has no inline images.

A board copy. Board.copy() - the copyBoard method, the REST copy route and
the board templates - resets shopSettings (copiedShopSettings): the copy's
shop is closed, and its Orders list, the price, product code and stock
fields and the lists on sale, which are the source board's, are cleared, so
a copy never takes orders into the source's Orders list. Board Settings /
Shop on the copy suggests the copy's own fields and Orders list again. A
WeKan import, and the clone that runs through it, already left it out.

The order card's labels are now in the owner's language: the server loads
the language before translating.

Thanks to xet7 !
2026-11-22 20:41:15 +02:00
Lauri Ojansivu 82042473a9 TODO: the help button of every feature is in progress; the Admin Panel addresses are done.
Thanks to xet7 !
2026-11-22 20:37:04 +02:00
Lauri Ojansivu 6fbbb83cd2 Docs: Turn off all webhooks and Admin Panel / Problems / All webhooks.
Two feature pages - what each is, read more, how to use it, how the
numbers are calculated (off by default, the two-second cache, queued
webhooks kept, 25 rows a page, the masking), how it works in WeKan and
its commits - and the switch in the feature list, the Settings index,
Features, Global Webhooks and Settings enforced on the server, with
what is refused, what is not sent and what is not a webhook (ntfy,
CalDAV, email to card).

Thanks to xet7 !
2026-11-22 20:36:13 +02:00
Lauri Ojansivu df16bc55de Admin Panel / Problems / All webhooks: every webhook, its board, owner and contents.
A report below Rules Report, at /admin/problems/webhooks, through the
shared table page: one row per integration, newest first, with the board
title as a link (or Global webhook, or the id of a board that is gone),
the owner's username and full name, the title, the URL with a password
and token-like query values masked, the type (Outgoing, Two-Way or Bots,
plus Mattermost direct messages), On or Off, the activities, whether an
authentication token is set, and when it was added. The On / Off filter,
the search and the pages are server-side, from the site-admin method
webhooksReportPage; the token never reaches the browser. While all
webhooks are turned off the report still lists them and says so.

The Playwright spec turns the switch on and off from the Features pane
and checks the hidden entries, the refused client insert and its
Problems record, the kept webhook, the report rows without the token,
and that a non-admin is refused.

Thanks to xet7 !
2026-11-22 20:35:42 +02:00
Lauri Ojansivu c90bbbcd30 Turn off all webhooks: the tick in Admin Panel / Settings / Features hides every webhook screen.
The tick sits below SQRL and ActivityPub and is saved at once. While it
is on, the {{webhooksOff}} helper (client/lib/webhooksSwitch.js) hides,
rather than greys out: the board menu's Outgoing Webhooks, the Global
Webhooks entry of the Settings menu (an old link to its pane says that
all webhooks are turned off), Board Settings / Bots and the Rules action
Dispatch to bot, the due-reminder webhook tick and the webhook row of the
notification delivery settings. Opening a card no longer asks the server
to send the card-opened webhook either.

The board menu guard test now expects the extra guard on Outgoing
Webhooks and Bots: one guard more, never one fewer.

Thanks to xet7 !
2026-11-22 20:35:25 +02:00
Lauri Ojansivu cdf4da3d8d Translations: Turn off all webhooks and the All webhooks report in every language.
Eleven new strings - the switch and its description in Admin Panel /
Settings / Features, the notice that all webhooks are turned off, and
the report's title, description, empty text, Global webhook,
Authentication token, Set, On and Off - in English and translated into
every language WeKan has, in each language's own words for webhook,
Admin Panel, Settings and Features, with no placeholders. Listed in
pending-transifex.json so a Transifex translation replaces them.

Lower-confidence translations: ace, ak, am, an, as, ay, ba, bho, bi, bm,
bo, br, bua, chr, ckb, csb, cv, dz, ee, ff, fj, gn, gv, ha, haw, ig, iu,
kl, kok, ks, kw, la, lg, lld, mg, mi, nah, nap, nd, nso, ny, om, pap, qu,
rn, rup, rw, sah, sc, scn, se, sm, sn, so, ss, st, szl, ti, tig, tlh, tn,
to, tpi, ts, ve, ve-CC, ve-PP, vl-SS, vo, wal, wo and zgh; iu the weakest.

Thanks to xet7 !
2026-11-22 20:35:11 +02:00
Lauri Ojansivu d2b40f64df Turn off all webhooks: the server sends none and refuses to add or change one.
Admin Panel / Settings / Features gets one switch, stored as
webhooksDisabled on the Settings document and saved by the site-admin
method saveWebhooksDisabled (audited). While it is on:

- nothing is sent: board and global webhooks, two-way webhooks,
  Mattermost direct messages, the grouped and scheduled queue, durable
  Sync webhooks, the login and registration webhook and bot dispatches
  all ask webhooksOff() first (models/lib/webhooksSwitch.js SENDERS);
- adding or changing a webhook is refused: the Integrations deny rules,
  the REST POST/PUT and activities routes (403 webhooks-disabled), a
  webhook's own delivery settings and saveAccountWebhook. Each refusal
  is recorded in Admin Panel / Problems as "Webhooks turned off"
  (authz.webhooks-disabled, blocksAccount: false); a silent non-send is
  never recorded;
- nothing is deleted, so turning it off brings every webhook back.
  Removing a webhook stays allowed.

Also the site-admin method webhooksReportPage for the coming Admin Panel
/ Problems report: every integration with its board and owner, the
token reduced to whether one is set, secrets masked in the URL.

Tests: tests/webhooksSwitch.test.cjs (the queue sends nothing and keeps
what waits; every webhookFetch caller is a sender that asks or is listed
as not a webhook; every write path refuses and records; report rows
carry no token), a server mocha test, and the existing vm-driven suites
supplied with the switch, with a negative case that nothing is sent.

Thanks to xet7 !
2026-11-22 20:34:47 +02:00
Lauri Ojansivu 030a9e4a29 Docs: Admin Panel allowed addresses - what it is, how to use it, the way back in, and how it is enforced.
Thanks to xet7 !
2026-11-22 20:29:38 +02:00
Lauri Ojansivu 7f12264542 Admin Panel allowed addresses: from any other address the Admin Panel and the admin REST API refuse.
Admin Panel / Settings / Privacy and security / Allowed addresses is a list of
IPv4 and IPv6 addresses and CIDR ranges. Empty, the default, is any address.
When it is set, a site administrator at any other address reads as a member:
every admin method, publication, allow rule and admin REST endpoint refuses
them, the Admin Panel's tabs say why, and their boards keep working. Members
are not affected.

It is enforced where every admin check reads: the caller's user document,
through Meteor.users.findOneAsync (Meteor.userAsync, ReactiveCache.getUser
and the allow rules all end there). For the caller of the running DDP method,
publication or HTTP request, their own document reads isAdmin false, and a
query that asks about isAdmin answers as it would for a member. Signing in
reads the stored flag, because OIDC and LDAP write it back.

The address and range rules are the Cloud Panel's (models/lib/cloudAddresses.js),
and the address is resolved with HTTP_FORWARDED_COUNT like every other guard.
A list without the saver's own address is refused, in the page before saving
and on the server, and a browser write of the field is denied. The server's
ADMIN_PANEL_ALLOWED_IP_ADDRESSES wins over the list, and "any" lifts it: the
way back in. It is listed on every platform.

A refused admin action from another address is one row in Admin Panel /
Problems (authz.admin-panel-address), once per call, without disabling the
account.

Translations of the three new strings into every locale were written
directly; the rarer languages (for example Cherokee, Inuktitut, Tigre,
Wolaytta, Nahuatl, Veps, Klingon) are low confidence.

Thanks to xet7 !
2026-11-22 20:28:30 +02:00
Lauri Ojansivu 83189de8ca Update WeKan changelog: Shop, the audit log, sign-in address retention and the personal-data inventory.
Thanks to xet7 !
2026-11-22 19:57:04 +02:00
Lauri Ojansivu f5181faf77 Shop test: the Problems keys are escaped whole when matched.
Thanks to xet7 !
2026-11-22 19:55:39 +02:00
Lauri Ojansivu 3a4e889957 Shop: a product tile's description strips tags until none is left, so "<<b>b>" cannot leave a tag behind.
Thanks to xet7 !
2026-11-22 19:47:39 +02:00
Lauri Ojansivu e039e1716a Personal-data inventory: the generator is listed as one in the build-script guard, and the scan escapes a whole name.
tests/buildScriptParity.test.cjs requires every releases/ script to be a
build.sh action or to say why not; data-inventory.mjs is a generator checked
by its own test. tests/personalDataInventory.test.cjs spliced a constant's
name into a RegExp escaping only `$`; it now escapes every metacharacter
(tests/incompleteEscaping.test.cjs).

Thanks to xet7 !
2026-11-22 19:44:18 +02:00
Lauri Ojansivu 9e8bdc5381 Docs: Shop - in the feature list, the newest features, and the commits that built it.
The Shop is linked from README.md's Board View list and from Newest
features, and its two pages - Board View / Shop and Board Settings / Shop -
list the commits that made it.

Thanks to xet7 !
2026-11-22 19:42:59 +02:00
Lauri Ojansivu 0d74e6ec25 Shop: tests of the products, the prices, the settings and the orders, and of what is refused.
- tests/shop.test.cjs: products from the cards and lists on sale, prices in
  minor units, categories, totals with VAT in and out of the prices, the
  stock, Budget and billing's payment methods and references, the checkout
  gate, the buyer's details, the public view that the Shop and the Website
  share - and the negatives: a price sent with the cart is not read, a card
  not for sale or sold out is refused, an unvalidated payment method or an
  Orders list on a public board is refused, a script in a card title or a
  buyer's name is escaped text, and no code but server/shop.js writes
  shopSettings.
- server/lib/tests/shop.tests.js: the methods against a database - a
  non-admin's settings refused, a guest refused unless allowed, a switched
  off payment method refused, a tampered price ignored, the order card in
  the Orders list, the stock taken, a closed shop refused.
- tests/playwright/specs/shop-view.e2e.js: an admin opens the shop, a
  product is bought, the order card is found; a public board shows a
  visitor the shop instead of the kanban.

Thanks to xet7 !
2026-11-22 19:42:41 +02:00
Lauri Ojansivu 136fdebf96 Translations: the Shop's 38 new strings in every language.
The Shop view, Board Settings / Shop and the Admin Panel feature entry, in
English and translated into every language WeKan has, in each language's
own terms for Board View, Board Settings, Website, labels, lists and VAT,
with the placeholders unchanged.

Lower-confidence translations: ace, ak, an, ary, ay, ba, bho, bi, bm, bo,
br, bua, chr, ckb, co, csb, cv, dz, ee, ff, fj, fur, gn, gv, ha, haw, hsb,
ht, ig, iu, kl, kok, ks, ku, kw, la, lg, lld, mai, mg, mi, my, nah, nap, nd,
nso, ny, om, or_IN, pap, ps, qu, rm, rn, rup, rw, sah, sc, scn, sd, se, si,
sm, sn, so, ss, st, szl, tg, ti, tig, tk_TM, tlh, tn, to, tpi, ts, tt, ug,
uz-AR, ve, ve-CC, ve-PP, vo, wa, wa-RR, wal, wo, xh, yi, yo and zgh.

Thanks to xet7 !
2026-11-22 19:42:32 +02:00
Lauri Ojansivu 8892734fa9 Shop: every setting is enforced on the server, and refused attempts are in Admin Panel / Problems.
server/shop.js has the three methods of the Shop:

- shopSetSettings: only an active admin of the board saves Board Settings /
  Shop; the settings are checked again (fields, lists and labels of this
  board, Budget and billing's payment methods validated, an http or https
  terms link), and the Orders list must be on a private board the same user
  administers. A client write of shopSettings is refused (Boards.deny).
- shopOrderTargets: the private boards the user administers, with their
  lists, for the Orders list.
- shopPlaceOrder: refused while Admin Panel turns the Shop view off, while
  the shop is closed, for a visitor without an account unless the shop
  allows it, for a board the caller can not read, and for a payment method
  the shop does not offer. The order is priced from the cards, never from
  the cart; a total the buyer did not see is refused as a changed price; the
  stock is taken card by card, only if it is still what was priced. The
  order is a card in the Orders list, written in the name of the admin who
  chose that list while they are still its admin, numbered per shop and
  year, with Budget and billing's payment reference and instructions.
  Rate limited per connection and per address, and to 200 orders an hour
  per shop.

Admin Panel / Problems records what no screen produces: authz.shop-settings,
authz.shop-order (and, detected, a cart line carrying a price) and
dos.shop-orders, none of which disables an account.

Thanks to xet7 !
2026-11-22 19:42:15 +02:00
Lauri Ojansivu 493af44998 Board Settings / Shop: open the shop, map the cards to products, choose the Orders list and the payment methods.
A new entry in Board Settings, after List, for board admins while Admin
Panel / Settings / Features keeps the Shop view on. The popup (also opened
from the cog in the Shop's header) sets, all at once:

- whether the shop is open, its title and introduction;
- which custom field is the price, the product code and the stock, and
  whether an order takes from the stock - a field named Price, SKU or Stock
  and a list named Orders are chosen for a board that never saved it;
- the currency, the VAT and whether prices include it, the payment
  reference type;
- the lists on sale and the labels shown as categories;
- the Orders list, from the private boards the admin administers;
- whether visitors without an account may order, a terms link;
- Show the Shop instead of the public board, with the note that a public
  board opens in one view, so the Shop and the Website replace each other;
- the payment methods, from Budget and billing's, each switched on or off.

Thanks to xet7 !
2026-11-22 19:41:57 +02:00
Lauri Ojansivu 04436a739d Board View / Shop: the products on the cards as a web shop, with a cart and a checkout.
A new entry in the Board View menu, under Communication and code after
Website, shown, hidden and ordered per board like every other view, and an
Admin Panel / Settings / Features entry, Shop view, that turns it off.

The view draws the board's own cards: a grid of products with their cover
image, title, price and the first words of their description, a category
filter from their labels, a page per product with its description drawn by
WeKan's Markdown viewer, a cart kept in this browser (localStorage), and a
checkout that sends card ids and quantities, the buyer's details and the
chosen payment method. The order placed shows its number, total, payment
reference and how to pay: the QR code, the Finnish bank barcode, the link or
the account details of Budget and billing's payment methods. A closed shop
shows its products to the board's admins only.

The QR code and barcode drawing, and the payment methods' labels, move from
the Budget and billing page to client/lib/paymentCodeSvg.js, which both use.

Thanks to xet7 !
2026-11-22 19:41:49 +02:00
Lauri Ojansivu 0aa3d0b9d6 Shop: products, cart, totals and orders computed from the cards.
models/lib/shop.js is the one place the Shop's rules live, loaded by the
browser, the server and the tests alike:

- a product is a card, not archived, in a list on sale, whose price custom
  field (Number, Currency or Text) holds a number; its title, description,
  cover, labels (the categories) and optional product code and stock fields;
- money is an integer of the currency's minor unit, as in Budget and billing;
- a cart is card ids and quantities only: any price or total sent with it is
  dropped and reported, and the order is priced from the cards, with the VAT
  taken out of prices that include it or added as an invoice adds it;
- the payment methods are Budget and billing's (normalizePaymentMethod,
  paymentInstructions), and the payment reference its paymentReference;
- the checkout gate, the buyer's details (a name and an email, optionally a
  phone, an address and a message), and the order card's Markdown with every
  text the buyer typed escaped;
- a public board opens in one view, so showing the Shop there replaces the
  Website or any other public default, and the other way round.

Board Settings / Shop is stored on the board as shopSettings (a blackbox
field, written only by the server method that checks it), and a WeKan
export does not carry it to another WeKan. models/shopOrders.js numbers the
orders and keeps no personal data.

Thanks to xet7 !
2026-11-22 19:41:40 +02:00
Lauri Ojansivu bad1407412 Personal-data inventory: escape backslashes in table cells, and the shared-description guard knows the inventory only names collections.
data-inventory.mjs escaped a pipe without first escaping a backslash, so a
value ending in a backslash could add a column (tests/speedTestReportCells
pins that for the whole tree). tests/sharedDescription.test.cjs fails on any
module that mentions cardDescriptionDocs; the inventory lists every
collection by name as data and neither reads nor writes it, so it is exempt.

Thanks to xet7 !
2026-11-22 19:39:05 +02:00
Lauri Ojansivu 70769674d6 Compliance: rows 2.1 and 2.2 point at the personal-data inventory.
Row 2.1 (data inventory) and 2.2 (records of processing) are PARTIAL: the
inventory and its generated Data-Inventory.md exist; recipients per instance
and the Admin Panel / Settings / Privacy view remain for WP-6. WP-3 notes the
40 collections nothing erases yet as the WP-4 work list, and the summary no
longer says there is no inventory or no sign-in address retention.

Thanks to xet7 !
2026-11-22 19:33:58 +02:00
Lauri Ojansivu bfd83d09b6 Personal-data inventory: every collection classified, with a generated Data-Inventory.md.
models/lib/personalDataInventory.js lists all 185 MongoDB collections WeKan
defines - categories of personal data, the field that links a row to a
person, purpose, a legal-basis hint for the controller, retention and where
it is enforced, and what erasure should do and which file does it today.
Health data (workload absences of type sick, GDPR Art. 9) and financial data
(billing, time entries, shop orders, cloud invoices) are marked.

tests/personalDataInventory.test.cjs scans models/, server/ and packages/ for
every collection definition and fails on one that is not classified, on an
entry for a collection that no longer exists, on unknown categories or
missing paths, and on a new erasure gap: the collections nothing erases yet
are one explicit list for WP-4 that can only shrink.

docs/Compliance/Data-Inventory.md is generated by
releases/compliance/data-inventory.mjs, and the test checks it is current.

Thanks to xet7 !
2026-11-22 19:33:13 +02:00
Lauri Ojansivu 02baa650fe Sign-in addresses expire: LOGIN_ADDRESS_RETENTION_DAYS, default 365 days.
Where people signed in from was capped in count but kept for good, on the
account, in loginAddresses and in shortPasswordLogins. Once a day - claimed
for the whole installation - an entry last used before the cutoff is removed
from each; an address still in use keeps a recent date and stays, and 0 keeps
everything. Listed on every platform. Work package 2 of
docs/Compliance/README.md (GDPR Art. 5(1)(c) and (e), POPIA s. 14(1), PIPEDA
4.5.3, APP 11.2). tests/loginAddressRetention.test.cjs pins it.

Thanks to xet7 !
2026-11-22 19:16:44 +02:00
Lauri Ojansivu 94c598dd6b Audit log: Account settings and the table visibility modes too; the docs and the compliance row say what is recorded.
Thanks to xet7 !
2026-11-22 19:15:04 +02:00
Lauri Ojansivu 377a7b3abc Audit log: the Admin Panel's own collection writes and user anonymisation are recorded.
Settings / Appearance, Features and the other switches the Admin Panel saves
straight from the browser go through Meteor's /<collection>/insert, /update
and /remove methods, which the audit log did not wrap, so most site changes
left no trace; anonymizeUser was not audited either. The admin-only
collections - settings, announcements, translation, accessibilitySettings,
lockoutSettings, inviteToBoardRolesSettings and attachmentStorageSettings -
and anonymizeUser are now in the trail, with the arguments redacted as every
other entry's. Work package 1 of docs/Compliance/README.md (GDPR Art. 5(2),
NIS2 Art. 21(2), ISO/IEC 27001 A.8.15). tests/adminAudit.test.cjs pins it.

Thanks to xet7 !
2026-11-22 19:14:20 +02:00
Lauri Ojansivu 0e8d3e5683 Update WeKan changelog: CloudPanelBleed, settings refused on the server, Sign in with Apple, the fixes found while documenting, and the feature pages.
The finished work leaves TODO.md's In progress.

Thanks to xet7 !
2026-11-22 19:12:26 +02:00
Lauri Ojansivu 64ed512467 Labels: changing only a label's due date is saved.
editLabel skipped the write whenever a label with the same name and colour
existed - which the label being edited always is when only its due date
changes, so that change was silently not saved. Now only ANOTHER label with
the same name and colour refuses it. tests/labelDueAt.test.cjs pins it.

Thanks to xet7 !
2026-11-22 19:10:49 +02:00
Lauri Ojansivu 4364c7d008 Fix the suites that my earlier fixes broke: the hint's tests, the calendar guard, the OIDC quirks, tag stripping.
- The permanent delete hint now says Admin Panel / Settings / Delete: the
  tests that pinned the old path say the new one, and the audited Wu,
  Corsican and Latin corrections record the change, so the repair tool keeps
  it.
- calendarBaseOptions: the board calendar's editable follows
  Utils.canModifyBoard() since the write gate.
- OAUTH2_RESPONSE_MODE and OAUTH2_CLAIMS_IN_ID_TOKEN are read as process.env
  (they are environment-only) and named as such in the login catalog test.
- The attachment search text strips tags until nothing more is removed, as
  tests/tagStrippingFixedPoint.test.cjs requires.
- Login-Problems.md links sandstorm.org (sandstormOrgHosts).

Thanks to xet7 !
2026-11-22 19:10:12 +02:00
Lauri Ojansivu 99ab728ff9 Docs: Import / Export guides and notes: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
The Trello migration, Leo install, board delete, previous export,
manual migration, integrations, Excel and VBA, ICS import and attachment
pages follow the one structure; the bundled scripts' changelogs, the
history of schema migrations and the one-card-layout design keep their
content and get their commits. Fixed where the code disagreed: an
archived board is deleted only by a Global Admin with permanent delete
enabled, through Multi-Selection; the import paths are All Boards / Add
Board / Import / Import board; ICS imports need write access and the
Import page has an iCalendar source now; CSV/TSV and PDF images are
implemented; server/migrations.js is gone; the attachment migration design
names methods the code does not have, and the page now says what exists.

Thanks to xet7 !
2026-11-22 19:08:38 +02:00
Lauri Ojansivu 98b8a76bca Docs: Compliance - laws and standards against what WeKan has, with the official sources.
docs/Compliance/README.md: for GDPR, ePrivacy, NIS2, ISO/IEC 27001 and 27701,
SOC 2, HIPAA, CCPA/CPRA, LGPD, PIPEDA, the Australian Privacy Act, PIPL,
DPDP, APPI, POPIA, the Cyber Resilience Act, the European Accessibility Act
and WCAG, the Data Act, the AI Act and the imprint rules: each requirement an
application must support, with the exact provision, whether WeKan has it
(with the code), what is missing, the menu it belongs to, its priority, and
the work packages that fill the gaps. docs/Compliance/Sources.md: each
instrument's official text, version and application date, with a short
quote. A plan for WeKan's development, not legal advice; linked from
docs/README.md.

Thanks to xet7 !
2026-11-22 19:06:05 +02:00
Lauri Ojansivu f4439cb285 CLOUD on every platform, and the docs links of every docker-compose file.
CLOUD, the Cloud Admin container's domain, is listed - commented out, with
what it does - in the Dockerfile, start-wekan.sh and .bat, every
docker-compose file and the Snap (cloud=), and read as process.env.CLOUD where
tests/envVarCoverage.test.cjs sees it. The docs links fixed in
docker-compose.yml earlier are fixed in the other compose files too, which
tests/dockerComposeBackends.test.cjs keeps alike, and OAuth2.md's snap example
names a real key (docsSnapKeysExist).

Thanks to xet7 !
2026-11-22 19:05:18 +02:00
Lauri Ojansivu f6dcb7aade Mocha: the feature gate test turns the admin preview off for itself, and the REST login test reads the body as sent.
A site admin previews off features only while Admin Panel says so, and the
test database had the preview on, so the admin's call was allowed - as it
should be; the test now sets the preview off for the refusal and checks the
preview keeps the feature as the negative case. sendJsonResult writes `data`
as the body itself, so the signed-in id is json.id.

Thanks to xet7 !
2026-11-22 19:04:17 +02:00
Lauri Ojansivu 3690697c56 Tests: CloudPanelBleed is a guarded Hall of Fame vulnerability.
Thanks to xet7 !
2026-11-22 19:03:18 +02:00
Lauri Ojansivu 94c0ee6437 Playwright: settings enforced on the server, called from the page the way the hidden button would.
With Table view unticked, tableViewAddCard and setBoardView answer
feature-disabled and no card is made, and once ticked the card is added; with
Self delete off, removeUser and anonymizeUser on your own account are refused
and the account stays; with password login disabled, a DDP and a REST
password sign-in are refused, and an ordinary failure again once it is on.
It holds the password-policy lock, as the two password specs change the same
loginOptions.

Thanks to xet7 !
2026-11-22 19:02:59 +02:00
Lauri Ojansivu 47fc873e1d Password login disabled: the login method refuses a password request before any lookup, so the answer is the same for a right and a wrong password.
The validateLoginAttempt hook refused every password sign-in, but a later
hook of the same chain - the lockout's "User not found" / "Incorrect
password" - overwrote its error for a wrong password and left it for a right
one, so while password login was off the answer still said whether a
password was right. Meteor's login method now refuses a { user, password }
request itself (loginRequestRefusal), synchronously before the original
method runs; the hook stays for resetPassword, verifyEmail and createUser.
Found by the new Playwright spec.

Thanks to xet7 !
2026-11-22 19:02:59 +02:00
Lauri Ojansivu bdaad563ac Cloud Panel: a customer signs in as username_customerdomain, so one username can be a customer at many domains.
The panel's account of a customer is named username_customerdomain - their
username in their own WeKan, an underscore, their domain - and that is the
name they sign in with: the part after the last underscore picks the domain,
and only that domain's database is asked about the username before it. A
bare username, or the customer e-mail address, still works while exactly one
domain lists it, and is refused rather than guessed when two do. An account
made with the older username-domain name takes the new one at its next login.
tests/cloudPanel.test.cjs covers the name, the separator, the domain that
does not list the username and the shared domain.

Thanks to xet7 !
2026-11-22 19:02:23 +02:00
Lauri Ojansivu 4c86108dcb Docs: Import / Export index, List sync and recovery: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
External-Tools.md, Format-Coverage.md, Sync.md, Import-Run-Recovery.md and
Scrum-Import-Recovery.md follow the one structure; the pinned sections of
the index and the coverage contract stay as they are. Fixed where the code
disagreed: the import path is All Boards / Add Board / Import / Import
board; Planka, Microsoft To Do, KanbanFlow, Basecamp, Google Tasks and
Google Keep are imported through their API now, not unsupported; the
reasons for the unsupported tools are in TODO.md.

Thanks to xet7 !
2026-11-22 18:56:13 +02:00
Lauri Ojansivu 85c057de8c Docs: Outgoing Webhooks: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Mattermost, Rocket.Chat, Discord, Matrix, Node-RED, Java, receiving
webhooks, the proxy, certificate authorities and the webhook data each
follow the one structure, with the shared numbers of every webhook
(30-second timeout, the queue's retries and backoff, the internal
destinations) and how the Integrations collection, its permissions and
the outgoing request guard work. Fixed where the code disagreed: the
webhooks are under Board Settings / Outgoing Webhooks, and
WEBHOOK_TLS_CA_CERT trusts a CA without NODE_EXTRA_CA_CERTS; dead links
to the Riot issue and the Esri Java sample point at their new places.

Thanks to xet7 !
2026-11-22 18:52:50 +02:00
Lauri Ojansivu acbc4e0222 TODO: docs/Accessibility as a top-level folder.
Thanks to xet7 !
2026-11-22 18:51:30 +02:00
Lauri Ojansivu db43260918 Metrics: both allowlist names are read where the environment check sees them.
tests/envVarCoverage.test.cjs finds the variables WeKan reads by
process.env.NAME; reading them through a parameter hid
METRICS_ACCEPTED_IP_ADDRESS from it, and METRICS_ALLOWED_IP_ADDRESSES is now
listed as the operator setting every platform sets.

Thanks to xet7 !
2026-11-22 18:51:21 +02:00
Lauri Ojansivu 52a51148cd TODO: one folder per docs topic, and docs/Compliance, in progress.
Thanks to xet7 !
2026-11-22 18:50:05 +02:00
Lauri Ojansivu 7377724b6b Docs: Settings enforced on the server - what each disabling setting refuses, and what is display only and why.
The page lists every setting that turns something off or restricts it: what
the server refuses (the login settings, own account deletion, the Features
catalog, import), what it already refused before, and the settings that are
display only on purpose - the instance and board card fields, a board's
offered views, read-only Rules for members and the appearance switches - each
with its reason. Linked from Admin Panel and Who sees and can do what; the
card field decision is also written in models/lib/cardFieldVisibility.js.

Thanks to xet7 !
2026-11-22 18:50:05 +02:00
Lauri Ojansivu 2beb52cea8 Docs: the Cloud Panel with CLOUD=<its domain>, its Cloud Admins, customer login, support boards, allowed addresses and no REST API.
docs/Features/Admin-Panel/Cloud-Panel.md: how to turn it on with the CLOUD
environment variable and why it cannot be turned on from the browser any
more (CloudPanelBleed), the Cloud Admins, Admin Panel / Cloud, the customer
login against the customer's own database, the support boards and the role
chosen for customers, the allowed addresses and how to clear them from the
server (CLOUD_ADMIN_ANY_ADDRESS=true, or a mongosh command), no REST API at
that address and why the email webhooks are not there either, and the
Problems keys. README.md and Newest-Features.md say the same in short.

Thanks to xet7 !
2026-11-22 18:50:03 +02:00
Lauri Ojansivu 55ed7065ff Translations: the Cloud Panel's support board is tabla in Bosnian and ምዱድ in Tigre.
The new string Open the support board said ploča in Bosnian, which this
project keeps for the Admin Panel and dashboards, and used the Tigrinya
word for board in Tigre; tests/wrongLanguageCorrections20261014.test.cjs
and tests/tigreAllBoardCardContexts.test.cjs pin both.

Thanks to xet7 !
2026-11-22 18:50:03 +02:00
Lauri Ojansivu ed7aa22642 REST API: none at the Cloud Panel's address for a request without a login.
At the CLOUD address there is no POST /users/login nor /users/register at
all - signed in or not, both being ways of getting a login - and no other
/api/ or /users/ request without one (models/lib/cloudPanel.js
cloudRestDecision): 404, recorded in Admin Panel / Problems as
authn.cloud-rest-off. The gate sits after the bearer token is read and in
front of every route; a request carrying its login in ?authToken= or the
login cookie, as the browser's exports do, is asked too. The inbound email
and bounce webhooks are refused there as well: the panel turns no email
into cards and sends nothing that bounces. Every other host, and every
WeKan without CLOUD, is unchanged.

tests/apiBodyParsing.test.cjs declares the pure module the middleware now
loads; tests/cloudPanel.test.cjs and tests/cloudPanelGate.test.cjs pin the
decision and its place.

Thanks to xet7 !
2026-11-22 18:50:03 +02:00
Lauri Ojansivu ac856dd38f Cloud Panel: only with the CLOUD environment variable; its Cloud Admins, customer login, support boards and allowed addresses.
CloudPanelBleed. Any site administrator of any WeKan could set the Cloud
Panel Domain and its SuperAdmin in Admin Panel / People / Cloud and then
make the server connect to any MongoDB server with credentials of their
choosing - Test connection and Import build a MongoClient from the
domain's database settings. A customer is the administrator of their own
WeKan container, so a customer could reach MongoDB servers on the internal
network.

The Cloud Panel now exists only where the server has CLOUD=<its domain>
(models/lib/cloudPanel.js cloudDomainFromEnv). The domain is never read
from the database, the browser or the REST API; the People / Cloud pane is
gone and cloudPanelGetSettings / cloudPanelSetSettings always refuse. Every
cloudPanel* method except cloudPanelWhoAmI passes the CLOUD gate before
anything else, its argument checks included, and the one MongoClient built
from data that is not the environment (withSource) has the gate in its own
body. A refusal is recorded in Admin Panel / Problems under the new keys
authz.cloud-panel-off, authz.cloud-panel-access and
authn.cloud-admin-address (bleed CloudPanelBleed; none disables an
account).

- Cloud Admins: on the CLOUD container its site administrators - the first
  registered user is one - not disabled, never a customer's account. They
  have Admin Panel / Cloud (/admin/cloud/<pane>, a tab shown only for a
  Cloud Admin at the CLOUD address): Domains, Invoices, Tickets, Chat,
  Cloudflare, Caddy, Allowed addresses. /cloud stays the customers' panel.
- Customer login: a password login handler, ahead of accounts-password's
  and after the timing normalization, only at the CLOUD address, only for a
  name exactly one domain with its own database lists, never for a name an
  account of the panel's own has. The password is checked against that
  customer's own database hash with Accounts._checkPasswordAsync, under an
  id no local account has; a disabled or password-less account there is
  refused, and so is a wrong 2FA code. On success a local non-admin account
  without a password, services.cloudCustomer, which sees exactly its own
  domain: info, invoices, tickets and chat.
- Support boards: one WeKan board per domain, "Support: <domain>", lists
  Open / In progress / Done for tickets and Chat with one card whose
  comments are the support chat (Board View / Chat shows them as a chat).
  Cloud Admins are board admins, customers Comment only: they read and
  comment but cannot create, edit, move, archive or delete a card nor
  manage the board; the panel adds their tickets into Open. The earlier
  cloudChatMessages are moved once into the chat card; imported
  Rocket.Chat and SandChat conversations go there too.
- Allowed addresses: IPv4, IPv6 and CIDR ranges (models/lib/cloudAddresses.js).
  When set, a Cloud Admin login (resume included) from elsewhere is refused
  and recorded, and so is a Cloud Admin method. A list without the saver's
  own address is refused; CLOUD_ADMIN_ANY_ADDRESS=true sets it aside for a
  locked-out operator.

Tests: tests/cloudPanel.test.cjs, tests/cloudAddresses.test.cjs,
tests/cloudPanelAccess.test.cjs (the real methods and login handler without
and with CLOUD), tests/cloudPanelGate.test.cjs (the MongoClient source scan),
server/lib/tests/cloudPanel.security.tests.js and
tests/playwright/specs/cloud-panel.e2e.js (negative without CLOUD; the
positive part runs with CLOUD=localhost WEKAN_TEST_CLOUD=true). The guards
that pin board inserts, comment inserts, card-reading paths, copy/move
methods, the Admin Panel tabs and method areas list the panel's support
board and its methods, with the reason.

Thanks to xet7 !
2026-11-22 18:49:51 +02:00
Lauri Ojansivu c5b3b597e8 Disable all import: the Trello API, iCalendar and Scrum transfer imports are refused on the server too.
"Disable all import" says the server rejects any import request, and most
import paths asked assertImportEnabled(), but trelloStartImport and
trelloResumeImport, importIcsToBoard and its REST route, and
scrum.importIntoBoard did not. They ask now, after their argument checks.

tests/importDisabledEverywhere.test.cjs holds it tree-wide: every server
method or REST route whose name says it imports asks assertImportEnabled(),
directly, through a file-local helper or by handing the request to
importBoard, or is listed with the reason it is no import of board data.

Thanks to xet7 !
2026-11-22 18:49:01 +02:00
Lauri Ojansivu 68dcfd14fe Admin Panel / Settings / Features: an unticked feature is refused on the server, not only hidden.
An unticked feature hid its menus and nothing else: the Table, Chat, Email,
Version Control and Scrum views' methods and publications still answered,
setBoardView still stored a hidden view, and a client could still turn on a
list policy, a commitment point, a WIP limit per person or a split list.

models/lib/featureServerGates.js lists, for every catalog feature, its server
paths, its write gates, or why it is display only. requireFeature /
featureAllowed (server/lib/assistGate.js) refuse with feature-disabled and
record the attempt in Admin Panel / Problems as Disabled setting; the Scrum
methods are wrapped in one place, except the ones the card details, Board
Settings and data recovery use too; Boards / Lists deny rules refuse turning
a flow policy on; setCardFlow refuses Done here while split lists is off;
setBoardView refuses a hidden view. Board Settings / Scrum settings follows the
Scrum views tick, as it opens in the Sprints view.

tests/featureServerGates.test.cjs fails when a catalog feature is undecided,
or when a method or publication of a feature file does not ask the gate.

Thanks to xet7 !
2026-11-22 18:46:33 +02:00
Lauri Ojansivu 8f5a091b22 Docs: Card and Board View settings, Archive, Labels, Filter and Members: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Fixed where the code disagreed: Board View rows are reordered by drag and
drop and the Up and Down keys, not by arrow buttons; public boards are
hidden from Admin Panel / Settings / Appearance; an archived board is
restored from the Boards in Archive page and deleted only by a Global
Admin with permanent delete enabled, through Multi-Selection; a label's
due date alone is not saved by editLabel (recorded as a known issue);
Roles.md no longer points at a gap or a heading that do not exist.
tests/boardRoles.test.cjs reads Known gaps up to its next heading, since
Setting a role moved up to How to use it.

Thanks to xet7 !
2026-11-22 18:42:56 +02:00
Lauri Ojansivu 57a24eb8ba Own account deletion and username change follow their settings on the server, and the last admin stays.
Admin Panel / People / Login / Self delete user account unticked only hid the
Delete and Anonymize buttons: removeUser and anonymizeUser on your own account
still worked, and so did DELETE /api/users/:userId for an administrator's own
id. And removeUser's self branch returned before the last-administrator
check, so the only site administrator could delete themselves.

Now every self-removal path asks models/lib/selfAccountRemoval.js: refused
while the setting is off (recorded in Admin Panel / Problems as Disabled
setting, never disabling the account), and refused for the last site
administrator (not recorded: the button is there, so it is ordinary use).

Username Change unticked: the setUsername method already refused, but the
Users allow rule still let a client write its own username directly; a
Users.deny rule now refuses that and records it.

Thanks to xet7 !
2026-11-22 18:39:49 +02:00
Lauri Ojansivu 3c00120c32 TODO: laws and standards in more detail, and the Shop board view, in progress.
Thanks to xet7 !
2026-11-22 18:36:28 +02:00
Lauri Ojansivu 22bfe054bb Metrics: the address allowlist is read under the name every platform sets.
Docker Compose, the Dockerfile, start-wekan.sh and the Snap set
METRICS_ALLOWED_IP_ADDRESSES, and /metrics read only
METRICS_ACCEPTED_IP_ADDRESS, so an allowlist set the documented way never
applied. Both names are read now, the older first, entries trimmed; an empty
list allows nobody. tests/metricsAllowedAddresses.test.cjs pins it.
Also: OAUTH2_RESPONSE_MODE and OAUTH2_CLAIMS_IN_ID_TOKEN, read since Sign in
with Apple was fixed, are environment-only variables with the reason.

Thanks to xet7 !
2026-11-22 18:36:05 +02:00
Lauri Ojansivu 24be123ee5 Password login disabled and forgot password disabled are refused on the server.
PASSWORD_LOGIN_ENABLED=false only hid the password form: a DDP login with a
password, or POST /users/login, still signed in with a local password. Now an
Accounts.validateLoginAttempt hook refuses every password-service sign-in
(login, resetPassword, verifyEmail, createUser) whether the password was right
or not, and POST /users/login answers 403 before it looks up any user. LDAP
keeps working: with LDAP on, a REST username goes to the directory only, and
the LDAP handler's own LDAP_LOGIN_FALLBACK stays the operator's LDAP decision.

Forgot password unticked only hid the link: Meteor's forgotPassword method
still e-mailed a reset link. It is refused now, and also while password login
is off.

The decisions are models/lib/passwordLoginPolicy.js. Each refusal shows in
Admin Panel / Problems as Password login disabled or Forgot password disabled,
without disabling the account. New page
docs/Features/Admin-Panel/Settings-Enforced-On-Server.md.

Thanks to xet7 !
2026-11-22 18:36:04 +02:00
Lauri Ojansivu 705f12e754 Calendar: a day click adds a card, and a drag moves one, only for who may write on the board.
The calendar offered both to every member, read-only ones too, and the
server refused them - recording each refusal in Admin Panel / Problems as an
attempt (DueDateBleed), which a read-only member clicking a day is not. Now
editable and selectable follow Utils.canModifyBoard(), so a refusal is again
only an attempt. tests/calendarWriteGate.test.cjs pins it.

Thanks to xet7 !
2026-11-22 18:33:14 +02:00
Lauri Ojansivu 942d1f022c Docs: Card actions: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Copy, Move, Link, More, QR code, Create board from card, Drawing, Flow fields,
Flowtime and Pomodoro, Planning Poker, Linked cards and Requested/Assigned By
follow one structure, checked against the code: Create board from this card is
no longer hidden from members who can edit the card, a Pomodoro break ends in
ready-to-start rather than the next work interval, a Pomodoro stopped during
Work credits the minutes worked, and the timers have their own Board Settings /
Card rows instead of depending on Time Tracking.

Thanks to xet7 !
2026-11-22 18:31:21 +02:00
Lauri Ojansivu 9e01b2db1a Docs: Board Settings: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
The right sidebar, Board Settings and its entries - Notifications, Date,
Bots, Export and Import, Swimlane, List, Change color, Board announcement,
All Boards Settings, Scrum meetings and settings, background images and the
cleaner task board options - each follow the one structure, from the code.
Fixed where the code disagreed: background uploads are board-level
attachments chosen inside Change Background Image (there is no separate
Board backgrounds entry or backgrounds storage directory), and the date
format for everyone is in Admin Panel / Settings / Appearance.

Thanks to xet7 !
2026-11-22 18:31:20 +02:00
Lauri Ojansivu bfa0748518 Docs: Card features: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Scrum, Set color, Similar cards, Subtasks, Suggested members, Time
tracking, Watch and Star, Whiteboard, Cover image, Locations and Stickers
follow one structure. Corrected from the code: Filter: Subtasks is in the
Subtasks heading's hamburger, the whiteboard keeps the drawing's own size,
the card-field switches are in Admin Panel / Settings / Features, the map
links follow the chosen provider of eleven, Time tracking describes the
card's spent time and time by day, and Scrum now has native sprints.

Thanks to xet7 !
2026-11-22 18:30:01 +02:00
Lauri Ojansivu c7fa0e3e84 TODO: accessibility in progress.
Thanks to xet7 !
2026-11-22 18:28:48 +02:00
Lauri Ojansivu 681927309e Docs: General: Translations: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Translations, Customize translations, the Change Language popup and Push all.
Corrected against the code: the English source is
imports/i18n/data/en.i18n.json, not i18n/en.i18n.json, and the pull is a
per-key merge; a custom translation's Text is the catalog key it replaces.

Thanks to xet7 !
2026-11-22 18:26:18 +02:00
Lauri Ojansivu e16e698b5c Docs: General: Translations: the review and audit notes keep their content and get their commits.
Twenty-one translation review, audit and evidence pages are records, not
feature pages, so their text is unchanged and each ends with the commits that
wrote it.

Thanks to xet7 !
2026-11-22 18:26:18 +02:00
Lauri Ojansivu d076911d93 TODO: the work in progress - Cloud Admin, settings refused on the server, the docs, laws and standards, and the bugs found while documenting.
Thanks to xet7 !
2026-11-22 18:25:57 +02:00
Lauri Ojansivu 3e6a5fdf5e Docs: Card attachments, custom fields and dates: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected from the code: the PDF and Office preview is the browser's
own PDF viewer and the Office viewer, and the server extracts only the
search text (no HTML4 page or GIF images any more); WebDAV is a storage
too; a board's custom fields are in Board Settings / Card / Custom
Fields; the Admin only checkbox reads "Visible only to board admins";
a due date more than 48 hours away keeps the due date's yellow, not
grey; the forecast method is boards.cycleTimes.

Thanks to xet7 !
2026-11-22 18:24:41 +02:00
Lauri Ojansivu 75f02d9c32 Docs: Admin Panel index, URLs, validation, Who sees what and Attachments: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
The Attachments README counts its 13 panes (it said 12), the old /information
address is documented as redirecting to /admin/settings/version, and the
retention, limits and backup numbers are taken from the code.

Thanks to xet7 !
2026-11-22 18:23:39 +02:00
Lauri Ojansivu 04c5b399aa Translations: the Cloud Panel's new strings in every language.
Seven new keys, translated into the language of every locale file: the
Cloud Admin page's refusal without the CLOUD environment variable, Add
ticket, Allowed addresses with its description, your address and the
lockout warning, and Open the support board. The __address__ placeholder
is kept exactly. Low confidence, for a native speaker to correct: chr, ak,
bm, ay, bi, bo, dz, ee, ace, bua, csb, cv, ba, bho, as, br, am, an, ary,
tlh, vo, nah, iu, zgh, uz-AR, wal, tig, rup, lld, sah, ve-PP, ve-CC, gv,
kw, nap, scn, ks, qu, lg, ff, rn, nd, ss, ts, nso, st, tn, to, tpi, sm,
mg, mi, haw, wo, ps, yi, mai, kok, szl, hsb, fur, sc, se, kl, om, so, sn,
ny, ig, yo.

Thanks to xet7 !
2026-11-22 18:23:38 +02:00
Lauri Ojansivu 407ad71e28 Docs: Cards: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected from the code: card aging is in Board Settings / All Boards
Settings; Mark as complete is off by default on both sides; the checklist
menu says Edit as text and Automatic reset, whose Off is Off (do not reset
automatically); Card recurrence is under Move and copy in the card menu;
Reset width follows Create cards from action items; comment replies are
grouped under their parent and capped at one level; Admin Panel / Settings /
Features holds Card fields; the Card section lists Blocked, Class of
service, MoSCoW and WSJF.

Thanks to xet7 !
2026-11-22 18:23:33 +02:00
Lauri Ojansivu a65fe52a2d Docs: General: Email: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected against the code: reply-by-email no longer needs WITH_API=true,
because the inbound email paths pass that gate on their own, and replies can
also arrive through the IMAP mailboxes Email to card added.

Thanks to xet7 !
2026-11-22 18:22:16 +02:00
Lauri Ojansivu 2dbc2a30be Starred pages: the comment says what toggling does - a starred page clicked again is removed.
It described a re-star that keeps the place and takes a new title, which the
one-button toggle never does.

Thanks to xet7 !
2026-11-22 18:21:21 +02:00
Lauri Ojansivu 80b70100bb Fixes found while documenting: the card count, the permanent delete hint, two comments.
- Show cards count if list contains more than N showed the count at N
  already; it now shows from N + 1, as it says.
- The hint under Archive pointed to Admin Panel / Problems / Delete; the
  switch is in Admin Panel / Settings / Delete. Fixed in every language.
- boardsList.jade said the header labels drop below 1100px; they drop at
  1000px and narrower.
- docker-compose.yml linked docs/Login/autologin.md and
  docs/Login/Keycloak/Keycloak.md, which moved to docs/Features/Login-Page/.

Thanks to xet7 !
2026-11-22 18:20:50 +02:00
Lauri Ojansivu dfbd1a6d18 Sign in with Apple: response_mode=form_post, and the claims read from the ID token.
Apple has no userinfo endpoint and its access_token is opaque, and it
requires response_mode=form_post for the name and email scopes. The OIDC
login decoded the access token and sent no response mode. Now
models/lib/oidcProviderMode.js decides, from the settings: Apple's address
(or OAUTH2_CLAIMS_IN_ID_TOKEN=true) reads the claims from the ID token - also
for a setup made from the old docs with OAUTH2_ADFS_ENABLED=true - and sends
form_post (or OAUTH2_RESPONSE_MODE); every other provider is unchanged.
tests/oidcProviderMode.test.cjs pins the decisions and the wiring.

Thanks to xet7 !
2026-11-22 18:19:06 +02:00
Lauri Ojansivu 17fdad790a Docs: General: Accessibility: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected against the code: the 50-300% header zoom control was removed in
favour of Member Settings / Font, and the fluid clamp() typography was
reverted for #6465 to the 14px base. The audit keeps its content as a
report, with its commits.

Thanks to xet7 !
2026-11-22 18:18:49 +02:00
Lauri Ojansivu 6bb55652ec Docs: General: Theme: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected against the code: the colour picker shows grouped swatches and
applies at once, with no Save; a new theme today goes into config/const.js,
models/lib/themeCategories.js and boardColors.css; Corteza has been added.
Converting Stylus to CSS keeps its content as a developer note, with its
commits.

Thanks to xet7 !
2026-11-22 18:16:52 +02:00
Lauri Ojansivu f4264cf7a9 Docs: Import / Export formats Super-Productivity to monday-com: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Each format page now has the one structure: What it is, Read more (with
the Wikipedia page of the tool or format), How to use it (the import and
export steps and the REST API as its subsections), How the numbers are
calculated (the format's own limits and the limits every import has),
How it works in WeKan (the import method, the export routes, the format's
own code and tests, then the format details) and Commits. The import path
is All Boards / Add Board / Import / Import board, as the code draws it;
dead links are replaced or unlinked.

Thanks to xet7 !
2026-11-22 18:16:52 +02:00
Lauri Ojansivu 6e7cd35eda Docs: Import / Export formats Microsoft-To-Do to Slack: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Each format page now has the one structure: What it is, Read more (with
the Wikipedia page of the tool or format), How to use it (the import and
export steps and the REST API as its subsections), How the numbers are
calculated (the format's own limits and the limits every import has),
How it works in WeKan (the import method, the export routes, the format's
own code and tests, then the format details) and Commits. The import path
is All Boards / Add Board / Import / Import board, as the code draws it;
dead links are replaced or unlinked.

Thanks to xet7 !
2026-11-22 18:16:51 +02:00
Lauri Ojansivu bea184b2ea Docs: Import / Export formats Google-Tasks to Microsoft-Teams: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Each format page now has the one structure: What it is, Read more (with
the Wikipedia page of the tool or format), How to use it (the import and
export steps and the REST API as its subsections), How the numbers are
calculated (the format's own limits and the limits every import has),
How it works in WeKan (the import method, the export routes, the format's
own code and tests, then the format details) and Commits. The import path
is All Boards / Add Board / Import / Import board, as the code draws it;
dead links are replaced or unlinked.

Thanks to xet7 !
2026-11-22 18:16:51 +02:00
Lauri Ojansivu 80b45a4c58 Docs: Import / Export formats Asana to Google-Takeout: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Each format page now has the one structure: What it is, Read more (with
the Wikipedia page of the tool or format), How to use it (the import and
export steps and the REST API as its subsections), How the numbers are
calculated (the format's own limits and the limits every import has),
How it works in WeKan (the import method, the export routes, the format's
own code and tests, then the format details) and Commits. The import path
is All Boards / Add Board / Import / Import board, as the code draws it;
dead links are replaced or unlinked.

Thanks to xet7 !
2026-11-22 18:16:51 +02:00
Lauri Ojansivu 688760a402 Docs: General: the editor, Markdown, dependencies, filenames and drag and drop: what each is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected against the code: sixteen languages are right-to-left, not six; the
drag-handle choice is saved in the user profile, and in localStorage only when
nobody is logged in; Red Strings are shown from Member Settings, not the board
header; Markdown task lists render as checkboxes; the emoji list link points
at the plugin's current data file. Mermaid stays documented as removed.

Thanks to xet7 !
2026-11-22 18:13:40 +02:00
Lauri Ojansivu 124b61f286 Docs: Login Page: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Header login, Impersonate user, Keycloak, LDAP AD Simple Auth and LDAP,
in the same order as the rest: what it is, where to read more, the steps
with the real menu labels, the numbers and how the code computes them,
the implementation and its tests, and the commits that built it.

Corrected where the code disagreed: header login is environment-only
and the Admin Panel shows it read-only, Impersonate user is behind the
row's three-dot link, the LDAP button is Test LDAP Connection, the LDAP
Docker example points at the repository's docker-compose.yml, the
jboss/keycloak image link is replaced, and the AD Simple Auth page no
longer links to itself for the other LDAP settings.

Thanks to xet7 !
2026-11-22 18:11:51 +02:00
Lauri Ojansivu 2f9fb01ff1 Docs: Login Page: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
ADFS, Accounts lockout, Adding users, Apple, Authelia, Azure, B2C, CAS,
Disable password login, Forgot password, Google Cloud and Google login,
each in the same order: what it is, where to read more, the steps with
the real menu labels, the numbers and how the code computes them, the
implementation and its tests, and the commits that built it.

Corrected where the code disagreed: Self-Registration and Invite People
are in Admin Panel / People / Login, users can be deleted, signing up
without email no longer shows Internal Server Error, a known user's
lock lives in the user document, the current Snap and the default
Docker FerretDB container have no MongoDB shell, the doc's line anchors
and dead Apple links are updated, and Apple's claims are read from the
access token first.

Thanks to xet7 !
2026-11-22 18:11:43 +02:00
Lauri Ojansivu 90e1da878d Docs: Admin Panel / Settings: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Every Settings pane page now has What it is, Read more, How to use it, How
the numbers are calculated, How it works in WeKan and Commits, checked
against the code. Corrected where the old text no longer matched: the
Translation pane pages 10 rows, its Text column is the translation key and
New is the first column; Version lists all five groups and Check Version;
Appearance gains its board-creation, description, date, card width, autolink,
login colour and logo upload settings; Features and Feature profiles list
the whole catalog; Shared labels is the menu's own label; Global Webhooks
describes Internal destinations.

Thanks to xet7 !
2026-11-22 18:11:14 +02:00
Lauri Ojansivu 87a283cb29 Docs: Member Settings: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Every Member Settings page, and the three Date pages, now has the same
sections: What it is, Read more, How to use it, How the numbers are
calculated, How it works in WeKan, and Commits. Checked against the
code; where the old text no longer matched, it is corrected:

- Change Settings: the switches save at once, Save applies only the
  card-count number; the switches that were not documented (drag
  handles, marking changed cards, Submit editors with Enter, Open many
  cards at once, the checklist sound, the card count, the description
  rescue) are listed, and the count shows from that number of cards on,
  not only above it.
- Edit Profile: a member's own username and e-mail change is saved when
  the Admin Panel allows it, not only for an administrator.
- Support: a signed-out visitor is no longer sent to sign-in; the Public
  setting decides.
- Calendar systems: the calendar is chosen in the Date popup; the date
  picker's Today button and year, month and day controls are described,
  and the heading shows the month and year.
- Change Password: a change signs every session out.
- Member Settings menu: Workload and Budget and billing entries, and the
  current labels Search All Boards and Archive.

Thanks to xet7 !
2026-11-22 18:08:03 +02:00
Lauri Ojansivu 49666d2abb Docs: Features index and the menu audits: what the index is, how to use it, and the commits.
The index names the real places: your username at the end of the header
bar, the member menu, and Rules under the right sidebar's Board Settings.
The two audit records keep their content and get their commits.

Thanks to xet7 !
2026-11-22 18:07:21 +02:00
Lauri Ojansivu 150a470e58 Docs: Billing: what the feature is, how to use it, how its numbers are calculated, how it works, and its commits.
The feature switch is in Admin Panel / Settings / Features; the numbers
section gives the formulas of the budget, VAT, penalty interest, margin and
references, and the 14-day default payment terms.

Thanks to xet7 !
2026-11-22 18:06:25 +02:00
Lauri Ojansivu 910239b53f Docs: Workload: what the feature is, how to use it, how its numbers are calculated, how it works, and its commits.
It is opened from the member menu; a week is grey-blue only when its
allocations are also under 50 %.

Thanks to xet7 !
2026-11-22 18:06:25 +02:00
Lauri Ojansivu 9e97f5119d Docs: Board header and board views: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Search now describes the two separate buttons (the shared headerSearchButton
template is gone), the sidebar toggle, stepping through results and what is
searched; Activity rendering names Admin Panel / Settings / Security, where
the security controls moved; Chat view lists only cards with a conversation
and the unread counts; Calendar gets its title and all its dates.

Thanks to xet7 !
2026-11-22 18:06:25 +02:00
Lauri Ojansivu c9b297d976 Docs: Admin Panel / People: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Every People page now has What it is, Read more, How to use it, How the
numbers are calculated, How it works in WeKan and Commits, checked against
the code. Corrected from the code: Locked Users shows only the settings
(who is locked is in People), the People action is Unlock All, the test
button is "Send a test email to yourself", ACCOUNTS_COOKIE_REFRESH_RATE_LIMIT
is in the Login form now, Notifications has exactly two services, an
Organization admin gets Settings / Appearance (was Visibility), and Roles
has custom roles and the Roles Status table.

Thanks to xet7 !
2026-11-22 18:05:55 +02:00
Lauri Ojansivu 74717ea829 Docs: Login Page: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
OAuth2, OAuth providers, SAML, SQRL, Windows SSO, passkeys, two-factor,
passwordless, session cookies, password hashing, autologin, multitenancy,
Nextcloud, Oracle, Zitadel and the Let's Encrypt setup, each in the same
order, checked against the code. Corrected where the code had moved on:
passwordless codes are 10 characters for 15 minutes and are not counted by
the lockout; an OAuth2 login merges an existing account only when enabled
and the email is verified; the Admin Panel sections are under People; the
two-factor entry is hidden only on Sandstorm and for OAuth2 accounts; the
Zitadel example no longer turns on B2C; Rocket.Chat's claim is
preferred_username.

Thanks to xet7 !
2026-11-22 18:05:22 +02:00
Lauri Ojansivu acd6c500e5 Docs: Admin Panel / Problems: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
RAM usage, the Problems README, Recovery, Repairs, Rules Report, Security
Report, Snap, Speed, Summary and Tests now open with what the feature is,
links to read more, step-by-step use, how each number is computed and how it
is implemented, and end with the commits that built it.

Corrected from the code: the automatic board repair no longer un-binds lists
(since #6515); Recovery's rule email section has Review, Resend, Mark as sent
and Drop, and a section for legacy rule emails; Delete is under Settings; the
Product name is in Settings / Appearance; Speed rows fold per kind of request,
not per path; the RAM row detail has WeKan RSS and no load; the snap command
falls back to MONGO_URL and prints the Databases section.

Thanks to xet7 !
2026-11-22 18:04:25 +02:00
Lauri Ojansivu a8d9e271fe Docs: General: History, Undo, the Table Page, Multi-Selection, links and notifications: what each is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected against the code: History shows 25 rows per page, not the ten of
the Table Page, and its card, list, swimlane and board scopes are live;
Multi-Selection is no longer one shared header template, and on All Boards it
is a sidebar row; Duplicate Board opens a popup of parts to copy.

Thanks to xet7 !
2026-11-22 18:04:06 +02:00
Lauri Ojansivu a28cd22db7 Docs: Header bar: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected from the code: the star group counts boards, pages, swimlanes,
lists and cards, and its popup is titled Starred (allboards.starred), not
Starred Boards; your username is at the end of the bar, not the top right.

Thanks to xet7 !
2026-11-22 18:04:05 +02:00
Lauri Ojansivu 601c04504e Docs: All Boards: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Each of the 13 All Boards pages now opens with What it is, Read more,
How to use it and How the numbers are calculated, keeps its design text
under How it works in WeKan, and ends with the commits that built it.

Corrected where the code had moved on: the starred count in the header
counts boards, pages, swimlanes, lists and cards; Board Settings is reached
from the right sidebar; Public Boards also lists instance boards to a
signed-in visitor; permanent delete is enabled in Admin Panel / Settings /
Delete; the Archive page is named in the first header bar; every Archive
entry opens /allboards/archive; header labels hide at 1000px; the workspace
menu is a hamburger; the Shared templates scopes are an instance setting
and domains come from every email address; organizations as well as teams
must be the board admin's own to share a template with.

Thanks to xet7 !
2026-11-22 18:02:12 +02:00
Lauri Ojansivu 174debbeea Docs: Rules: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected from the code: a rule may have up to ten more triggers and ten
more actions (it said one of each); rule suggestions count the different
cards a pair happened on, not the times; Blocks and History are opened from
Board Settings, the Rules page's own sidebar being gone; the Rules page has
a Back to the board; the rule variables list the short, people and custom
field tokens too; the IFTTT screenshots load from this folder instead of
the wekan.fi addresses that no longer answer.

Thanks to xet7 !
2026-11-22 18:01:45 +02:00
Lauri Ojansivu 33a3e2f8a3 Docs: Board views: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Gantt, Group by Assignee, Map, Multi Board Calendar, Roadmap, Statistics,
Table, Time, Timeline, Board-view titles and Version Control now follow the
shared structure, checked against the code. Corrected from the code: the
menu names are Frappe Gantt and DHTMLX Gantt; those two draw a card only
when it has a Start or Received date, and also draw dated checklist items;
Roadmap groups only by text and dropdown fields and puts cards without a
value in a No value row instead of leaving them out; Multi Board Calendar
labels entries "[Board] Card" and follows the sidebar Filter; the Statistics
view no longer shows the time spent summary, which is in the Time view; the
Frappe Gantt repository link points to frappe/gantt.

Thanks to xet7 !
2026-11-22 18:01:20 +02:00
Lauri Ojansivu 698b65b94a Docs: Scrum: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Product Backlog, Sprints, Sprint Report and Velocity and Scrum History
recovery, checked against the code; the change-by-change scope and burndown
and the daily observations are described as built rather than as remaining
work. The Scrum design note keeps its content and gets its commits.

Thanks to xet7 !
2026-11-22 18:00:14 +02:00
Lauri Ojansivu 193baae902 Docs: Board charts: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Burndown and Velocity, the board report charts, the twelve board reports,
flow analytics and the time issue audit, checked against the code: the
charts' menu groups, the single Export popup, eleven charts rather than ten,
Burndown and Burnup completion from endAt or archivedAt, the Control label,
and the move reason labels.

Thanks to xet7 !
2026-11-22 18:00:07 +02:00
Lauri Ojansivu 89af889874 Docs: Admin Panel / Problems, API to Durable operations: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
API, Boards Report, Broken Cards, CPU usage, Cards Report, Data health,
Database problems and Disk usage get What it is, Read more, How to use
it, How the numbers are calculated, How it works in WeKan and Commits,
checked against the code. Corrections: the API table has the Location
columns; the Boards Report filter says Signed-in users; Broken Cards
says the Summary count leaves out unknown card types; the CPU tuning
table lists the FerretDB watch, statistics and maintenance variables;
the nightly Data health hours run to 06:00 and custom fields on no
board have no repair; the database probe's thresholds are listed; Disk
usage uses fs.statfsSync. The two design notes, Design and Durable
operations, keep their text and get their commits.

Thanks to xet7 !
2026-11-22 18:00:06 +02:00
Lauri Ojansivu c66af0e134 Docs: Admin Panel / Problems (Files to Performance): what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
File status, Filesystem integrity, Impersonation Report, Instrumentation,
Large boards, Login problems, Migrations, Offices, Password length and
Performance now each say what the feature is, where to read more, how to use
it, how its numbers are calculated, how it is implemented, and link the
commits that built it.

Corrected from the code: the file status scan limits are 100,000 records per
collection and 250,000 versions, not 20,000; the snap's FerretDB default is
OpLog with polling as the fallback, not polling only; the Password length
table has 25 rows a page.

Thanks to xet7 !
2026-11-22 17:59:12 +02:00
Lauri Ojansivu 4a016735cb Docs: Lists: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Every page under docs/Features/Lists now has What it is, Read more, How to
use it, How the numbers are calculated, How it works in WeKan and Commits,
checked against the list header, its popups and the server methods.

Thanks to xet7 !
2026-11-22 17:56:50 +02:00
Lauri Ojansivu d894858793 Docs: General: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Metrics, Stats, Cleanup, Summary, Since your last visit, Original
positions, the helpers that need no AI, Timezone, Keyboard shortcuts, Logs,
Wait Spinners and a board that keeps loading, checked against the code.

Thanks to xet7 !
2026-11-22 17:56:35 +02:00
Lauri Ojansivu 70d767208d Docs: Pages: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Corrected from the code: the member menu opens from the avatar at the end
of the first header bar, not the top left; My Cards are the cards you are a
member or assignee of; My Attachments are the files you uploaded, not every
attachment; the star count covers swimlanes, lists and cards too, and the
Starred page /starred-items is described.

Thanks to xet7 !
2026-11-22 17:54:18 +02:00
Lauri Ojansivu 77dc56591d Docs: Swimlanes: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
The Add Swimlane steps now name the real "Add many lines as:" choice
(1 Swimlane / Many Swimlanes) instead of a choice made with Add.

Thanks to xet7 !
2026-11-22 17:50:57 +02:00
Lauri Ojansivu c8397afbfc Update WeKan changelog: BounceBleed, attachment search and integrity, the card details width, the Meteor 3 menu, the import fix and the build logs.
Thanks to crypto-nidh, rmb82 and xet7 !
2026-11-22 17:41:07 +02:00
Lauri Ojansivu d7af7a3a66 README: attachment search and integrity, the slideshow, the card details width.
Thanks to xet7 !
2026-11-22 17:38:36 +02:00
Lauri Ojansivu 4599e34518 Security download: a build log the log endpoint refuses is read through gh run view, and why it failed is kept.
The first run downloaded the failed jobs but none of their logs: the log
endpoint answers with a redirect to storage, and the reason was only on the
screen. Now gh run view --log-failed reads the same log, and when both
refuse, job-<id>-<name>.log-error.txt and the summary say why.

Thanks to xet7 !
2026-11-22 17:38:05 +02:00
Lauri Ojansivu b335c5df07 Attachments: a SHA-256 and plain search text for each, checked on every read, and searched by Filter, Search and Search All Boards.
Every attachment gets its SHA-256 (contentHash: value, size, time) and its
plain search text (with the time it was made) when it is added, and - for
one added before this - the first time it is read whole. Text, Markdown,
CSV, code, JSON, HTML and e-mail are read as text, PDF and Office through
the document extractor, Outlook .msg and OpenDocument from their slideshow
rows. A new attachment's "Added" card history row carries its hash, and so
do the soft delete and restore rows.

Each whole read hashes the bytes on their way out, with no second read: no
stored hash - it is stored; the same - nothing; another hash that the card
history knows - an earlier version an undo or restore brought back - a new
hash and search text are made; anything else - a warning in Admin Panel /
Problems (integrity), keeping the stored hash. A range is no evidence.

Filter's text field, the board's Search and Search All Boards find a card by
its attachments' text; each index row is checked against its live
attachment on that card, and the text is never sent to the browser.

tests/attachmentContent.test.cjs pins the decisions and the wiring;
tests/playwright/specs/attachment-content-search.e2e.js adds a file, finds
it three ways, changes it on disk (warned), reads a range (nothing) and
brings back a known version (accepted, indexed again).

Thanks to xet7 !
2026-11-22 17:37:15 +02:00
Lauri Ojansivu 689d538152 Security download: the newest build logs too, to fix failing builds from the files.
releases/sec/download-github-security.sh now also writes, per repository,
<datetime>/builds/: runs.json with the newest GitHub Actions runs, and for
every workflow whose newest finished run failed, its jobs and each failed
job's whole log and last 200 lines. SUMMARY.md gets a Builds table - failed
workflows first, their failed jobs and steps, and where the logs are.
--builds N looks at the N newest runs (default 100), --builds 0 at none. A
workflow's name is a directory name, never a path.

tests/securityDownloadScript.test.cjs: the newest finished run per workflow,
only failed jobs' logs, the summary row, a repository without Actions, and
--builds 0.

Thanks to xet7 !
2026-11-22 17:25:38 +02:00
Lauri Ojansivu 9372148915 Card details window: remembers the width it is dragged to, and an admin sets the default as a percentage.
- The width the bottom corner handle drags the card to is kept per user, as
  the left menu's is: profile.cardDetailsWidth for a signed-in user, a cookie
  otherwise. Every card opens at it, within the viewport. Reset width in the
  card menu, or a double-click on the handle, forgets it.
- Admin Panel / Settings / Appearance / Card details default width: a
  percentage of the browser window, 30 to 95, at least 520px; empty is 520px.
- The card opened as a popup takes the same width; the mobile view and the
  maximized card do not.
- A resize that made the card wider ended with the mouse outside it, which
  closed the card: the resize is now a drag the close handler knows.

models/lib/cardDetailsWidth.js decides the width (tests/cardDetailsWidth.test.cjs),
client/lib/cardDetailsWidthMemory.js sets --wekan-card-details-width and
notices the drag, and tests/playwright/specs/card-details-width.e2e.js drags
the real handle in Chromium. The four new strings are in every language.
Translations with low confidence: chr, iu, kl, tlh, vo, wal, wo, zgh, nah,
tig and ve-PP; lower than usual also ay, gn, qu, ff, ee, bm, lg, fj, gv, kw,
lld, rup, szl, sah, cv, bua, ba, bo, dz, ks, se, wa, om, ak, sn, ts, tn, ss,
nd, ve, sm, to, tpi, bi, rn and wuu-Hans.

Thanks to rmb82 and xet7 !

Fixes #6939.
2026-11-22 17:22:16 +02:00
Lauri Ojansivu e5bfcf0d53 Tests: BounceBleed is a guarded Hall of Fame vulnerability.
Thanks to crypto-nidh and xet7 !
2026-11-22 17:22:01 +02:00
Lauri Ojansivu 3c6427cbfd Tests: the Meteor 3 menu's fake ssh gets the server directory from the environment.
The directory was spliced into the fake ssh script with a partial escape,
which tests/noIncompleteRegExpEscaping.test.cjs rightly refuses.

Thanks to xet7 !
2026-11-22 17:22:01 +02:00
Lauri Ojansivu b530f5c1a4 Meteor 3 hosting: one menu, build.sh, for every script - run here or on a server over SSH.
docs/Platforms/FOSS/Container/Docker/Meteor3/build.sh lists every script of the
directory in groups (server setup, customers, backups, running) and asks
each one's parameters. Its settings.ini (mode 600, set from the menu) names
the server - a host of ~/.ssh/config such as c2 - and the directory on it.
With a server set nothing runs locally: the scripts and templates are copied
to that directory and the script runs there over ssh -t, so the machine the
menu runs on keeps no passwords. A config example is shown, never run.

tests/meteor3BuildMenu.test.cjs plays the server with a fake ssh: every .sh
is in the menu, settings round-trip, the script runs on the server after the
copy, settings.ini and admin.txt are never copied, and a host that is an ssh
option, a relative directory, an unknown script or a bad customer name are
refused.

Thanks to xet7 !
2026-11-22 16:52:02 +02:00
Lauri Ojansivu 81ca7b868b Security: BounceBleed - a forged bounce report no longer stops email to any address.
POST /api/inbound-email needs no secret by default, and every email it
received was first checked for being a delivery status notification: one
forged DSN naming any address became a hard bounce, which stops every email
WeKan sends there - invitations, notifications, password resets - and only an
administrator could undo it.

A bounce is now recorded only from a transport that proves who sent it: the
webhook when its secret is configured and matched, SES after its SNS
signature and topic are checked, an IMAP mailbox WeKan signs in to, and the
Sandstorm grain's own mailbox. Elsewhere it is refused with 403, makes no card
or comment, and is summarized in Admin Panel -> Problems as BounceBleed.

tests/bounceBleed.test.cjs requires every receiver to say whether it may
carry a bounce, only the trusted ones to say yes, and nothing to record a
bounce around the gate. server/lib/tests/inboundEmailRoute.tests.js posts the
advisory's forged DSN over HTTP without, with a wrong and with the secret.

GHSA-7w85-38ph-c96v, GHSA-2wcc-f289-3r95, GHSA-735h-p955-fwxp.

Thanks to crypto-nidh and xet7 !
2026-11-22 16:48:15 +02:00
Lauri Ojansivu a7cd22f94c Import: a .zip that becomes a new board, and a Trello API import, run as the importing user.
POST /api/import/zip?newBoard=1 - All Boards / Import of a WeKan .zip, and
"Import many boards" - answered 500 for every archive that named people:
"Meteor.userId can only be invoked inside a method, publication, or WebApp
endpoint". trackImport() runs the import at once, and only the await of its
promise was wrapped in the importer's method context, so the creator had
already asked Meteor.userId() for the file's people (membersMode=me) and for
rows with no author. The Trello API import job started TrelloCreator with no
context at all. Both now start the import inside the context.

tests/importZipUserContext.test.cjs requires every trackImport() outside a
Meteor method to be started inside withValue or runAsUser, and finds the old
shape nowhere. tests/playwright/specs/gitea-backup-wekan-import.e2e.js
imports a Gitea backup's WeKan .zip as a new board through the route, with
its cards, comments, labels and files.

Thanks to xet7 !
2026-11-22 16:39:48 +02:00
Lauri Ojansivu 6a5e8360f0 Update WeKan changelog: server-converted previews, and the slideshow docs.
Thanks to xet7 !
2026-11-22 12:58:42 +02:00
Lauri Ojansivu 53c0fbeba0 Docs: the attachment slideshow - which files are shown, and how much is read.
Thanks to xet7 !
2026-11-22 12:58:37 +02:00
Lauri Ojansivu cd74045a9f Attachment slideshow: Outlook .msg and OpenDocument are converted once, a piece at a time, into rows read a screen at a time.
An Outlook .msg (a Compound File of scattered sectors) and an
OpenDocument (a ZIP whose text is a compressed content.xml) cannot be
read a row at a time as they are: the slideshow read a .msg whole, up to
32 MB, and an OpenDocument as far as it was scrolled. Now the server
converts each the first time it is opened (server/lib/
attachmentPreviewStore.js):

- the original is read from its own storage in 64 KB byte ranges, never
  whole; of a .msg only the sector tables are kept and the text streams
  (models/lib/outlookMsgFormat.js openCompoundFile, outlookMsgRows),
  attachment data is never read; of an OpenDocument only content.xml is
  inflated and parsed as a stream (models/lib/zipDirectory.js and
  odfBlocks.js, moved from the client so both share them);
- what is found is written as rows - one JSON object a line - with an
  index of where each starts, to temporary names renamed when complete,
  in attachment-previews/ under the files root; made again when the file
  changes and removed with the attachment; two conversions at a time;
- one preview takes at most 512 MB of the server's disk, and a row
  repeated more than 100,000 times is written that many times.

The parts are served at /cdn/storage/attachments/<id>/preview-meta,
-index and -rows, after every check the original has, with Range, as
application/octet-stream, nosniff and a sandboxing CSP. Two path
segments, as /thumbnail: Meteor-Files answers every longer path under
/cdn/storage itself. The slideshow reads them through
client/lib/attachmentRecords.js into IndexedView, whose scrollbar is
exactly the rows; only the visible rows are fetched and drawn, and no
viewer reads a file whole any more.

tests/attachmentPreviewStore.test.cjs reads a .msg with a 5 MB
attachment through ranges and finds it the same as the whole-file
reader without reading the attachment, a 60,000-line body and an
HTML-only body as rows, an OpenDocument's 6 MB picture never read, the
repeat and disk guards, made once and removed, and the route after
every check. attachment-rich-preview.e2e.js opens a 100,000-line .msg
in Chromium and finds only ranged preview parts fetched, the last line
at the end of the scrollbar, and the preview refused without signing in.

Thanks to xet7 !
2026-11-22 12:58:26 +02:00
Lauri Ojansivu e9923f28e3 Update WeKan changelog: the slideshow reads only what is on the screen.
Thanks to xet7 !
2026-11-22 12:18:09 +02:00
Lauri Ojansivu d6652f19b7 Attachment slideshow: only what is on the screen is read, with no row or size limit.
The text-like viewers read a whole file (up to 32 MB) and showed at most
1000 rows or 2048 names. Now only what is on the screen is fetched and
only that is in the page (client/lib/attachmentWindow.js):

- Text, .log, CSV/TSV, source code, and JSON and Markdown larger than one
  chunk are read through HTTP Range requests in 256 KB chunks, at most 16
  kept. The scrollbar is the whole file: dragged to the middle it shows
  the middle, scrolled a little it moves row by row, at its end is the
  last row. A row ends at a newline or at the next multiple of 4096 bytes
  of the file, so rows are found the same from any byte, a 50 MB line of
  minified JSON is many rows, and no UTF-8 character is split. A server
  that ignores Range (a legacy CollectionFS attachment) is read only up
  to the bytes wanted.
- ZIP lists its names from the central directory through Range requests,
  ZIP64 too, without downloading any entry.
- tar and tar.gz, iCalendar and OpenDocument are read in order as far as
  they are scrolled - infinite scroll downwards - since compressed data
  cannot be read from its middle. An OpenDocument's content.xml is found
  in the central directory and only it is inflated and parsed as a
  stream; a sheet's rows repeated to the edge of the grid cost nothing.
- Plain text no longer goes to an <object>, which loaded it whole.

A footnote's paragraphs no longer end the OpenDocument paragraph they sit
in. tests/attachmentWindow.test.cjs drives the rows and views against a
fake Range server; the viewer and ZIP tests show no limit is left and
that only windows are fetched; attachment-rich-preview.e2e.js opens a
150,000-row CSV in Chromium and finds only 206 ranges fetched, the middle
and the last row shown, and only a screenful of rows in the page.

Thanks to xet7 !
2026-11-22 12:17:19 +02:00
Lauri Ojansivu 68a2b16739 Merge remote-tracking branch 'origin/main' 2026-11-22 11:49:01 +02:00
Lauri Ojansivu 39cd6c4e91 Update WeKan changelog: the attachment slideshow shows more kinds of files.
Thanks to xet7 !
2026-11-22 11:38:57 +02:00
Lauri Ojansivu 6d842a5e2f Attachment slideshow: Markdown, CSV, code, iCalendar, Outlook .msg, tar and OpenDocument.
The slideshow showed images, PDF, video, audio, plain text, ZIP listings
and docx/xlsx/pptx. It now also shows, with viewers loaded only when such
a file is opened (client/lib/attachmentRichViewer.js):

- Markdown (.md) formatted, through WeKan's own +viewer, so an attached
  file follows every setting a card description does;
- CSV and TSV as a table (papaparse), the first 1000 rows;
- source code and JSON coloured by highlight.js - an HTML or SVG source
  file is shown as text, never run;
- iCalendar (.ics) events and tasks, with WeKan's iCalendar reader;
- Outlook .msg headers, text and attachment names, with WeKan's reader;
- tar, tar.gz and .tgz file names (fflate, with an inflate limit and
  header checksums);
- OpenDocument text, spreadsheets and presentations (.odt, .ods, .odp)
  as headings, paragraphs and tables.

Everything a file contains reaches the page as text. Whether a file opens
is now one answer, attachmentCanPreview, shared by the card, the board's
version control view and the history table; the history table's copy had
lost ZIP. tests/attachmentRichViewer.test.cjs drives each viewer in jsdom,
with negative tests for binary files, refused downloads, gzip bombs,
damaged tar headers and huge OpenDocument content, and
attachment-rich-preview.e2e.js opens each kind in Chromium.

Thanks to xet7 !
2026-11-22 11:38:20 +02:00
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
github-actions[bot] 8440a5e0fb Bump versions for v13.21 2026-11-20 14:32:35 +00:00
Lauri Ojansivu 31a808be6e Prepare v13.21 release 2026-11-20 16:31:29 +02:00
Lauri Ojansivu 2ce90cb95e Update WeKan changelog: docs follow the menus, newest features, README.
Thanks to xet7 !
2026-11-20 16:25:12 +02:00
Lauri Ojansivu 0c277c4d18 Docs follow the menus: Scrum meetings under Board Settings, the newest features, README feature list.
Scrum meetings moved to Board Settings / Scrum-Meetings.md, Board Settings
Card, List and Scrum pages name the flow fields, list policies, Definition
of Ready, standup and retrospective settings. Admin Panel / Settings /
Features lists the new Kanban and Scrum features, and every doc that still
said Settings / Visibility / Features names the pane where they are now.
Newest-Features.md gains a November 2026 guide, and README.md lists the
reports, flow features, mail/calendar/chat imports and paged exports.

Thanks to xet7 !
2026-11-20 16:24:41 +02:00
Lauri Ojansivu b0612ebe57 Update WeKan changelog: Taiga export paged.
Thanks to xet7 !
2026-11-20 16:20:05 +02:00
Lauri Ojansivu 9f85b51695 Taiga export is written a page of cards at a time; every export is now paged.
Taiga's project was built whole, the last export that was. Every page now
makes the project over the whole board from the light first pass - every
ref, kanban and task order, status, point and attribute definition the
whole board's - and keeps only its own cards' epics, stories, tasks and
issues, their descriptions and histories (the text the first pass does not
read) from the cards themselves. The tasks made of story checklist items,
which have no card of their own, are on the last page, after the other
tasks, as in the whole project; whether the project has epics and issues
is said from the whole board. The paged JSON writer writes the four arrays
a pass each.

TODO.md's "Import and Export of large files" is done: every export is
written a page at a time. tests/exportPaging.test.cjs checks every page
size against the whole project; the round trip of every export (Taiga
among them) and the import/export audit (173) pass.

Thanks to xet7 !
2026-11-20 16:20:04 +02:00
Lauri Ojansivu 9c3a543f0a Update WeKan changelog: Push Snap to Store.
Thanks to xet7 !
2026-11-20 16:11:30 +02:00
Lauri Ojansivu 49dbdbb6d6 Push Snap to Store: a workflow that releases the wekan, wekan-ondra and wekan-gantt-gpl snaps of a GitHub release to every Snap Store channel.
On v13.20 every build was green and the snaps were on the GitHub release,
but the Snap Store kept the old version. The release jobs upload with
`snapcraft upload --release=stable,candidate,beta,edge`; the store kept
the revisions in "processing", releases/snap-upload-retry.sh stopped
waiting after 1800 s and left the release to the store with a warning, and
the store never released them.

.github/workflows/snap-store.yml ("Push Snap to Store") runs after every
"Release All Platforms" run and by hand for any tag, snap names and
channels. It downloads <name>_*.snap from the release, and for each file
releases/snap-store-push.sh:
- releases the revision the store already has for that version and
  architecture - an earlier upload that finished processing later -
  without uploading it again;
- otherwise uploads without --release and releases the revision the
  upload created, by number;
- when the upload is cut off while the store is processing, asks the
  store until the revision appears and releases it; when it never does,
  fails, so the run is red rather than green with an old snap.
The release job's processing warning now says that this workflow finishes
the release.

tests/snapStorePush.test.cjs runs the script against a fake snapcraft
through all four ways, and checks the workflow's triggers, defaults and
input checks.

Thanks to xet7 !
2026-11-20 16:11:21 +02:00
Lauri Ojansivu 17ab5f8459 Update WeKan changelog: Super Productivity export paged.
Thanks to xet7 !
2026-11-20 16:00:45 +02:00
Lauri Ojansivu 6187806cf1 Super Productivity export is written a page of cards at a time.
Its backup was built whole. Every page now makes the backup over the
whole board from the light first pass - projects, tags, panels, task ids,
sub-task lists - and keeps only its own cards' task entities, their notes
(the description and checklists, the one part the first pass does not
read) from the cards themselves. The paged JSON writer streams an
object's entries as well as an array's elements, each entry passing the
export boundary with its key, and writes data.task.entities a page at a
time.

tests/exportPaging.test.cjs checks every page size: the pages' entities,
in order, are the whole backup's, and the rest is the same. The round
trip of every export (Super Productivity among them) and the
import/export audit (173) pass.

Thanks to xet7 !
2026-11-20 16:00:44 +02:00
Lauri Ojansivu 369dd91789 Update WeKan changelog: Vikunja export streamed.
Thanks to xet7 !
2026-11-20 15:41:24 +02:00
Lauri Ojansivu bd34f44460 Vikunja export is streamed a page of cards at a time, and carries what each task waits for.
Vikunja's export was built whole: a .zip of data.json made in memory. Its
formatter now plans the whole board once from the light first pass - each
card's task id, project, index and position, its comments' ids, the users
and labels in the order the cards first name them, the parent links - and
writes only its own page's tasks, with the same projects, views and
buckets on every page. The .zip is written by streamVikunjaZip: data.json
through streamJsonArrays, each project's tasks, task buckets and positions
a pass over the pages, the tasks as the archive writes them
(vikunjaArchiveData), the HTML made from text the export boundary has
checked, as the whole export's is; then filters.json and VERSION.

A task's dependencies are its "blocked" relations, which the Vikunja
import reads as is-blocked-by. The round trip of every export now
includes Vikunja, through its .zip: it keeps the description, checklist,
comment, dependency, label and due date. tests/exportPaging.test.cjs
checks every page size against the whole document; the import/export
audit (173) passes.

Thanks to xet7 !
2026-11-20 15:41:23 +02:00
Lauri Ojansivu 2d823e16dc Update WeKan changelog: four more exports carry dependencies.
Thanks to xet7 !
2026-11-20 15:17:36 +02:00
Lauri Ojansivu c9da13b63e Asana, OpenProject, Obsidian and Wrike exports carry what each card waits for.
Each of their imports reads a task's dependencies - Asana's dependencies,
OpenProject's blocked relations, Obsidian's Tasks plugin 🆔 and ⛔, Wrike's
Depends On <Key>FS - but none of the exports wrote them. Each now does,
from one reading of the board's dependencies: what every card waits for,
from a dependency stored on either card, over the whole board whichever
page is written (models/lib/exportPaging.js blockersOf, which
Taskwarrior's depends now uses too).

The round trip of every export keeps the dependency in eight formats now
(KEEPS): Jira, Kanboard, OpenProject, Asana, Taskwarrior, Obsidian,
Redmine and Wrike. tests/exportDependencies.test.cjs; the import/export
audit (173) passes.

Thanks to xet7 !
2026-11-20 15:17:35 +02:00
Lauri Ojansivu 80e653b4ba Update WeKan changelog: .mbox labels.
Thanks to xet7 !
2026-11-20 14:56:02 +02:00
Lauri Ojansivu c0b3d9013d The .mbox export carries the card labels as Gmail's; the round trip of every export checks labels and due dates.
The mail import reads X-Gmail-Labels into labels, but the .mbox export
wrote no labels, so they were lost. A card's message now carries its
labels in that header (a comma in a name, which separates them there, is
a space); its comment replies carry none.

export-import-round-trip.e2e.js gives Alpha Card a board label and a due
date, and its KEEPS table two more columns, written from what each
format's file kept: what a format has no place for - an outline's labels
and due dates, OpenProject's labels, Wrike's template, which has no tags
column - stays out. tests/mailFormat.test.cjs; the import/export audit
(173) passes.

Thanks to xet7 !
2026-11-20 14:56:01 +02:00
Lauri Ojansivu 394a8fd32c Update WeKan changelog: Jira and Taskwarrior dependencies.
Thanks to xet7 !
2026-11-20 14:32:08 +02:00
Lauri Ojansivu d613a00030 Jira and Taskwarrior exports carry the card dependencies; the round trip of every export checks them.
Both imports read dependencies - Jira's fields.issuelinks
(models/jiraCreator.js createDependencies), Taskwarrior's depends as "is
blocked by" - but neither export wrote them, so they were lost. Jira's
issue links keep the direction of blocks and duplicates and are Relates
otherwise; Taskwarrior's depends lists what each card waits for, from a
dependency stored on either card. The keys and uuids are the whole
board's, whichever page the card is on.

export-import-round-trip.e2e.js gives Alpha Card a dependency on Beta Card
and its KEEPS table a fourth column: Jira, Kanboard, Taskwarrior and
Redmine keep it. tests/exportDependencies.test.cjs; the import/export
audit (173) passes.

Thanks to xet7 !
2026-11-20 14:32:07 +02:00
Lauri Ojansivu d1a1d46b73 Update WeKan changelog: Trello .zip export with attachments.
Thanks to xet7 !
2026-11-20 14:02:46 +02:00
Lauri Ojansivu e8330fb090 Trello .zip export: the Trello board JSON with the cards' attachment files, imported back with them.
Board Settings / Export / Trello .zip Attachments (export/trellozip)
downloads trello.zip: the Trello document as board.json, written a page
of cards at a time by the multi-array writer, and each exported card's
attachments as the files they are, attachments/<id>_<name>, piped from
the file store as WeKan's own .zip export does
(server/lib/renderExternalExport.js streamTrelloZip). board.json names
each attachment by that file name (trelloZipFileName), which the Trello
.zip import matches, so the files come back with their cards. It is not an
"Export all boards" format, which makes each board's file whole.

The round trip spec imports a Trello .zip with a file, exports it as a
Trello .zip, finds the file's exact bytes in it, imports that back and
downloads the same bytes from the imported board. The Trello docs page
describes it.

Thanks to xet7 !
2026-11-20 14:02:45 +02:00
Lauri Ojansivu a18d2a553c Update WeKan changelog: Trello archived cards and lists.
Thanks to xet7 !
2026-11-20 13:37:39 +02:00
Lauri Ojansivu 3ac8b802c5 Trello export carries the archived cards and lists, as Trello's closed ones.
Trello's own export has its closed cards and lists; WeKan's had only the
open ones. The Trello export now collects the archived cards and lists too
(ARCHIVED_FORMATS in models/lib/externalExporters.js; every other format,
the open ones, and no format a deleted one) and writes them closed: true,
which the Trello import reads back as archived. The round trip spec exports
an archived card and finds it archived on the imported board.

Thanks to xet7 !
2026-11-20 13:37:38 +02:00
Lauri Ojansivu 1fa7af0679 Update WeKan changelog: GitHub-like comments, the round trip of every export.
Thanks to xet7 !
2026-11-20 13:19:09 +02:00
Lauri Ojansivu df92d8de63 Every export that WeKan also imports is round-tripped in one spec, each held to what its file keeps.
tests/playwright/specs/export-import-round-trip.e2e.js exports a board -
a card with a description, a checklist, a comment and a label - in each of
the 41 formats WeKan both writes and reads, imports the file back through
POST /api/boards/import/<tool>, and requires the card to come back. Its
KEEPS table is what each format's file keeps of the description, the
checklist and the comment, as found now; a format that keeps less fails,
and one that keeps more fails too, so the table is raised with it. That is
how the Trello export that did not import back went unnoticed: no test
imported an export of it.

Thanks to xet7 !
2026-11-20 13:19:08 +02:00
Lauri Ojansivu ba31f2b592 GitHub, Gitea and Forgejo exports carry the cards' comments.
They are written as comments_data, the embedded comments the issues parser
reads (models/lib/externalParsers.js issueComments), with each author's
login and date, so an exported board imports back with its comments.

Thanks to xet7 !
2026-11-20 13:19:08 +02:00
Lauri Ojansivu ba657b9ab7 Update WeKan changelog: Trello custom fields.
Thanks to xet7 !
2026-11-20 12:56:15 +02:00
Lauri Ojansivu c20c7296a8 Trello export carries the custom fields; the Trello import reads a number field's value as a number.
The board's custom fields are Trello fields, one per name its cards use,
typed by what every value of it is (checkbox, number, date, else text),
and each card's values are its customFieldItems in Trello's value shapes.
Trello writes a number field's value as text, so the Trello import now
stores it as a number, for a real Trello file as for WeKan's export.
tests/trelloExportImportable.test.cjs and the round trip spec, which
exports a number field and finds it, and its value 3, on the imported
board; the import/export audit (173) and admin-only field specs (12) pass.

Thanks to xet7 !
2026-11-20 12:56:14 +02:00
Lauri Ojansivu 9222a60e41 Update WeKan changelog: the Trello export imports back; a Trello file with no members imports.
Thanks to xet7 !
2026-11-20 12:36:30 +02:00
Lauri Ojansivu cde21a7651 Trello export imports back, with its checklists, comments and members.
The first tool of the import/export coverage review (TODO.md). The Trello
export wrote no card's dateLastActivity or pos, which WeKan's own Trello
import checks every card for, so no Trello export imported back at all;
and its checklists and comment actions were empty arrays.

Every card now has an ISO date of its last activity and its position (over
the whole board, whichever page it is on); the card's checklists are
Trello checklists with their items' state, its comments commentCard
actions with their dates, and the board's people - owners, assignees,
comment authors, from the whole board - Trello members, each card naming
its own in idMembers. A label with no name is an empty name.

The paged JSON writer writes a document with several card arrays, each by
a pass of its own over the pages (streamJsonArrays); Trello's cards,
checklists and actions are three.

tests/trelloExportImportable.test.cjs holds the export to what the
import's checks require; tests/playwright/specs/trello-export-round-trip.e2e.js
exports a board as Trello and imports it back with its checklist, comment
and title. The import/export audit (173) and the admin-only custom field
specs (12) pass.

Thanks to xet7 !
2026-11-20 12:36:23 +02:00
Lauri Ojansivu d1be2d2131 Trello import of a file with no members no longer does nothing.
trelloGetMembersToMap called data.members.forEach, so a Trello board file
without a members list - a board nobody else is on, or one written by
another tool - threw in the browser, and Import and Import without mapping
members silently did nothing. No members is nobody to map, as the WeKan
import's mapper already reads it.

Thanks to xet7 !
2026-11-20 12:36:23 +02:00
Lauri Ojansivu 5d8c4a7635 Update WeKan changelog: every workbook export is streamed.
Thanks to xet7 !
2026-11-20 11:41:30 +02:00
Lauri Ojansivu db9c06dc5e monday.com, Businessmap and Wrike workbooks are streamed a page at a time too.
Every workbook export is now written by ExcelJS's streaming workbook
writer, a row at a time, instead of a whole workbook in memory.

- monday.com and Businessmap: one sheet each; the columns any card fills
  (monday.com's custom fields; Businessmap's optional columns, comment
  columns and other fields) and Businessmap's parent Card IDs are found
  over the whole board from the light first pass, the header written on
  the first page (server/lib/streamSheetWorkbook.js, shared).
- Wrike: the lanes' order, the folder rows and every row's Key are planned
  over the whole board (wrikePlan, wrikePageOrder); the pages come in that
  order and a lane's folder row goes before its first card. The date
  columns are date cells, as in the whole workbook.

tests/workbookStream.test.cjs checks every page size against the whole
sheet and reads each streamed workbook back as the whole one; the
import/export audit (173) and the admin-only custom field specs (12) pass.

Thanks to xet7 !
2026-11-20 11:41:28 +02:00
Lauri Ojansivu 338674fd1e Update WeKan changelog: Teamwork and Planner workbooks are streamed.
Thanks to xet7 !
2026-11-20 11:21:51 +02:00
Lauri Ojansivu a2257442a8 Teamwork and Planner workbooks are written a page of cards at a time with ExcelJS's streaming writer.
The workbook exports were built whole, as an ExcelJS workbook in memory.
Teamwork's and Planner's are now written to the response by
ExcelJS.stream.xlsx.WorkbookWriter, each row committed as it comes
(server/lib/renderExternalExport.js STREAMED_WORKBOOKS), every page's rows
through the export boundary as the whole workbook's are.

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

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

Thanks to xet7 !
2026-11-20 11:21:50 +02:00
Lauri Ojansivu 03e2fb416d Update WeKan changelog: Nullboard exports are paged.
Thanks to xet7 !
2026-11-20 11:01:04 +02:00
Lauri Ojansivu 4666bb60f4 Nullboard exports are written a page at a time, each list around its notes.
Nullboard's formatter writes its JSON as text, so the nested writer reads
it as JSON (text: true) and ends the file with its newline. Its lists -
the board's, then one per title of a list its cards name that is not
exported - are found over the whole board, so every page has the same
lists, and the pages come list by list with those cards grouped by the
title (byList: 'listIdsThenTitles'). tests/exportPaging.test.cjs checks
every page size; the import/export audit (173) and the admin-only custom
field specs (12) pass.

Thanks to xet7 !
2026-11-20 11:01:03 +02:00
Lauri Ojansivu bd9ec7e585 Update WeKan changelog: Deck and Kanri exports are paged.
Thanks to xet7 !
2026-11-20 10:42:25 +02:00
Lauri Ojansivu 21c64e092d Deck and Kanri exports are written a page at a time, each list around its cards.
Deck's stacks and Kanri's columns hold their cards. The pages come list
by list in the board's order by list id (byListIdOrder, a list only a card
names after them); the document around the lists and each list around its
cards are made on the first page from the board's lists and its light
first pass, and each list is opened at its first card and closed after its
last, a list with no cards written where it stands. Every part passes the
export boundary and the admin-only field redaction.

A Deck card is in the stack of its own list by id: two lists of one name
each carried the other's cards. Kanri's cards of no list are one column,
where each such card made a column of its own; its tags in use are found
over the whole board, list by list.

tests/exportPaging.test.cjs checks every page size against the whole
document; the import/export audit (173) and the admin-only custom field
specs (12) pass.

Thanks to xet7 !
2026-11-20 10:42:24 +02:00
Lauri Ojansivu fc502d7206 Update WeKan changelog: JSON exports with one card array are paged.
Thanks to xet7 !
2026-11-20 10:23:17 +02:00
Lauri Ojansivu f293ae4076 JSON exports whose cards are one array are written a page at a time: Trello, Jira, Asana, Zenkit, OpenProject, GitHub, Gitea, Forgejo, GitLab.
The first page writes the document around the card array, with the array
left open, and every page then writes its own cards into it
(server/lib/renderExternalExport.js JSON_PAGED, streamJsonExport). Each
part passes the export boundary (secureTransfer) and the admin-only field
redaction, as sendJsonResult does for a whole document; the headers are
sendJsonResult's.

What a card refers to on another page is counted over the whole board from
the light first pass: Jira's issue keys and custom field names, and
OpenProject's numbers, positions and custom field columns.

tests/exportPaging.test.cjs checks, for every page size, that the pages'
arrays together are the whole array and the document around them the
first page's, and that nothing is written without passing the boundary and
the redaction. The import/export audit (173) and the admin-only custom
field specs (12) pass.

Thanks to xet7 !
2026-11-20 10:23:16 +02:00
Lauri Ojansivu df731e648c Update WeKan changelog: Focalboard and Mattermost exports are paged.
Thanks to xet7 !
2026-11-20 10:02:26 +02:00
Lauri Ojansivu bad71f9a1e Focalboard and Mattermost exports are written a page of cards at a time.
Both are NDJSON. Focalboard's board record names its status, label and
custom field options over the whole board, and Mattermost's head names
every channel and user over the whole board: each is written on the first
page from the board's light first pass, and every page then writes its own
cards' blocks or posts. tests/exportPaging.test.cjs checks every page size
against the whole file; the import/export audit passes, 173/173.

Thanks to xet7 !
2026-11-20 10:02:25 +02:00
Lauri Ojansivu b021a8be99 Update WeKan changelog: Leo outlines are paged.
Thanks to xet7 !
2026-11-20 09:52:23 +02:00
Lauri Ojansivu e1261ef5fb Leo outlines are written a page of cards at a time too.
Leo's file holds the outline (<vnodes>) and, after it, the card texts
(<tnodes>) under the outline's node numbers. The outline holds only titles
and checklists, which the board's light first pass already has, so the
first page writes the whole outline from it, and every page then writes
its own cards' texts, numbered the same pre-order way as before: a list,
its cards, each card's checklists and their items. tests/exportPaging.test.cjs
checks every page size against the whole file, and the import/export audit
passes, 173/173.

Thanks to xet7 !
2026-11-20 09:52:05 +02:00
Lauri Ojansivu 46a66c623b Update WeKan changelog: the outlines and the Notion CSV are paged.
Thanks to xet7 !
2026-11-20 09:43:28 +02:00
Lauri Ojansivu ce40b56abd The Markdown, Obsidian, OPML and Org mode outlines and the Notion CSV are written a page of cards at a time.
The outlines group cards under their lists, so their pages come list by
list in the board's order (byList: 'lists', models/lib/exportPaging.js
byListOrder): a list's heading opens before its first card and closes
after its last, wherever the page boundary falls, and a list with no cards
is written where it stands, from the board's light first pass
(outlineMarks). Lines are joined with the separator before each line
(joinPage), so the pages together are byte for byte the whole file. The
Notion CSV counts its swimlane and custom field columns over the whole
board and writes its header on the first page.

Every page also passes the board's, lists' and swimlanes' titles through
the export boundary, as the whole-file export does; before, a paged
format's list titles came straight from the database.

Markdown and Obsidian write a list title once: two lists of one name used
to write their heading twice, each with the cards of both.

Leo stays whole: its card texts are a second section after the whole
outline. tests/exportPaging.test.cjs checks every page size against the
whole file, with empty lists and a card of a list the board does not have;
tests/playwright/specs/import-export-format-audit.e2e.js passes, 173/173.

Thanks to xet7 !
2026-11-20 09:43:18 +02:00
Lauri Ojansivu 3cbf938ae8 Update WeKan changelog: split lists, the archived v12.49.
Thanks to xet7 !
2026-11-20 09:16:52 +02:00
Lauri Ojansivu fd5c207006 Lists split into Doing and Done.
A list can be split into Doing and Done (models/lib/boardFlowPolicies.js):
a card of it marked Done here, with the circle at its minicard's corner,
waits dimmed and edged green to be pulled into the next list, and the
list header counts Doing and Done. The mark names the list it was made in
(card.flow.splitDoneListId, written by setCardFlow from the card's own
list, and only in a split list), so a card moved on is in Doing of its new
list without anybody clearing it.

A board admin allows split lists in Board Settings / List, and each list
is split from its menu. Admin Panel / Settings / Visibility / Features /
Split lists hides it on every board. Translated in every language.

Thanks to xet7 !
2026-11-20 09:16:10 +02:00
Lauri Ojansivu 3a1d670155 Archive v12.49 in old-CHANGELOG/2026/10.md, where the changelog's size budget moved it.
The previous changelog commit removed v12.49 from CHANGELOG-big.md, as
releases/changelog-archive.mjs does when the file is over its budget, but
left out the archive part that holds it.

Thanks to xet7 !
2026-11-20 09:16:00 +02:00
Lauri Ojansivu 4989cd0b51 Update WeKan changelog: standup timer, retrospective board, list policy fix.
Thanks to xet7 !
2026-11-20 08:54:46 +02:00
Lauri Ojansivu 2f7a4e210f Daily standup timer and retrospective board in the board menu.
Two Scrum meeting helpers, offline and with no AI
(models/lib/scrumMeetings.js, docs/Features/Scrum/Meetings.md):

- Daily standup: the board's active members in a shuffled order, each
  with the same timebox (Minutes per person in the Scrum settings, 1-15,
  2 by default), counted down and red once over; Next hands over, and the
  end says how long it took. It runs in the browser and writes nothing.
- Retrospective board: a new private board, titled with this board's name
  and the day, with the lists Start doing, Stop doing, Keep doing and
  Action items, made through createBoardWithInitialSwimlanes so "who may
  create boards" applies.

Both are in the board menu for every member, next to Summary. Each is
turned off for one board in its Scrum settings and for the instance in
Admin Panel / Settings / Visibility / Features. Translated in every
language.

Thanks to xet7 !
2026-11-20 08:54:34 +02:00
Lauri Ojansivu 524946c1bf List policy popup asks the board's write capability, not each role helper.
The popup's canEdit called the role helpers with optional calls, which
tests/roleHelperRegressions.test.cjs reads as bare references. It now asks
Utils.currentUserCan('write'), the capability the server's Lists allow rule
grants.

Thanks to xet7 !
2026-11-20 08:54:24 +02:00
Lauri Ojansivu 6f67fd298e Board Settings in Mandarin and Cantonese is a board, not a chessboard; Yoruba and Yiddish say it in their own words.
Mandarin and Cantonese named Board Settings with 棋盘/棋盤, a chessboard,
beside their own 看板 for a board. Yoruba had the English word Board in it,
and Yiddish spelled Board, Boards and Settings out in Hebrew letters. Low
confidence for Yoruba and Yiddish.

Thanks to xet7 !
2026-11-20 08:34:27 +02:00
Lauri Ojansivu 6aedd70eeb Update WeKan changelog: list policies, commitment point, WIP per person, Definition of Ready.
Thanks to xet7 !
2026-11-20 08:32:23 +02:00
Lauri Ojansivu 9ac7b916c0 List policies, the commitment point, a WIP limit per person, and the Definition of Ready.
Kanban practices for a board's lists (models/lib/boardFlowPolicies.js,
docs/Features/Lists/Flow-Policies.md), offline and with no AI:

- List policy: each list's own entry and exit criteria, written from the
  list menu and shown as a gavel at the list header, its tooltip the text.
- Commitment point: the list from which work is committed to, flagged at
  its header; the lists before it are options.
- WIP limit per person: how many open cards one person may hold on the
  board; an opened card names each of its people over it.

Each is off until a board admin turns it on in Board Settings / List, and
each is a feature of Admin Panel / Settings / Visibility / Features, which
hides it on every board.

The Scrum settings get a Definition of Ready beside the Definition of
Done, and both are now readable by every member in the Scrum views once
written. The four Scrum translation guards count 128 keys with it.

Translated in every language.

Thanks to xet7 !
2026-11-20 08:32:10 +02:00
Lauri Ojansivu 5673fd3bcd Update WeKan changelog: flow fields on cards, ten paged exports.
Thanks to xet7 !
2026-11-20 08:09:17 +02:00
Lauri Ojansivu 0071dde0f3 Flow fields on cards: Blocked with a reason, Class of service with Expedite's WIP limit, MoSCoW and WSJF.
Four Kanban and Scrum practices other tools have, kept on the card
(card.flow, models/lib/cardFlow.js), offline and with no AI:

- Blocked: ticked with a reason; who marked it and since when are the
  server's. A red Blocked badge on the minicard, the reason its tooltip.
- Class of service: Standard, Fixed date, Expedite, Intangible. Expedite
  has a WIP limit of one open card per board; a second is refused.
- MoSCoW priority: Must, Should, Could, Won't have.
- WSJF score: business value, time criticality and risk reduction divided
  by job size, each on the 1-20 scale; shown once every part is set.

Each is a row of Board Settings / Card in the Card section, off on the
card and the minicard until a board turns it on, and an Admin Panel /
Features / Card field that hides it on every board. Written only by the
setCardFlow method, which checks the card edit right, an assigned-only
member's own cards and the values; a client write of flow is denied.
Translated in every language.

Thanks to xet7 !
2026-11-20 08:08:26 +02:00
Lauri Ojansivu 94ad2fd958 Update WeKan changelog: InviteBleed's old six-digit codes and the sign-up throttle.
Thanks to meifukun and xet7 !
2026-11-20 07:48:56 +02:00
Lauri Ojansivu 4fad2a9000 Fix InviteBleed's remainder: six-digit invitation codes and the unthrottled sign-up method.
GHSA-rg85-qx5c-qx67 reported the InviteBleed brute force again, now as a
GitHub Security Advisory. The 128-bit code of the first fix was still in
place, but two things it left were open:

- An invitation made before the fix, and not used yet, kept its six-digit
  Math.random() code and was still accepted at sign-up; a re-invite even
  mailed the same code again. A code shorter than the 22 base64url
  characters of a 128-bit code is now refused at sign-up, in both places it
  is looked up, and hasUsableCode() treats it as missing, so a re-invite
  replaces it with a strong one (models/lib/invitationCodeEmail.js
  isStrongInvitationCode).
- The DDPRateLimiter rule was on createUser, which a client is refused
  anyway, while the sign-up form creates the account through useraccounts'
  ATCreateUserServer, which had no limit. It now takes at most 10 attempts
  a minute per address, and each refusal is an InviteBleed row in Admin
  Panel -> Problems (brute.invite).

The other two advisories of the same report were checked against the
current code and are already fixed: GHSA-6944-p22h-3qpx (OIDC shared
serviceData race) since #4897 on 2026-07-17, whose per-login objects are
locals of the callback, and GHSA-j4x8-689m-h4hv (stale impersonation record
allows export), where every export route authorizes through
canExportBoardData() only and the impersonation record is just the audit
row written after it.

Thanks to meifukun and xet7 !
2026-11-20 07:48:22 +02:00
Lauri Ojansivu 735f52ed11 TODO: import and export of everything each tool has, and the Kanban and Scrum features to add.
Thanks to xet7 !
2026-11-20 07:33:45 +02:00
Lauri Ojansivu e2cbbe5104 Ten more exports are written a page of cards at a time, their references read in a light first pass.
Todoist, TickTick, ClickUp, MeisterTask, Linear, Pivotal, Redmine,
Quire, Taskwarrior and todo.txt refer from one row to others - a parent's
number, columns counted over the board, the order of the lists - so a
page could not be written without the rest. The export now reads the
board once lightly (no descriptions, comments only counted,
models/lib/exportPaging.js) and then the cards 500 at a time, each page
with those references; a formatter writes its head on the first page and
its tail on the last, Todoist's cards come list by list. The pages
together are byte for byte the file the whole board is written as,
whatever the page size (tests/exportPaging.test.cjs). TODO.md lists the
formats still built whole.

Thanks to xet7 !
2026-11-20 07:30:06 +02:00
Lauri Ojansivu 4e23929ee6 Update WeKan changelog: streamed JSON, Jira and CSV uploads, the server bundle check.
Thanks to xet7 !
2026-11-20 06:55:20 +02:00
Lauri Ojansivu 60bbf69164 Jira and CSV / TSV files are uploaded too; their people and columns are read from the file on the server.
They were the last files the Import page read itself and sent whole. A
chosen Jira file is now uploaded like the other sources: the people of
its map-members step are read from it by the server (the Jira mapper is
shared, models/lib/jiraMembersMapper.js), and the estimate mapping goes
with the import call. A CSV / TSV file's header, sample rows and guessed
mapping come from the server (csvUploadPreview), its people from the
columns chosen (csvUploadPeople), and the import parses it there. Both
methods read only the sender's own upload, signed in and while import is
enabled, and leave it for the import that follows.

Thanks to xet7 !
2026-11-20 06:46:46 +02:00
Lauri Ojansivu 905f60a1ea UI specs: the Release Burndown report gets a release to show; the limit test signs in by the login cookie.
The board-reports spec seeds a Scrum release with a card, so Release
Burndown has a table row, and removes it afterwards. The upload limit
test POSTs with the HttpOnly login cookie, as the page's own upload does,
instead of a Bearer header with no token in it, and checks the page's
warning says which limit.

Thanks to xet7 !
2026-11-20 06:34:26 +02:00
Lauri Ojansivu 11992ac951 Fix the server failing to start: the streamed export's collect had a parameter named like a const in its body.
The page-at-a-time export (3b1c7ce7bb) gave collect() a parameter
cardIds while its body already declares const cardIds - a SyntaxError
("Identifier 'h' has already been declared" once minified), so the
server bundle did not load. No node suite loads that ES module, which is
why they all passed. The parameter is pageCardIds, and
tests/serverBundleSyntax.test.cjs checks the built server bundle with
node --check whenever a build is there. TODO.md says why most other
export formats cannot simply be paged.

Thanks to xet7 !
2026-11-20 06:29:47 +02:00
Lauri Ojansivu 640e492593 Uploaded JSON is parsed from the file a chunk at a time; a Mattermost export a line at a time.
A JavaScript string cannot be longer than about 512 MB, so reading an
uploaded JSON export with readFile and JSON.parse could not read a larger
one at all. server/lib/streamJson.js builds the value from the file as it
is read - every escape, surrogate pairs and chunk boundaries anywhere,
the same value and the same refusals as JSON.parse, a __proto__ key as
an own property, nesting bounded. A Mattermost bulk export is read a line
at a time; the other text formats are read as one text up to 256 MB and
refused with that reason beyond it.

Thanks to xet7 !
2026-11-20 06:14:07 +02:00
Lauri Ojansivu e54c0f4646 Update WeKan changelog: Board View reports, grouped menus, large-file import and export, translations.
Thanks to xet7 !
2026-11-20 06:11:40 +02:00
Lauri Ojansivu d1732bd3a5 Translations: locale files that held another language get their own.
Values that were in another language than their locale's tag are
replaced with the tag's language, as the translation rules ask: Northern
Sami values seeded in Finnish (se), Veps in Venda (ve-PP), Maltese
sentences in Italian (mt; single words that are Maltese too are kept),
Northern Ndebele in Shona (nd), Uzbek in Latin letters in the Arabic-
script file (uz-AR), Wolaytta in Ethiopic script (wal), Tsonga in Swati
(ts), Luganda in Swahili (lg), the Armenian "board" that said
"administration" (hy) and the Vietnamese "history" that was Malay (vi).
Words that are correct in the tag's language, though spelled as in the
other one, are kept. The uz-AR guard and its audited copy-many sample
follow the Arabic script; placeholders are as in English.

Low confidence: the chart and metric names in Veps, Wolaytta, Tsonga,
Luganda and Northern Sami.

Thanks to xet7 !
2026-11-20 06:10:51 +02:00
Lauri Ojansivu 3b1c7ce7bb WeKan and Trello .zip imports use the shared upload, limit and disk check; .mbox and .enex export a page at a time.
The WeKan .zip route and the Trello package route wrote their uploads
with caps of their own (5 GB and 200 MB, 1 GB unpacked). They now go
through the same receiver as every Import page upload: the Admin Panel's
largest import (else WEKAN_IMPORT_ZIP_MAX_BYTES for the WeKan zip), or
with none the free disk space, checked before and while the file is
written, and a Trello package may unpack to as much as that.

The .mbox and .enex exports are written to the response 500 cards at a
time, waiting for the socket when it is full, instead of being built
whole in memory; the pages together are the same file. TODO.md keeps
what is left: streamed reading of large JSON and text, and the other
formats' exports.

Thanks to xet7 !
2026-11-20 06:10:37 +02:00
Lauri Ojansivu 0d8f8b8d96 The list, card and swimlane menus are grouped under headings.
As the board menu and the Board View menu are: Share and history, Export
and import, Add, Watch, Edit or Appearance, Settings, Move and copy, and
Archive. No entry moved or changed its condition; each heading sits
inside its group's own condition, so a member who sees none of a group
sees no heading over it, and a heading is not something to click. The
two header bars keep their layout, which was regrouped before. The three
new headings are translated into every language; the others reuse
existing words.

Thanks to xet7 !
2026-11-20 06:10:28 +02:00
Lauri Ojansivu 63b5e089f5 Twelve Board View reports: Created vs. Resolved, Net Flow, Time in List, Average Age, Throughput Run, Due Date Performance and more.
Added after comparing WeKan's charts with the reports of Jira, Azure
DevOps, Nave, ActionableAgile and the Flow Framework: Created vs.
Resolved, Net Flow, Time in List, Average Age, Throughput Run Chart and
Due Date Performance under Kanban flow; Release Burndown and Epic
Progress under Scrum; Workload, Distribution, Dependency Map and Activity
Heatmap under Overview. Each opens like the other charts, with the export
bar at its top, a Chart.js chart and its data table, which is also what
its PDF and Excel export write.

The calculations are pure (models/lib/boardReports.js) and answer one
shape, { bars, table }, so the chart view and both exports read every
report the same way; the server loads only what a report reads. A member
who may see only their assigned cards gets none of them, as with the
other charts. The report names and table headings are translated into
every language.

Thanks to xet7 !
2026-11-20 06:10:13 +02:00
Lauri Ojansivu 32c24ed84e Import page uploads stream to the server's disk, checked against the free space and an Admin Panel limit.
A file chosen on the Import page for the generalized importer's sources
is POSTed to /api/import/upload/:source and written to
WRITABLE_PATH/import-uploads a part at a time, instead of being read in
the browser and sent whole, as text or base64, through importBoard. The
size the browser announces is checked before the first byte against the
largest import set in Admin Panel / Settings / Security (none: no limit)
and against the free space of that disk less a reserve, and the space is
checked again every 64 MB while it is written; a refused or interrupted
upload leaves no file behind. importBoard then reads the file by its
id: a .zip export (Slack, Google Takeout, Vikunja, Notion, Plane) is
opened from the disk, its entries inflating up to the limit or the free
space, and a mailbox is read a message at a time, also inside a Takeout
zip. The upload is removed once read, or after an hour.

The HTML-only mail text is read through the parsed document rather than
stripped with a pattern. TODO.md says what is left of large files, and
which locale files hold another language.

Thanks to xet7 !
2026-11-20 05:42:27 +02:00
Lauri Ojansivu 257835733b Board View menu and the Import and Export lists are grouped under headings.
The Board View menu, and Board Settings / Board View, show the views in six
groups - Board, Calendar and time, Scrum, Kanban flow, Overview, and
Communication and code - with the board's own order inside each; the six
separators of the old order are the headings now. The Import page and the
Export menu list the other tools under the same headings from one table,
models/lib/toolGroups.js: Kanban and project tools, Issue trackers and
version control, Task and to-do apps, Spreadsheets and tables, Text and
outlines, Mail, calendars, chats and notes, and Fetched from a service.
The thirteen headings are translated into every language; "Scrum" stays
as it is, like the other method names. The Tigre instructions of the new
imports keep the attested plural for files.

Thanks to xet7 !
2026-11-20 05:18:02 +02:00
Lauri Ojansivu ef8e82200f Update WeKan changelog: import and export of mail, calendars, chats and notes.
Thanks to xet7 !
2026-11-20 05:03:59 +02:00
Lauri Ojansivu ccfa6cf362 Import and export mail, calendars, chats and notes: mbox/.eml, iCalendar, Google Takeout, Slack, Mattermost, Telegram, WhatsApp, Discord, Evernote.
The Import page reads nine more kinds of export, each into the view it
is for: mail (mbox, .eml) as cards of Board View / Email, one per
conversation with the replies as comments; an .ics file's tasks by
status and its events, with their dates; a Google Takeout .zip as one
board with a swimlane per product (Mail, Tasks, Keep, Calendar, Google
Chat); a Slack workspace export, a Mattermost bulk export, Telegram
Desktop's JSON, a WhatsApp chat .txt and a DiscordChatExporter JSON as
channels whose messages are comments, for Board View / Chat; and an
Evernote .enex as notes with their to-dos as checklists. The Export menu
writes a board as an .mbox, an .enex and a Mattermost bulk import file,
each read back by the same import.

MIME is decoded with mailparser and ENEX with htmlparser2 on the server,
and the zips are read under the zip-bomb guards of the other zip imports.
An imported message's Message-IDs pass the import sanitizer without
their brackets, so a later reply to the board joins the thread. The
instructions of the nine are translated into every language. TODO.md
also gets the next items: grouped menus, large-file import and export,
and the reports to add.

Thanks to xet7 !
2026-11-20 05:03:27 +02:00
Lauri Ojansivu c4da72ff72 Shared templates spec: one instance setting, so its tests run in order and wait for the reset.
The scopes are a setting the whole instance shares, not each browser's
storage: the describe runs serially, waits until the page shows the reset
the test server sees at its next database poll, and finds each template
link inside its own group.

Thanks to xet7 !
2026-11-20 04:26:42 +02:00
Lauri Ojansivu 96e730922e Update WeKan changelog and TODO.md: the menu fixes are done; Import/Export formats and reports to add.
Moves the five menu items done from TODO.md to the Upcoming release, and
adds to TODO.md the Import and Export formats (mail, Google Takeout,
iCalendar, Slack, Mattermost, Telegram, WhatsApp, Discord, Evernote) and
the Board View reports (Created vs. Resolved, Net Flow, Time in List and
others) still to add.

Thanks to xet7 !
2026-11-20 04:26:37 +02:00
Lauri Ojansivu a24e3a49a9 Sandstorm: comment activity notifications await the card, comment and board.
The notifier read the card, the comment and the board from ReactiveCache
without await - on the server those are Promises - so comment.text.match
threw on every comment activity, and a card's members were never found.
tests/serverReactiveCacheAwaited.test.cjs sweeps server/ for any other
unawaited ReactiveCache result kept in a variable.

Thanks to xet7 !
2026-11-20 04:20:22 +02:00
Lauri Ojansivu c0339ccc59 Shared templates: the group kinds to share with are an instance setting, and the targets appear.
Which group kinds - Organizations, Teams, email Domains - Admin Panel /
People / Shared templates allows came from the browser's localStorage,
so it differed per browser and was empty for every user but the admin
who ticked it. It is Settings.sharedTemplatesScopes now, published to
every client, and an admin's earlier ticks are carried over once.

The All Boards / Templates targets were empty for everyone anyway:
getMyShareableGroups did not await ReactiveCache.getUser, so it read
orgs, teams and emails from a Promise.

Thanks to xet7 !
2026-11-20 04:20:22 +02:00
Lauri Ojansivu b00e2c8133 Board menu: All Boards Settings is back, below Date, for board admins.
The entry was commented out for the #4214 "icons random dance", which
left the popup - card counters and member avatars on All Boards, card
aging, auto-archive and personal list widths - with no way in. The All
Boards tiles now read one fetch of getAllBoardsTileData rather than
reactive cursors, so the loop cannot return.

Thanks to xet7 !
2026-11-20 04:20:14 +02:00
Lauri Ojansivu 60c25690df Card menu: Create board from this card is shown to members who can edit the card.
It sat under unless canModifyCard, so exactly the members the
createBoardFromCard method lets convert a card never saw it. It was in
both branches when added; a refactor kept only that one. It is now under
the card menu's write entries, not for Workers, when board creation is
allowed.

Thanks to xet7 !
2026-11-20 04:20:14 +02:00
Lauri Ojansivu 0ccf182001 Support page: a signed-out visitor sees a Public page, and no text of one that is not.
The /support route sent every signed-out visitor to sign-in, so the
Public setting of Admin Panel / Settings / Visibility had no effect and
the template's "only for logged-in users" case was never reached - while
the page's text was sent to every signed-out subscriber of 'setting'
anyway. The route is open now, and a visitor who is not signed in
receives supportPageText only when the page is Public. The supportPopup
the member menu no longer opened, and its supportPopupText publication,
are removed.

Thanks to xet7 !
2026-11-20 04:20:14 +02:00
Lauri Ojansivu 42959d02f1 Edit Profile saves a member's own new username when Username change is allowed.
setUsername wrote only for a site admin, so with Admin Panel / People /
Login Username change allowed a member's new username was not saved, and
the popup closed as if it had. It now follows setEmail: an admin renames
any account, a member their own when the setting allows it, and anything
else is refused with not-authorized instead of returning quietly.
setUsernameAndEmail asks for both changes to be allowed.

Thanks to xet7 !
2026-11-20 04:20:05 +02:00
1466 changed files with 334282 additions and 26554 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
+195
View File
@@ -0,0 +1,195 @@
name: Push Snap to Store
# Puts the .snap files of a GitHub release on the Snap Store and RELEASES them
# to every channel: wekan, wekan-ondra and wekan-gantt-gpl, every architecture
# the release carries.
#
# WHY: release-all.yml uploads each snap as it builds it, with
# `snapcraft upload --release=...`. The store can keep a revision in
# "processing" for hours, and an upload that gives up waiting leaves the
# release to the store - the job is green either way. On v13.20 every build
# was green and the snaps were on the GitHub release, but the Snap Store kept
# the old version. This workflow finishes that from the release itself,
# without building anything: releases/snap-store-push.sh releases a revision
# the store already has, uploads one it has not, waits for one still
# processing, and FAILS - red, not green - when a snap still did not reach a
# channel.
#
# "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
# three names.
on:
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v13.20). Empty: the latest release.'
required: false
default: ''
snaps:
description: 'Snap names, space separated'
required: false
default: 'wekan wekan-ondra wekan-gantt-gpl'
channels:
description: 'Channels to release to'
required: false
default: 'stable,candidate,beta,edge'
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
concurrency:
group: snap-store
cancel-in-progress: false
env:
DO_NOT_TRACK: 1
jobs:
plan:
runs-on: ubuntu-24.04
timeout-minutes: 10
outputs:
tag: ${{ steps.plan.outputs.tag }}
snaps: ${{ steps.plan.outputs.snaps }}
channels: ${{ steps.plan.outputs.channels }}
steps:
- name: Which release, which snaps, which channels
id: plan
env:
GH_TOKEN: ${{ github.token }}
INPUT_TAG: ${{ inputs.tag }}
INPUT_SNAPS: ${{ inputs.snaps }}
INPUT_CHANNELS: ${{ inputs.channels }}
run: |
set -euo pipefail
tag="${INPUT_TAG:-}"
if [ -z "$tag" ]; then
tag="$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName --jq .tagName)"
fi
case "$tag" in v[0-9]*) ;; *) echo "::error::'$tag' is not a release tag like v13.20."; exit 1 ;; esac
snaps="${INPUT_SNAPS:-wekan wekan-ondra wekan-gantt-gpl}"
for s in $snaps; do
case "$s" in wekan|wekan-ondra|wekan-gantt-gpl) ;; *) echo "::error::'$s' is not one of WeKan's snaps (wekan, wekan-ondra, wekan-gantt-gpl)."; exit 1 ;; esac
done
channels="${INPUT_CHANNELS:-stable,candidate,beta,edge}"
case "$channels" in *[!a-z0-9/,.-]*) echo "::error::'$channels' is not a channel list."; exit 1 ;; esac
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "snaps=$(printf '%s\n' $snaps | jq -R . | jq -cs .)" >> "$GITHUB_OUTPUT"
echo "channels=$channels" >> "$GITHUB_OUTPUT"
echo "Release $tag: $snaps -> $channels"
push:
needs: [plan]
runs-on: ubuntu-24.04
# One snap name per job; its architectures one after another. A store
# still processing may take the whole wait of snap-store-push.sh.
timeout-minutes: 360
strategy:
fail-fast: false
matrix:
snap: ${{ fromJSON(needs.plan.outputs.snaps) }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
sparse-checkout: releases
persist-credentials: false
- name: Install snapcraft and check SNAP_AUTH
id: snapcraft
env:
SNAP_AUTH: ${{ secrets.SNAP_AUTH }}
run: |
set -euo pipefail
if [ -z "${SNAP_AUTH:-}" ]; then
echo "::error::SNAP_AUTH is not set. snapcraft export-login --snaps wekan,wekan-ondra,wekan-gantt-gpl --acls package_access,package_push,package_release,package_update snap-auth.txt && gh secret set SNAP_AUTH --repo wekan/wekan < snap-auth.txt"
exit 1
fi
installed=""
for i in 1 2 3 4 5; do
if timeout 180 sudo snap install snapcraft --classic; then installed=1; break; fi
sudo snap abort --last=install >/dev/null 2>&1 || true
echo "snapcraft install attempt $i/5 failed; retrying in 30s..."
sleep 30
done
[ -n "$installed" ] || { echo "::error::snapcraft could not be installed: the Snap Store did not answer. Re-run the job."; exit 1; }
SNAPCRAFT_STORE_CREDENTIALS="$SNAP_AUTH" snapcraft whoami
- name: Download ${{ matrix.snap }} from ${{ needs.plan.outputs.tag }}
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ needs.plan.outputs.tag }}
SNAP: ${{ matrix.snap }}
run: |
set -euo pipefail
mkdir -p snaps
# 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 }}
CHANNELS: ${{ needs.plan.outputs.channels }}
run: |
set -euo pipefail
failed=""
for f in snaps/*.snap; do
# Each architecture on its own: one that the store is still
# processing does not stop the others.
if ! bash releases/snap-store-push.sh "$f" "$CHANNELS"; then failed="$failed $(basename "$f")"; fi
done
if [ -n "$failed" ]; then
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"
+6
View File
@@ -126,3 +126,9 @@ mongo-tools-patches/
# Generated on the Windows single-EXE runner (releases/append-windows-payload.mjs --manifest)
wekan-real-files.h
# The Meteor 3 hosting menu's settings (docs/Platforms/FOSS/Container/Docker/Meteor3/build.sh): this machine's server name and directory.
docs/Platforms/FOSS/Container/Docker/Meteor3/settings.ini
# Python bytecode of the release scripts (releases/sec/ and others).
__pycache__/
+21 -2
View File
@@ -270,8 +270,27 @@ replaced with the language named by that tag.**
### Shared translation source for WeKan prototypes under `.tools/`
The WeKan catalogs in `imports/i18n/data/` are the source of truth for
translations in every WeKan prototype under `.tools/`, including WeLite,
Weddy, Wami, and any future WeKan prototype with its own catalog.
translations in every WeKan prototype under `.tools/`, including Omi, Wami,
Weddy, WeLite, and any future WeKan prototype with its own catalog. A prototype
does not keep translations of its own that WeKan's catalogs do not have.
Version control translations come from ONE place too:
`.tools/w/gitea-patches/dist/translations/gitea-locale/locale_<lang>.json`,
upstream Gitea's locale files with gitea-patches' own translations merged in.
Only gitea-patches has the complete Finnish, so a prototype never takes its
Gitea strings from upstream Gitea directly. Refresh them with gitea-patches'
`./build.sh translations` (menu: "Download the newest Gitea translations from
upstream") and commit them there.
So a prototype that needs translations - Omi, Wami, Weddy, WeLite,
github-to-gitea and the rest of the WeKan and version control prototypes under
`.tools/w/` - COPIES them directly: WeKan's strings from WeKan's catalogs, and
Gitea's own things (repositories, issues, pull requests, releases,
organizations) from gitea-patches' `gitea-locale`, into its own catalog format.
It uses no other translation source. Gitea's strings are NOT added to WeKan's
catalogs (decided 2026-11-22: they would grow every WeKan locale file by about
45 %). A string that neither has is added to WeKan's catalog, as in step 2
below, and is used from there in WeKan and in the `.tools` repositories.
1. Before adding a translation key in a prototype, search WeKan's English
catalog for a key with the same meaning and usage. Reuse that key and its
+2084 -2434
View File
File diff suppressed because it is too large. Load diff
+40 -33
View File
@@ -5,50 +5,57 @@ each one changed and the project status are in
Written by `node releases/changelog-short.mjs` from CHANGELOG-big.md:
make changes there.
# v13.20 2026-11-19 WeKan ® release
# v13.28 2026-11-23 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.
A board can be a **Shop** with invoices and order email, the
**Admin Panel** can be
limited to chosen addresses, all **webhooks** can be turned off at once, the
**Cloud Panel** exists only in a
Cloud Admin container with the `CLOUD` variable (**CloudPanelBleed**), a forged
bounce report can no longer stop email (**BounceBleed**), and every setting that
turns something off is **refused on the server**. The **audit log**, **sign-in
address retention** and a **personal-data inventory** begin the missing law and
standard features, and every **feature page** of the docs has one shape.
[All changes in v13.20](CHANGELOG-big.md#v1320-2026-11-19-wekan--release)
[All changes in v13.28](CHANGELOG-big.md#v1328-2026-11-23-wekan--release)
# v13.19 2026-11-19 WeKan ® release
# v13.27 2026-11-22 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** 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.19](CHANGELOG-big.md#v1319-2026-11-19-wekan--release)
[All changes in v13.27](CHANGELOG-big.md#v1327-2026-11-22-wekan--release)
# v13.18 2026-11-19 WeKan ® release
# v13.26 2026-11-22 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.
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.18](CHANGELOG-big.md#v1318-2026-11-19-wekan--release)
[All changes in v13.26](CHANGELOG-big.md#v1326-2026-11-22-wekan--release)
# v13.17 2026-11-19 WeKan ® release
# v13.25 2026-11-21 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.
**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.17](CHANGELOG-big.md#v1317-2026-11-19-wekan--release)
[All changes in v13.25](CHANGELOG-big.md#v1325-2026-11-21-wekan--release)
# v13.16 2026-11-19 WeKan ® release
# v13.24 2026-11-21 WeKan ® release
**ListLockBulkBleed** is fixed, and a list that refuses a role
now also refuses that role's bulk writes, dependency lines, rule actions and
changes to the list or swimlane itself. Administrators can give chosen users,
teams and organizations a smaller WeKan with opt-in **feature profiles**. A
server no longer runs out of memory in the hourly **History integrity audit**,
**scheduled rules** can create cards again, and **Card Excel export** and
clearing a card's text work again.
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.16](CHANGELOG-big.md#v1316-2026-11-19-wekan--release)
[All changes in v13.24](CHANGELOG-big.md#v1324-2026-11-21-wekan--release)
+21 -2
View File
@@ -270,8 +270,27 @@ replaced with the language named by that tag.**
### Shared translation source for WeKan prototypes under `.tools/`
The WeKan catalogs in `imports/i18n/data/` are the source of truth for
translations in every WeKan prototype under `.tools/`, including WeLite,
Weddy, Wami, and any future WeKan prototype with its own catalog.
translations in every WeKan prototype under `.tools/`, including Omi, Wami,
Weddy, WeLite, and any future WeKan prototype with its own catalog. A prototype
does not keep translations of its own that WeKan's catalogs do not have.
Version control translations come from ONE place too:
`.tools/w/gitea-patches/dist/translations/gitea-locale/locale_<lang>.json`,
upstream Gitea's locale files with gitea-patches' own translations merged in.
Only gitea-patches has the complete Finnish, so a prototype never takes its
Gitea strings from upstream Gitea directly. Refresh them with gitea-patches'
`./build.sh translations` (menu: "Download the newest Gitea translations from
upstream") and commit them there.
So a prototype that needs translations - Omi, Wami, Weddy, WeLite,
github-to-gitea and the rest of the WeKan and version control prototypes under
`.tools/w/` - COPIES them directly: WeKan's strings from WeKan's catalogs, and
Gitea's own things (repositories, issues, pull requests, releases,
organizations) from gitea-patches' `gitea-locale`, into its own catalog format.
It uses no other translation source. Gitea's strings are NOT added to WeKan's
catalogs (decided 2026-11-22: they would grow every WeKan locale file by about
45 %). A string that neither has is added to WeKan's catalog, as in step 2
below, and is used from there in WeKan and in the `.tools` repositories.
1. Before adding a translation key in a prototype, search WeKan's English
catalog for a key with the same meaning and usage. Reuse that key and its
+4 -1
View File
@@ -38,7 +38,7 @@ FROM --platform=$BUILDPLATFORM debian:trixie AS bundle
ARG TARGETARCH
ARG TARGETVARIANT
ARG VERSION=13.20
ARG VERSION=13.28
ARG DEBIAN_FRONTEND=noninteractive
COPY --chmod=755 releases/check-telemetry.py /tmp/check-telemetry.py
@@ -185,6 +185,7 @@ ENV \
MATOMO_DO_NOT_TRACK=true \
MATOMO_WITH_USERNAME=false \
METRICS_ALLOWED_IP_ADDRESSES="" \
ADMIN_PANEL_ALLOWED_IP_ADDRESSES="" \
BROWSER_POLICY_ENABLED=true \
TRUSTED_URL="" \
WEBHOOKS_ATTRIBUTES="" \
@@ -317,8 +318,10 @@ ENV \
WEKAN_DISK_MONITOR="" \
WEKAN_DISK_WATCH_PATHS="" \
WEKAN_RAM_MONITOR="" \
CLOUD="" \
WEKAN_IMPORT_RUN_STALE_MS="" \
EVENTLOG_RETENTION_DAYS="" \
LOGIN_ADDRESS_RETENTION_DAYS="" \
CORS="" \
CORS_ALLOW_HEADERS="" \
CORS_EXPOSE_HEADERS="" \
+92 -29
View File
@@ -38,19 +38,44 @@ that by providing one-click installation on various platforms.
build.bat.
- [Features](https://github.com/wekan/wekan/tree/main/docs/Features):
- Real-time user interface
- [Help button](docs/Features/General/Help-Button.md): a ? at every feature place - board views, sidebar, Board and Member Settings,
card sections, Admin Panel panes - shows What is it? and How it works? in your own language
- All Boards page, Drag drop reorder with one or Multi-Selection:
- 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
- GitHub, GitLab, Gitea, Forgejo
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
- 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
@@ -60,28 +85,43 @@ 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
- Card: Opened card popup of minicard
- Attachments viewer for PDF and Office documents
- Attachments viewer for PDF and Office documents, and a slideshow that reads only what is on the screen -
also of text, CSV, code, ZIP and tar listings, calendars, Outlook .msg and OpenDocument
- [Search inside attachments](docs/Features/Cards/Attachments/Attachment-Search-And-Integrity.md) with Filter,
Search and Search All Boards; every attachment's SHA-256 is checked when it is read, with a warning in
Admin Panel / Problems when a file changed behind WeKan's back
- The [card details width](docs/Features/Cards/Card-Details-Width.md) is remembered per user, and an admin
sets the default as a percentage of the browser window
- Kanban and Scrum flow fields: Blocked, Class of service, MoSCoW priority, WSJF score
- List policies, Definition of Ready, commitment point, WIP limit per person,
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
- 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,
[Shop](docs/Features/Board-Header/Board-Views/Shop.md): the products on the cards as a web shop - cart, checkout, orders as cards, Budget and billing's payment methods - which a public board can show 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
@@ -89,35 +129,57 @@ 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
- 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
- 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
- Settings
- Version
- Visibility: What is shown/hidden, Whitelabeling
- Features: which features this WeKan offers, Card fields, Feature profiles,
[Turn off all webhooks](docs/Features/Admin-Panel/Settings/Turn-Off-All-Webhooks.md) at once: every webhook screen hidden,
nothing sent and no webhook added or changed on the server, the saved ones kept
- Appearance: What is shown/hidden, Whitelabeling
- Announcement
- Accessibility
- Translation: Add custom translation strings
- PWA
- Global Webhooks
- Privacy and security: [Allowed addresses](docs/Features/Admin-Panel/Admin-Panel-Allowed-Addresses.md), the IPv4 and IPv6
addresses and ranges the Admin Panel and the admin REST API can be used from
- People
- Email, Notifications, Domains, Organizations, Teams, People
- Locked Users, Roles, Shared Templates
- Login, SAML, LDAP, OAuth2 login providers, Passwordless login
- Cloud, only in a container started with the environment variable `CLOUD=<its domain>`: the
[Cloud Panel](docs/Features/Admin-Panel/Cloud-Panel.md). Its site administrators are the Cloud Admins - the first
registered user is one - and keep the customer domains, each with its own WeKan and MongoDB or sharing this WeKan,
merge many WeKans into one, with CloudFlare DNS, Caddy routes, invoices, support tickets and chat on a support board per
domain, and the addresses a Cloud Admin may sign in from. A customer signs in there with the password of their own
WeKan, checked against its database, and sees their invoices, tickets and chat. No REST API at that address
- Attachments
- Scheduled Backups, Continuous realtime backups, Move Attachments, Default Save Storage, Limits
- Storage: MongoDB GridFS, Filesystem, S3/MinIO, Azure Blob, Google Cloud
@@ -132,6 +194,7 @@ that by providing one-click installation on various platforms.
- Security: shows any attempted attacks based on names from https://wekan.fi/hall-of-fame/ like built-in SIEM with country flag and city based of location of IP address based on location headers like CloudFlare etc
- Impersonation
- Performance, Speed, Tests, CPU usage, Instrumentation, Broken Cards, Files, Rules, Boards, Recovery, Offices, API, Database problems, Filesystem integrity
- [Webhooks](docs/Features/Admin-Panel/Problems/Webhooks.md): every webhook, its board or Global, the user who added it and what it sends, tokens hidden
- [Platforms](https://wekan.fi/install/):
- Windows/Mac/Linux bundle .zip
- Linux [Snap](https://snapcraft.io/wekan): Automatic updates
@@ -159,7 +222,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.20.0"
appVersion: "v13.28.0"
files:
userUploads:
- README.md
+151 -23
View File
@@ -15,33 +15,161 @@ the changelog only says what changed.
`tests/todoFile.test.cjs` checks this shape.
**Where things are** (2026-11-22). Each repository's own TODO.md has the
details; WeKan's are below.
| Repository | In progress, or not verified yet | Needs a person |
| --- | --- | --- |
| WeKan | The help button's texts in 176 of 232 languages; the test build that runs out of memory; the changelog of the newest work; Latvian with Lithuanian words; laws and standards WP-4 onwards; accessibility; the docs folders | Push; the CVEs and advisories of ListLockMoveBleed and BounceBleed after the release; the Snap Store review ([#6929](https://github.com/wekan/wekan/issues/6929)) |
| [gitea-patches](https://github.com/wekan/gitea-patches/blob/main/TODO.md) | 90 new upstream Gitea strings not yet in Finnish | Push; run "Migrate all Gitea to backups" with `--dry-run` first |
| [omi](https://github.com/wekan/omi/blob/main/TODO.md) | Delete and import not yet run on a real Gitea folder or against the real GitHub; the import has no reactions, review comments, LFS, Actions or fork branches | Push; stop and back up Gitea before the first real write |
| [welite](https://github.com/wekan/welite/blob/main/TODO.md) | WeKan data folders: no zip archives, GridFS or object-storage downloads, avatars or cross-target builds yet; retro-browser acceptance | - |
| [weddy](https://github.com/wekan/weddy/blob/main/TODO.md) | 20 of WeKan's 174 templates in Go; attachments' Office preview and WebP thumbnails; more of WeKan's specs; Firefox and WebKit; netbsd/arm64 | Its "For the maintainer (on GitHub)" items |
| [caddy-ferretdb-plugin](https://github.com/wekan/caddy-ferretdb-plugin/blob/main/TODO.md) | The Windows SQLite URI fix, checked on Linux only | Close the otel Dependabot alert; push before caddy-wekan-plugin |
| [caddy-wekan-plugin](https://github.com/wekan/caddy-wekan-plugin/blob/main/TODO.md) | Weddy behind WeKan's newest settings; the Windows fixes, checked on Linux only | Push; close the otel Dependabot alert |
| [node-patches](https://github.com/wekan/node-patches/blob/main/TODO.md) | The clone retry, until the next Release All | - |
| [wekango](https://github.com/wekan/wekango/blob/main/TODO.md) | The Windows and macOS fixes, checked on Linux only | Confirm the mongo-tools notice review |
| [weror](https://github.com/wekan/weror/blob/main/TODO.md) | - | Decide on the demo account that takes any password; close the rack Dependabot pull request |
| [wekan.fi](https://github.com/wekan/wekan.fi/blob/main/TODO.md) | - | Rerun the Pages deploy; the CVE numbers into the Hall of Fame |
| [wekan-meteor3-html4](https://github.com/wekan/wekan-meteor3-html4/blob/main/TODO.md) | Left out for now | - |
| wena | aros-i386 without AHI audio | Rerun Release all for haiku-amd64 |
| wepica | Left out: too old | - |
## In progress
Work being done now. Each item moves to the `# Upcoming WeKan ® release`
section of `CHANGELOG-big.md`, and to the docs, when it is committed.
- A help button (?) at the top of every feature's place, mirrored for
right-to-left languages, opening "What is it?" and "How it works?" for that
feature as plain text without links, in every language. Done: the button,
the popup, 161 places and the English texts. Translating the 323
descriptions: 176 of the 232 non-English locales are done (2026-11-22),
the rest are being translated, a few languages at a time. Not yet run: the
Playwright spec `feature-help.e2e.js`.
- The Meteor test build (`meteor test --full-app`) ran out of memory before
any test started after the help texts grew every locale file; the release
build (`meteor build`) still works. To find out why and fix it, then run
the Shop, webhooks and Admin Panel addresses server tests, and their
Playwright specs in Firefox and WebKit.
- The changelog entries for what landed since the last changelog update:
ListLockMoveBleed, the help button, the Shop's Product line kind, the
Meteor 3 hosting localhost limit, the Omi and WeLite translation keys, and
the translation rule for the prototypes.
- Wrong-language and wrong-meaning words seen by the help-text translators,
to correct once they are done with those files: Latvian (`lv`) has
Lithuanian words; Estonian (`et-EE`) calls a board "juhatus" (a company's
management board) in "Board Settings" and "Board View"; Aromanian (`rup`)
and Sicilian (`scn`) have Italian menu names; Northern Sami (`se`) has two
Finnish values; Shona (`sn`) has half-English menu names; Brazilian
Portuguese (`pt-BR`) calls an assignee "Administrador"; Somali (`so`) calls
card recurrence an automatic reset; Pashto and Sindhi (`ps`, `sd`) have odd
"Check Version" and "WIP Limit Groups" terms; Serbian (`sr`) uses списи,
предмет and Управа for board, card and Admin Panel; Macedonian (`mk`) has
Bulgarian values (Хора, Наблюдавай, Имейл, Описание, Разпределена от,
Поискан от); Luxembourgish (`lb`) is partly German; Punjabi and Odia (`pa`,
`or_IN`) call a swimlane "swimming"; Maltese (`mt`) has "Bord Ara" for
Board View.
- The docs folders keep their main page as `README.md` instead of a page named
after the folder, and `docs/Features/README.md` holds the website's feature
overview. Every topic in one folder at the `docs/Features/` level: the
`General/` level goes, its folders move up into the same-named folders, and
the folders of `# Moved` stubs are removed, with every link updated.
- Everything about accessibility in one folder, `docs/Features/Accessibility/`
(from `General/Accessibility/` and the Admin Panel's Accessibility page).
- Accessibility: every missing WCAG 2.2 AA feature added, and the accessibility
tests extended to every page, popup and Admin Panel pane - axe with the WCAG
2.2 rules, keyboard-only use, visible focus, 200 % zoom and 320 px reflow,
target size, reduced motion and every theme's contrast - run through build.sh.
- Laws and standards - GDPR, NIS2, ISO 27001, HIPAA and the others - checked
against what WeKan already has (`docs/Compliance/`). Done: the complete admin
audit log (WP-1), retention of sign-in addresses (WP-2) and the
personal-data inventory (WP-3). Next: complete erasure (WP-4, the 40
collections the inventory lists), a personal-data export (WP-5), legal pages
with accepted versions (WP-6), then WP-7 to WP-14.
- Found while documenting, to fix: the per-address login delay is never
applied; Broken Cards counts unknown card types in its list but not in the
Summary or its repair; the database, integrity and mail streams have no name
in the Summary; the Recovery pane's text says it does not retry or cancel;
the attachment retention form allows a larger per-run number than the
retention applies.
## For the maintainer: needs a person, not code
- Push `main` here and in the `.tools/w/` repositories with local commits:
gitea-patches, omi, welite, wekan.fi, charts and caddy-wekan-plugin.
- [GHSA-394w-8q99-q4qx](https://github.com/wekan/wekan/security/advisories/GHSA-394w-8q99-q4qx)
(ListLockMoveBleed) and
[GHSA-7w85-38ph-c96v](https://github.com/wekan/wekan/security/advisories/GHSA-7w85-38ph-c96v)
(BounceBleed): fixed in Upcoming; after the release, request the CVEs and
publish the advisories. The Hall of Fame says "CVE requested" for both.
- The Snap Store push of v13.27 failed and waits for the Store's manual review
([#6929](https://github.com/wekan/wekan/issues/6929)); nothing to change in
the code.
- Dependabot pull requests and alerts to close by hand: the
go.opentelemetry.io/otel/sdk/log update in caddy-ferretdb-plugin and
caddy-wekan-plugin (Dependabot cannot resolve their local `replace`, and the
version is already on main), weror's rack-3.1.21 branch (main has rack
3.2.9), nekan alert 207 and caddy-gitea-plugin alerts 1, 2, 4, 18, 24, 25
and 37.
- wena: rerun Release all for haiku-amd64 (the Haiku VM never answered SSH);
aros-i386 needs SDL's AHI audio driver off for i386, whose AROS toolchain has
no AHI headers - not cloned or built here, as there is no Docker.
- wekan.fi: rerun "Deploy static content to Pages", which failed with a 500
from GitHub's Pages API after its checks passed.
- weror: decide whether the demo account `user@demo.test` may sign in with any
password, as its tests ask; restored as tested, and a risk if weror is
public.
- wekango: confirm the review of the new mongo-tools license notices (only
permissive attributions changed).
## Repositories left out, and why
- wepica: too old; its failing Dependabot runs are not fixed (decided
2026-11-22).
- wekan-meteor3-html4: left out for now (decided 2026-11-22). Its failing
Dependency Review needs the dependency graph turned on in its settings; its
own TODO.md says so.
- sandstorm-io/sandstorm under `.tools/sandstorm`: somebody else's project,
cloned for reference only.
## Need the running app to reproduce/verify
- 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.
## Found while documenting the menus, to fix
## Need accounts on the tools, or a running copy of one
- Member menu / Edit Profile: with Admin Panel / People / Login **Username
change** allowed, a user's new username is not saved - `setUsername`
(`server/models/users.js`) writes only when the caller is a site admin, while
`setEmail` beside it allows a self change when the setting says so. The popup
closes as if it had saved. Found on 2026-11-19.
- Member menu / Support: the Support page template has a case for signed-out
visitors, but the `/support` route sends them to sign-in first, so that case is
never reached; and `supportPopup` with its `.js-support` handler is no longer
opened by the menu, which links to `/support`. Decide whether signed-out
visitors should see the page, and remove the unused popup.
- Card menu / Create board from this card: the entry sits under `unless
canModifyCard` in `cardDetailsActionsPopup` (`client/components/cards/
cardDetails.jade`), so a member who can edit the card does not see it, while
the `createBoardFromCard` method requires write access. It was in both
branches when added (17c6d8d9b9); a later refactor kept only this one. Check in
the running app and restore it for members who can edit the card.
- Board menu / All Boards Settings: the board menu entry is commented out
("Bug Board icons random dance", [#4214](https://github.com/wekan/wekan/issues/4214)), so the popup cannot be reached.
- Admin Panel / People / Shared templates: which group kinds the "Share template
with" picker offers comes from the browser's `localStorage`
(`sharedTemplatesScopes`), so it differs per browser and is empty in a browser
where the admin never ticked them. An instance setting belongs in Settings.
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:
- 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.)
+13 -2
View File
@@ -2029,10 +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'}
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'}
'quire', 'orgmode', 'leo', 'opml', 'vikunja', 'notion', 'plane',
'mail', 'ical', 'mattermost', 'whatsapp', 'evernote', 'slack', 'googletakeout', 'rocketchat', 'fizzy',
'azuredevops', 'mslists', 'msproject'}
def import_document(source, filepath):
import base64, csv, io, os
@@ -2044,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':
+1
View File
@@ -775,6 +775,7 @@ function run_playwright_docker(){
-e WEKAN_TEST_SERVER_MODE="${WEKAN_TEST_SERVER_MODE:-bundle}" \
-e WEKAN_TEST_SMTP_PORT="${WEKAN_TEST_SMTP_PORT:-}" \
-e WEKAN_TEST_REVERSE_PORTS="$reverse_ports" \
-e WEKAN_TEST_CLOUD="${WEKAN_TEST_CLOUD:-}" \
-e PLAYWRIGHT_HTML_OPEN=never \
-e WEKAN_FILES_PATH="$filesroot" \
-e PLAYWRIGHT_JSON_OUTPUT_NAME="${PLAYWRIGHT_JSON_OUTPUT_NAME:-}" \
+28
View File
@@ -110,6 +110,30 @@ template(name="boardBody")
+processBehaviorView
else if isViewSizeCycleTime
+sizeCycleTimeView
else if isViewCreatedResolved
+createdResolvedView
else if isViewNetFlow
+netFlowView
else if isViewTimeInList
+timeInListView
else if isViewAverageAge
+averageAgeView
else if isViewThroughputRun
+throughputRunView
else if isViewDueDatePerformance
+dueDatePerformanceView
else if isViewReleaseBurndown
+releaseBurndownView
else if isViewEpicProgress
+epicProgressView
else if isViewWorkload
+workloadView
else if isViewDistribution
+distributionView
else if isViewDependencyMap
+dependencyMapView
else if isViewActivityHeatmap
+activityHeatmapView
else if isViewPulse
+pulseView
else if isViewMap
@@ -118,6 +142,10 @@ template(name="boardBody")
+emailView
else if isViewChat
+chatView
else if isViewWebsite
+websiteView
else if isViewShop
+shopView
else if isViewVersionControl
+versionControlView
else if isViewColumnSets
+61 -2
View File
@@ -964,6 +964,55 @@ Template.boardBody.helpers({
return Utils.boardView() === 'board-view-size-cycle-time';
},
// The reports of 2026-11-20 (models/lib/boardReports.js).
isViewCreatedResolved() {
return Utils.boardView() === 'board-view-created-resolved';
},
isViewNetFlow() {
return Utils.boardView() === 'board-view-net-flow';
},
isViewTimeInList() {
return Utils.boardView() === 'board-view-time-in-list';
},
isViewAverageAge() {
return Utils.boardView() === 'board-view-average-age';
},
isViewThroughputRun() {
return Utils.boardView() === 'board-view-throughput-run';
},
isViewDueDatePerformance() {
return Utils.boardView() === 'board-view-due-date-performance';
},
isViewReleaseBurndown() {
return Utils.boardView() === 'board-view-release-burndown';
},
isViewEpicProgress() {
return Utils.boardView() === 'board-view-epic-progress';
},
isViewWorkload() {
return Utils.boardView() === 'board-view-workload';
},
isViewDistribution() {
return Utils.boardView() === 'board-view-distribution';
},
isViewDependencyMap() {
return Utils.boardView() === 'board-view-dependency-map';
},
isViewActivityHeatmap() {
return Utils.boardView() === 'board-view-activity-heatmap';
},
isViewMap() {
return Utils.boardView() === 'board-view-map';
},
@@ -973,6 +1022,12 @@ Template.boardBody.helpers({
isViewChat() {
return Utils.boardView() === 'board-view-chat';
},
isViewWebsite() {
return Utils.boardView() === 'board-view-website';
},
isViewShop() {
return Utils.boardView() === 'board-view-shop';
},
isViewColumnSets() {
return Utils.boardView() === 'board-view-column-sets';
},
@@ -1257,8 +1312,12 @@ Template.calendarView.helpers({
locale: TAPi18n.getLanguage(),
rtl: TAPi18n.isRTL(),
}),
editable: true,
selectable: true,
// Dragging a card and clicking a day to add one are writes: only for
// who may write on the board. The server refuses the rest and records
// the refusal as an attempt (server/models/cards.js createCardWithDueDate),
// which it is only when the calendar did not offer it.
editable: Utils.canModifyBoard(),
selectable: Utils.canModifyBoard(),
/* TODO: lists as resources: https://fullcalendar.io/docs/vertical-resource-view */
navLinks: true,
businessHours: {
+17
View File
@@ -983,3 +983,20 @@ body.board-view.mobile-mode #header #header-main-bar .board-header-sidebar-toggl
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
}
}
/* Board View menu: the heading over each group of views
(models/lib/boardViewSettings.js BOARD_VIEW_GROUPS). */
.pop-over-list .board-view-group-heading {
padding: 8px 10px 2px;
font-size: 0.8em;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.04em;
/* 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) {
margin-top: 4px;
border-top: 1px solid #dfe1e6;
}
+6 -2
View File
@@ -173,16 +173,18 @@ template(name="boardChangeWatchPopup")
(js-open-<view>-view), which is what the click handlers in boardHeader.js
listen for. docs/Features/Board-Sidebar/Board-Settings/Board-View.md
template(name="boardChangeViewPopup")
//- Grouped, a heading over each group (models/lib/boardViewSettings.js
BOARD_VIEW_GROUPS), the board's own order inside a group.
ul.pop-over-list
each boardViewMenuEntries
if groupLabelKey
li.board-view-group-heading {{_ groupLabelKey}}
li
a.js-board-view-entry(class="{{jsClass}}")
i.fa(class="{{icon}}")
| {{_ labelKey}}
if isCurrent
i.fa.fa-check
if separatorAfter
hr
//- The Create Board form: a title, what the board is visible to, and Create.
Four templates drew it letter for letter - the one on the All Boards page and
@@ -362,3 +364,5 @@ template(name="boardViewMenu")
if $eq boardView 'board-view-stats'
i.fa.fa-pie-chart
span.board-header-btn-label= boardViewName
//- The open view's ? (featureHelp.jade), after the menu that names it.
+featureHelp(id=boardViewHelp)
+76
View File
@@ -10,6 +10,7 @@ import Swimlanes from '/models/swimlanes';
import TableVisibilityModeSettings from '/models/tableVisibilityModeSettings';
import visibilityDesc from '/imports/i18n/lib/visibilityDesc';
const { boardViewMenuEntries } = require('/models/lib/boardViewSettings');
const { boardViewHelpId } = require('/models/lib/featureHelp');
import { allowBoardView } from '/client/lib/instanceFeatures';
import { Filter } from '/client/lib/filter';
// Which way a button that opens a sidebar view goes on a click - one answer,
@@ -452,6 +453,55 @@ Template.boardChangeViewPopup.events({
Utils.setBoardView('board-view-size-cycle-time');
Popup.back();
},
// The reports of 2026-11-20 (models/lib/boardReports.js).
'click .js-open-created-resolved-view'() {
Utils.setBoardView('board-view-created-resolved');
Popup.back();
},
'click .js-open-net-flow-view'() {
Utils.setBoardView('board-view-net-flow');
Popup.back();
},
'click .js-open-time-in-list-view'() {
Utils.setBoardView('board-view-time-in-list');
Popup.back();
},
'click .js-open-average-age-view'() {
Utils.setBoardView('board-view-average-age');
Popup.back();
},
'click .js-open-throughput-run-view'() {
Utils.setBoardView('board-view-throughput-run');
Popup.back();
},
'click .js-open-due-date-performance-view'() {
Utils.setBoardView('board-view-due-date-performance');
Popup.back();
},
'click .js-open-release-burndown-view'() {
Utils.setBoardView('board-view-release-burndown');
Popup.back();
},
'click .js-open-epic-progress-view'() {
Utils.setBoardView('board-view-epic-progress');
Popup.back();
},
'click .js-open-workload-view'() {
Utils.setBoardView('board-view-workload');
Popup.back();
},
'click .js-open-distribution-view'() {
Utils.setBoardView('board-view-distribution');
Popup.back();
},
'click .js-open-dependency-map-view'() {
Utils.setBoardView('board-view-dependency-map');
Popup.back();
},
'click .js-open-activity-heatmap-view'() {
Utils.setBoardView('board-view-activity-heatmap');
Popup.back();
},
'click .js-open-map-view'() {
Utils.setBoardView('board-view-map');
Popup.back();
@@ -464,6 +514,14 @@ 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-shop-view'() {
Utils.setBoardView('board-view-shop');
Popup.back();
},
'click .js-open-version-control-view'() {
Utils.setBoardView('board-view-version-control');
Popup.back();
@@ -932,6 +990,10 @@ Template.boardViewMenu.helpers({
boardView() {
return Utils.boardView();
},
// The ? of the view that is on (docs/Features/General/Help-Button.md).
boardViewHelp() {
return boardViewHelpId(Utils.boardView());
},
// The tooltip: the name of the view that is ON. The button is icon only, so
// this is the only place the name appears. docs/Features/Header-Bar/Header.md
boardViewName() {
@@ -974,8 +1036,22 @@ 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-shop': 'board-view-shop',
'board-view-version-control': 'board-view-version-control',
'board-view-column-sets': 'board-view-column-sets',
'board-view-created-resolved': 'board-view-created-resolved',
'board-view-net-flow': 'board-view-net-flow',
'board-view-time-in-list': 'board-view-time-in-list',
'board-view-average-age': 'board-view-average-age',
'board-view-throughput-run': 'board-view-throughput-run',
'board-view-due-date-performance': 'board-view-due-date-performance',
'board-view-release-burndown': 'board-view-release-burndown',
'board-view-epic-progress': 'board-view-epic-progress',
'board-view-workload': 'board-view-workload',
'board-view-distribution': 'board-view-distribution',
'board-view-dependency-map': 'board-view-dependency-map',
'board-view-activity-heatmap': 'board-view-activity-heatmap',
};
return TAPi18n.__(names[Utils.boardView()] || 'board-view');
},
@@ -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;
+1 -1
View File
@@ -611,7 +611,7 @@ template(name="workspaceActionsPopup")
//- and Multi-Selection still open the sidebar, straight into their own view.
//-
//- Each names itself beside its icon where the bar has room, and the one rule
//- in header.css drops every label below 1100px, leaving the tooltips.
//- in header.css drops every label at 1000px and narrower, leaving the tooltips.
//- docs/Features/All-Boards/All-Boards.md
template(name="allBoardsHeaderButtons")
a.board-header-btn.js-open-boards-sort(title="{{_ 'sort-boards'}}" class="{{#unless isBoardsSort 'custom'}}emphasis{{/unless}}")
+5 -10
View File
@@ -75,16 +75,11 @@ import { errorMessage } from '/client/lib/errorMessage';
// SubsManager removed for Meteor 3 migration
// #5850: which sharing scopes (organizations/teams/domains) the admin enabled
// in Admin Panel > People > Shared Templates (stored in localStorage, like the
// Shared Templates admin UI). Used to gate the drag-to-share drop targets.
// in Admin Panel > People > Shared Templates - an instance setting, the same in
// every browser. Used to gate the drag-to-share drop targets.
function loadSharedTemplatesScopes() {
try {
const raw = window.localStorage.getItem('sharedTemplatesScopes');
const arr = raw ? JSON.parse(raw) : [];
return Array.isArray(arr) ? arr : [];
} catch (e) {
return [];
}
const { sharedTemplatesScopes } = require('/models/lib/sharedTemplatesScopes');
return sharedTemplatesScopes(ReactiveCache.getCurrentSetting());
}
// #5850: share a (template) board with an Organization / Team / Domain by adding
@@ -1178,7 +1173,7 @@ Template.boardList.helpers({
return Template.instance().selectedMenu.get() === type;
},
// #5850: drag-to-share drop targets — the user's organizations/teams/domains,
// gated by the admin's Shared Templates scopes (localStorage). Shown in the
// gated by the admin's Shared Templates scopes (Settings). Shown in the
// Templates view so a personal Template Board can be dragged onto one to share.
shareTargets() {
const scopes = loadSharedTemplatesScopes();
@@ -51,3 +51,49 @@ template(name="processBehaviorView")
template(name="sizeCycleTimeView")
+boardChartView(chartKey="sizeCycleTime" titleKey="board-view-size-cycle-time")
//- The reports of 2026-11-20 (models/lib/boardReports.js): each answers bars and
a table, drawn and exported by boardChartView like the charts above.
template(name="createdResolvedView")
+boardChartView(chartKey="createdResolved" titleKey="board-view-created-resolved")
template(name="netFlowView")
+boardChartView(chartKey="netFlow" titleKey="board-view-net-flow")
template(name="timeInListView")
+boardChartView(chartKey="timeInList" titleKey="board-view-time-in-list")
template(name="averageAgeView")
+boardChartView(chartKey="averageAge" titleKey="board-view-average-age")
template(name="throughputRunView")
+boardChartView(chartKey="throughputRun" titleKey="board-view-throughput-run")
template(name="dueDatePerformanceView")
+boardChartView(chartKey="dueDatePerformance" titleKey="board-view-due-date-performance")
template(name="releaseBurndownView")
+boardChartView(chartKey="releaseBurndown" titleKey="board-view-release-burndown")
template(name="epicProgressView")
+boardChartView(chartKey="epicProgress" titleKey="board-view-epic-progress")
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")
template(name="dependencyMapView")
+boardChartView(chartKey="dependencyMap" titleKey="board-view-dependency-map")
template(name="activityHeatmapView")
+boardChartView(chartKey="activityHeatmap" titleKey="board-view-activity-heatmap")
@@ -15,6 +15,18 @@ const PLACEHOLDER_VIEW_TEMPLATES = [
'throughputHistogramView',
'wipRunView',
'pulseView',
'createdResolvedView',
'netFlowView',
'timeInListView',
'averageAgeView',
'throughputRunView',
'dueDatePerformanceView',
'releaseBurndownView',
'epicProgressView',
'workloadView',
'distributionView',
'dependencyMapView',
'activityHeatmapView',
];
PLACEHOLDER_VIEW_TEMPLATES.forEach(name => {
@@ -98,6 +98,12 @@ function barsFromSeries(series, valueKey, labelKey) {
function computeBarRows(chartKey, data) {
if (!data) return [];
// The reports (models/lib/boardReports.js) answer their bars ready to draw.
if (Array.isArray(data.bars)) {
const { labelText } = require('/models/lib/boardReports');
return data.bars.map(bar => ({ label: labelText(bar.label, (key, fallback) => TAPi18n.__(key) || fallback),
value: Math.round((Number(bar.value) || 0) * 100) / 100 }));
}
if (chartKey === 'burndown') return barsFromSeries(data.series, 'remaining', 'day');
if (chartKey === 'burnup') return barsFromSeries(data.series, 'completed', 'day');
if (chartKey === 'wipRun') return barsFromSeries(data.series, 'count', 'day');
+47 -1
View File
@@ -238,16 +238,46 @@ const EXPORT_FORMAT_GROUPS = [
// Straight into Trello through its API (server/trelloApiExport.js), not
// a file: an action that opens its own popup.
{ key: 'trello-api', icon: 'fa-trello', label: 'Trello', action: 'js-export-to-trello', scopes: BOARD_ONLY },
// Trello's board.json with the cards' attachments as files, the .zip
// the Trello import reads (server/lib/renderExternalExport.js streamTrelloZip).
{ key: 'trellozip', icon: 'fa-file-archive-o', labelKey: 'attachments', labelPrefix: 'Trello .zip', path: 'export/trellozip', ext: 'zip', scopes: BOARD_ONLY },
{ key: 'kanboard', icon: 'fa-upload', label: 'Kanboard', path: 'export/kanboard', ext: 'json', scopes: BOARD_ONLY },
{ key: 'markdown', icon: 'fa-file-text-o', label: 'Markdown', path: 'export/markdown', ext: 'md', scopes: BOARD_ONLY },
{ key: 'leo', icon: 'fa-sitemap', label: 'Leo', path: 'export/leo', ext: 'leo', scopes: BOARD_ONLY },
{ key: 'opml', icon: 'fa-indent', label: 'OPML', path: 'export/opml', ext: 'opml', scopes: BOARD_ONLY },
{ key: 'orgmode', icon: 'fa-list-alt', label: 'Org mode', path: 'export/orgmode', ext: 'org', scopes: BOARD_ONLY },
{ 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 },
@@ -261,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 },
@@ -316,7 +347,22 @@ function resolvedFormatGroups() {
url: entry.path ? exportUrl(`/api/boards/:boardId/${entry.path}`, entry.query || {}) : '',
})),
}))
.filter(group => group.entries.length);
.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", 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) : entry.groupLabel || group.heading, entries: [] });
}
parts[parts.length - 1].entries.push(entry);
}
return parts;
});
}
// Import writes to the board, so unlike export it is offered only to somebody
@@ -63,3 +63,8 @@
global form rules give selects one row's height; show a few rows. */
.scrum-view select[multiple], .scrum-metadata select[multiple] { min-height: 5.5em; height: auto; }
.scrum-multiple-help { display: block; opacity: .8; max-width: 32em; }
/* The Definition of Ready and of Done, readable by every member. */
.scrum-definition .scrum-definition-text {
white-space: pre-wrap;
}
@@ -33,6 +33,16 @@ template(name="scrumView")
p {{_ 'scrum-history-job-running' done=historyJob.done total=historyJob.total}}
.scrum-progress
.scrum-progress-bar(style=historyJob.style)
//- The team's Definition of Ready and Definition of Done, readable by
every member - the settings below are the board admin's.
if settings.definitionOfReady
details.scrum-definition.js-scrum-definition-of-ready
summary {{_ 'scrum-definition-of-ready'}}
p.scrum-definition-text= settings.definitionOfReady
if settings.definitionOfDone
details.scrum-definition.js-scrum-definition-of-done
summary {{_ 'scrum-definition-of-done'}}
p.scrum-definition-text= settings.definitionOfDone
if canAdmin
details.scrum-settings(open=settingsOpen)
summary {{_ 'scrum-settings'}}
@@ -42,8 +52,21 @@ template(name="scrumView")
| {{_ 'scrum-enabled'}}
label {{_ 'scrum-product-goal'}}
textarea(name="productGoal") {{settings.productGoal}}
//- Definition of Ready (2026-11-20): when a backlog item may be
taken into a sprint, beside the Definition of Done.
label {{_ 'scrum-definition-of-ready'}}
textarea(name="definitionOfReady") {{settings.definitionOfReady}}
label {{_ 'scrum-definition-of-done'}}
textarea(name="definitionOfDone") {{settings.definitionOfDone}}
//- The meeting helpers of the board menu (scrumMeetings.js).
label
input(type="checkbox" name="standupTimer" checked=settings.standupTimer)
| {{_ 'daily-standup'}}
label {{_ 'standup-minutes'}}
input(type="number" name="standupMinutes" min="1" max="15" value=settings.standupMinutes)
label
input(type="checkbox" name="retrospectiveBoard" checked=settings.retrospectiveBoard)
| {{_ 'retrospective-board'}}
each accountabilityFields
label {{label}}
select(name=field multiple=multiple)
+4 -1
View File
@@ -306,7 +306,10 @@ Template.scrumView.events({
event.preventDefault(); const values = fields(event.currentTarget);
const formData = new FormData(event.currentTarget);
await mutate(tpl, 'scrum.configure', { enabled: values.enabled === 'on', productGoal: values.productGoal,
definitionOfDone: values.definitionOfDone, estimateSource: values.estimateSource,
definitionOfDone: values.definitionOfDone, definitionOfReady: values.definitionOfReady,
standupTimer: values.standupTimer === 'on', retrospectiveBoard: values.retrospectiveBoard === 'on',
standupMinutes: require('/models/lib/scrumMeetings').standupMinutes(values.standupMinutes),
estimateSource: values.estimateSource,
estimateCustomFieldId: nullable(values.estimateCustomFieldId), estimateUnit: values.estimateUnit,
completionPolicy: values.completionPolicy, productOwnerId: nullable(values.productOwnerId),
scrumMasterId: nullable(values.scrumMasterId), developerIds: formData.getAll('developerIds'),
+233
View File
@@ -0,0 +1,233 @@
/* Board View / Shop: a readable shop page, whatever the board's colours. */
.shop-view {
max-width: 72em;
margin-inline: auto;
padding: 1em;
background: #fff;
color: #222;
line-height: 1.5;
overflow-y: auto;
height: 100%;
box-sizing: border-box;
}
.shop-header {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6em 1em;
border-block-end: 1px solid #ddd;
margin-block-end: 1em;
}
.shop-title {
flex: 1 1 auto;
margin: 0.3em 0;
}
.shop-title a {
color: inherit;
text-decoration: none;
}
.shop-cart-button,
.shop-settings-link {
white-space: nowrap;
}
.shop-cart-button.is-current {
font-weight: bold;
}
.shop-cart-count {
display: inline-block;
min-width: 1.4em;
margin-inline-start: 0.3em;
padding: 0 0.3em;
border-radius: 0.7em;
background: #2e7d32;
color: #fff;
text-align: center;
font-size: 0.85em;
}
.shop-notice {
padding: 0.5em 0.8em;
border-radius: 4px;
background: #fff3cd;
color: #5c4400;
}
.shop-error {
background: #fde2e1;
color: #7a1712;
}
.shop-categories {
display: flex;
flex-wrap: wrap;
gap: 0.4em;
margin-block: 0.6em 1em;
}
.shop-categories a {
padding: 0.2em 0.7em;
border-radius: 1em;
border: 1px solid #ccc;
text-decoration: none;
}
.shop-categories a.is-current {
font-weight: bold;
outline: 2px solid #222;
}
.shop-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 13em), 1fr));
gap: 1em;
padding: 0;
margin: 0;
list-style: none;
}
.shop-tile {
display: flex;
flex-direction: column;
gap: 0.3em;
padding: 0.6em;
border: 1px solid #e3e3e3;
border-radius: 6px;
}
.shop-tile-link {
display: flex;
flex-direction: column;
gap: 0.3em;
color: inherit;
text-decoration: none;
}
.shop-tile-image {
width: 100%;
aspect-ratio: 4 / 3;
object-fit: cover;
border-radius: 4px;
background: #f2f2f2;
}
.shop-tile-noimage {
display: flex;
align-items: center;
justify-content: center;
font-size: 2.5em;
color: #bbb;
}
.shop-tile-title {
font-weight: bold;
}
.shop-tile-short {
color: #555;
font-size: 0.9em;
}
.shop-price {
font-weight: bold;
color: #2e7d32;
}
.shop-sold-out {
color: #b71c1c;
font-weight: bold;
}
.shop-product-page {
display: flex;
flex-wrap: wrap;
gap: 1.5em;
}
.shop-product-image {
flex: 1 1 18em;
max-width: min(100%, 32em);
border-radius: 6px;
object-fit: contain;
}
.shop-product-details {
flex: 1 1 18em;
min-width: 0;
}
.shop-add,
.shop-checkout,
.shop-settings {
display: flex;
flex-direction: column;
gap: 0.3em;
max-width: 32em;
}
.shop-add input[type="number"] {
max-width: 6em;
}
.shop-cart-table-wrap,
.shop-cart {
overflow-x: auto;
}
.shop-cart-table {
border-collapse: collapse;
min-width: 100%;
}
.shop-cart-table th,
.shop-cart-table td {
padding: 0.3em 0.5em;
border-block-end: 1px solid #eee;
text-align: start;
}
.shop-cart-table input[type="number"] {
width: 4.5em;
}
.shop-amount {
text-align: end;
white-space: nowrap;
}
.shop-totals {
display: grid;
grid-template-columns: auto auto;
justify-content: start;
gap: 0.2em 1.5em;
}
.shop-totals dd {
margin: 0;
text-align: end;
}
.shop-total {
font-weight: bold;
}
.shop-methods {
border: 1px solid #ddd;
border-radius: 4px;
}
.shop-check,
.shop-method,
.shop-terms {
display: block;
}
.shop-qr svg {
max-width: 100%;
height: auto;
}
.shop-barcode {
max-width: 32em;
}
.shop-settings fieldset {
border: 1px solid #ddd;
border-radius: 4px;
max-height: 14em;
overflow-y: auto;
}
.shop-settings-method {
display: flex;
justify-content: space-between;
gap: 0.5em;
}
.shop-saved {
color: #2e7d32;
}
/* The shop's forms use labelled native checkboxes and radio buttons, not the
hidden material inputs of the rest of WeKan. */
.shop-view input[type="checkbox"],
.shop-view input[type="radio"],
.shop-settings input[type="checkbox"] {
display: inline-block;
visibility: visible;
position: static;
inset-inline-start: auto;
width: 16px;
height: 16px;
min-height: 0;
padding: 0;
margin: 0;
margin-inline-end: 6px;
appearance: auto;
vertical-align: middle;
cursor: pointer;
}
+288
View File
@@ -0,0 +1,288 @@
//- Board View / Shop (models/lib/shop.js, docs/Features/Board-Header/Board-Views/Shop.md):
the products on the board's cards as a web shop - a card with a price in a
list on sale is a product, its labels the categories. The cart is kept in
this browser; the checkout sends card ids and quantities, and the server
prices the order from the cards and writes it as a card in the Orders list.
A public board can open in it (Board Settings / Shop or Board View), so a
visitor shops at the board's address instead of seeing the kanban. Every
text of a card is drawn as text, or through the Markdown viewer.
template(name="shopView")
.shop-view
header.shop-header
h1.shop-title
a.js-shop-home(href="?") {{shopTitle}}
if isBoardAdmin
a.shop-settings-link.js-open-shop-settings(href="#" title="{{_ 'board-view-shop'}}" aria-label="{{_ 'board-view-shop'}}")
i.fa.fa-cog
a.shop-cart-button.js-shop-cart(href="#" class="{{#if $eq mode 'cart'}}is-current{{/if}}")
i.fa.fa-shopping-cart
| {{_ 'shop-cart'}}
span.shop-cart-count {{cartCount}}
unless settings.enabled
p.shop-notice.shop-closed {{_ 'shop-closed'}}
if showShop
if $eq mode 'done'
+shopOrderDone(order=order)
else if $eq mode 'checkout'
+shopCheckout
else if $eq mode 'cart'
+shopCart
else if productPage
with productPage
article.shop-product-page
if coverUrl
img.shop-product-image(src=coverUrl alt=title)
.shop-product-details
h2.shop-product-title {{title}}
p.shop-price {{money priceMinor}}
if sku
p.shop-sku {{_ 'shop-product-code'}}: {{sku}}
if soldOut
p.shop-sold-out {{_ 'shop-sold-out'}}
else
if hasStock
p.shop-stock {{_ 'shop-in-stock' count=stock}}
form.shop-add.js-shop-add(data-id=_id)
label(for="shop-quantity") {{_ 'shop-quantity'}}
input#shop-quantity(type="number" name="quantity" min="1" max="{{maxQuantity}}" step="1" value="1")
button.primary(type="submit") {{_ 'shop-add-to-cart'}}
if description
.shop-product-description
+viewer
= description
a.js-shop-home(href="?") {{_ 'shop-continue'}}
else
if shopIntro
.shop-intro
+viewer
= shopIntro
if categories.length
nav.shop-categories(aria-label="{{_ 'labels'}}")
a.js-shop-category(href="#" data-id="" class="{{#unless category}}is-current{{/unless}}") {{_ 'shop-all-categories'}}
each cat in categories
a.js-shop-category(href="#" data-id=cat._id class="card-label-{{cat.color}} {{#if $eq cat._id category}}is-current{{/if}}") {{cat.name}}
if products.length
ul.shop-grid
each product in products
li.shop-tile(data-id=product._id)
a.shop-tile-link.js-shop-product(href="?product={{product._id}}" data-id=product._id)
if product.coverUrl
img.shop-tile-image(src=product.coverUrl alt=product.title loading="lazy")
else
span.shop-tile-image.shop-tile-noimage
i.fa.fa-shopping-bag
span.shop-tile-title {{product.title}}
span.shop-price {{money product.priceMinor}}
if product.short
span.shop-tile-short {{product.short}}
if product.soldOut
span.shop-sold-out {{_ 'shop-sold-out'}}
else
button.js-shop-add-one(type="button" data-id=product._id) {{_ 'shop-add-to-cart'}}
else
p.quiet.shop-empty {{_ 'shop-empty'}}
template(name="shopCart")
section.shop-cart
h2 {{_ 'shop-cart'}}
if priced.lines.length
table.shop-cart-table
thead
tr
th {{_ 'title'}}
th {{_ 'shop-quantity'}}
th {{_ 'billing-amount'}}
th
tbody
each line in priced.lines
tr(data-id=line.cardId)
td
a.js-shop-product(href="?product={{line.cardId}}" data-id=line.cardId) {{line.title}}
td
input.js-shop-quantity(type="number" min="1" max="999" step="1" value=line.quantity data-id=line.cardId aria-label="{{_ 'shop-quantity'}}")
| × {{money line.unitMinor}}
td.shop-amount {{money line.lineMinor}}
td
a.js-shop-remove(href="#" data-id=line.cardId title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
+shopTotals(totals=priced)
if checkoutRefusal
p.shop-notice {{refusalText}}
else
button.primary.js-shop-checkout(type="button") {{_ 'shop-checkout'}}
else
if priced.error
p.shop-notice {{priceErrorText}}
p.quiet {{_ 'shop-cart-empty'}}
a.js-shop-home(href="?") {{_ 'shop-continue'}}
template(name="shopTotals")
dl.shop-totals
if totals.vatMinor
dt {{_ 'billing-net'}}
dd {{money totals.netMinor}}
dt {{_ 'billing-vat'}} {{totals.vatPercent}} %
dd {{money totals.vatMinor}}
dt.shop-total {{_ 'billing-total'}}
dd.shop-total {{money totals.totalMinor}}
template(name="shopCheckout")
form.shop-checkout.js-shop-place-order
h2 {{_ 'shop-checkout'}}
+shopTotals(totals=priced)
label(for="shop-name") {{_ 'fullname'}}
input#shop-name(type="text" name="name" required maxlength="100" autocomplete="name")
label(for="shop-email") {{_ 'email'}}
input#shop-email(type="email" name="email" required maxlength="254" autocomplete="email")
label(for="shop-phone") {{_ 'billing-phone'}}
input#shop-phone(type="tel" name="phone" maxlength="40" autocomplete="tel")
label(for="shop-address") {{_ 'billing-address'}}
textarea#shop-address(name="address" rows="3" maxlength="500" autocomplete="street-address")
label(for="shop-note") {{_ 'shop-note'}}
textarea#shop-note(name="note" rows="3" maxlength="1000")
fieldset.shop-methods
legend {{_ 'billing-method'}}
each method in paymentMethods
label.shop-method
input(type="radio" name="paymentMethodId" value=method.id required checked="{{#if $eq @index 0}}checked{{/if}}")
| {{method.label}}
if settings.termsUrl
label.shop-terms
input(type="checkbox" name="termsAccepted" required)
| {{_ 'shop-accept-terms'}}
| (
a(href=settings.termsUrl target="_blank" rel="noopener noreferrer") {{settings.termsUrl}}
| )
p.quiet.shop-privacy {{_ 'shop-privacy-note'}}
if error
p.shop-notice.shop-error {{error}}
button.primary(type="submit" disabled="{{#if sending}}disabled{{/if}}") {{_ 'shop-place-order'}}
a.js-shop-cart(href="#") {{_ 'back'}}
template(name="shopOrderDone")
section.shop-done
h2 {{_ 'shop-order-placed' number=order.number}}
+shopTotals(totals=order)
with order.payment
section.shop-payment
h3 {{methodLabel}}
if error
p.shop-notice {{error}}
else
if qr
p.quiet {{_ 'billing-pay-by-scanning'}}
.shop-qr {{{qrCode}}}
if barcode
.shop-barcode {{{barcodeCode}}}
each line in lines
p.shop-payment-line {{line}}
if safeLink
p
a(href=safeLink target="_blank" rel="noopener noreferrer") {{safeLink}}
if order.reference
p {{_ 'billing-payment-reference'}}: {{formattedReference}}
if order.invoiceNumber
p.shop-invoice-number {{_ 'billing-invoice'}}: {{order.invoiceNumber}}
a.js-shop-home(href="?") {{_ 'shop-continue'}}
//- Board Settings / Shop (docs/Features/Board-Sidebar/Board-Settings/Shop.md).
Saved as a whole by the shopSetSettings method (server/shop.js), which
checks every value again: who saves, the fields, the lists, the Orders
list's board and the payment methods.
template(name="boardShopSettingsPopup")
form.shop-settings.js-shop-settings
label.shop-check
input(type="checkbox" name="enabled" checked=draft.enabled)
| {{_ 'shop-open'}}
label(for="shop-set-title") {{_ 'title'}}
input#shop-set-title(type="text" name="title" maxlength="200" value=draft.title placeholder=boardTitle)
label(for="shop-set-intro") {{_ 'shop-intro'}}
textarea#shop-set-intro(name="intro" rows="3" maxlength="5000") {{draft.intro}}
label(for="shop-set-price") {{_ 'shop-price-field'}}
select#shop-set-price(name="priceFieldId")
option(value="") {{_ 'shop-not-chosen'}}
each field in fieldsFor 'priceFieldId'
option(value=field._id selected="{{#if $eq field._id draft.priceFieldId}}selected{{/if}}") {{field.name}}
label(for="shop-set-sku") {{_ 'shop-sku-field'}}
select#shop-set-sku(name="skuFieldId")
option(value="") {{_ 'shop-not-chosen'}}
each field in fieldsFor 'skuFieldId'
option(value=field._id selected="{{#if $eq field._id draft.skuFieldId}}selected{{/if}}") {{field.name}}
label(for="shop-set-stock") {{_ 'shop-stock-field'}}
select#shop-set-stock(name="stockFieldId")
option(value="") {{_ 'shop-not-chosen'}}
each field in fieldsFor 'stockFieldId'
option(value=field._id selected="{{#if $eq field._id draft.stockFieldId}}selected{{/if}}") {{field.name}}
label.shop-check
input(type="checkbox" name="decrementStock" checked=draft.decrementStock)
| {{_ 'shop-decrement-stock'}}
label(for="shop-set-currency") {{_ 'billing-currency'}}
input#shop-set-currency(type="text" name="currency" maxlength="3" pattern="[A-Za-z]{3}" value=draft.currency)
label(for="shop-set-vat") {{_ 'billing-vat'}} %
input#shop-set-vat(type="number" name="vatPercent" min="0" max="100" step="0.01" value=draft.vatPercent)
label.shop-check
input(type="checkbox" name="pricesIncludeVat" checked=draft.pricesIncludeVat)
| {{_ 'shop-prices-include-vat'}}
label(for="shop-set-reference") {{_ 'billing-payment-reference'}}
select#shop-set-reference(name="referenceType")
each ref in referenceTypes
option(value=ref.value selected="{{#if $eq ref.value draft.referenceType}}selected{{/if}}") {{ref.label}}
fieldset
legend {{_ 'shop-sale-lists'}}
each list in boardLists
label.shop-check
input(type="checkbox" name="saleListIds" value=list._id checked=list.checked)
| {{list.title}}
fieldset
legend {{_ 'shop-category-labels'}}
each label in boardLabels
label.shop-check
input(type="checkbox" name="categoryLabelIds" value=label._id checked=label.checked)
span.card-label(class="card-label-{{label.color}}") {{label.name}}
label(for="shop-set-orders") {{_ 'shop-orders-list'}}
select#shop-set-orders(name="orders")
option(value="") {{_ 'shop-not-chosen'}}
each target in orderTargets
optgroup(label=target.title)
each list in target.lists
option(value="{{target._id}}/{{list._id}}" selected="{{#if isOrdersList target._id list._id}}selected{{/if}}") {{list.title}}
p.quiet {{_ 'shop-orders-private'}}
label.shop-check
input(type="checkbox" name="guestCheckout" checked=draft.guestCheckout)
| {{_ 'shop-guest-checkout'}}
label.shop-check
input(type="checkbox" name="confirmationEmail" checked=draft.confirmationEmail)
| {{_ 'shop-confirmation-email'}}
label(for="shop-set-terms") {{_ 'shop-terms-url'}}
input#shop-set-terms(type="url" name="termsUrl" maxlength="2000" value=draft.termsUrl placeholder="https://")
label.shop-check
input(type="checkbox" name="showOnPublic" checked=showsOnPublic)
| {{_ 'shop-show-on-public'}}
p.quiet {{_ 'shop-show-on-public-note' view=publicViewName}}
fieldset.shop-settings-methods
legend {{_ 'billing-payment-methods'}}
each method in draftMethods
.shop-settings-method(data-id=method.id)
label.shop-check
input.js-shop-method-enabled(type="checkbox" data-id=method.id checked=method.enabled)
| {{method.label}}
if method.summary
| · {{method.summary}}
a.js-shop-method-remove(href="#" data-id=method.id title="{{_ 'delete'}}" aria-label="{{_ 'delete'}}")
i.fa.fa-trash
label(for="shop-method-type") {{_ 'billing-method'}}
select#shop-method-type.js-shop-method-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="shop-method-{{fieldName.name}}") {{fieldName.label}}
if $eq fieldName.name 'details'
textarea.js-shop-method-field(id="shop-method-{{fieldName.name}}" data-name=fieldName.name rows="2" maxlength="2000")
else
input.js-shop-method-field(id="shop-method-{{fieldName.name}}" type="text" data-name=fieldName.name maxlength="2000" placeholder=fieldName.placeholder)
button.js-shop-method-add(type="button") {{_ 'billing-add-method'}}
if error
p.shop-notice.shop-error {{error}}
if saved
p.shop-saved {{_ 'feature-saved'}}
button.primary(type="submit") {{_ 'save'}}
+473
View File
@@ -0,0 +1,473 @@
// Board View / Shop (shopView.jade, models/lib/shop.js). The board's own
// subscription brings its lists, cards, custom fields and attachments - for a
// visitor of a public board too - so the shop is drawn from them as they
// change. Which product is open is in the address (?product=), so a product
// can be linked to. The cart is this browser's (localStorage); the server
// never trusts it for anything but card ids and quantities.
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import { Random } from 'meteor/random';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { Utils } from '/client/lib/utils';
import { METHOD_KEYS, FIELD_KEYS, PLACEHOLDERS, qrSvg, barcodeSvg } from '/client/lib/paymentCodeSvg';
const shop = require('/models/lib/shop');
const { formatMoney } = require('/models/lib/billing');
const { PAYMENT_METHODS, formatReference, formatIban } = require('/models/lib/paymentCodes');
const { BOARD_VIEWS } = require('/models/lib/boardViewSettings');
const t = (key, options) => TAPi18n.__(key, options);
const language = () => {
try { return TAPi18n.getLanguage ? TAPi18n.getLanguage() : undefined; } catch (e) { return undefined; }
};
const errorText = error => (error ? (error.reason || error.error || error.message || String(error)) : '');
// ---------------------------------------------------------------- state
// What the shop shows: the products ('shop'), the cart, the checkout, or the
// order just placed. The open product is the address's ?product=.
const mode = new ReactiveVar('shop');
const category = new ReactiveVar('');
const placedOrder = new ReactiveVar(null);
const cartLines = new ReactiveVar([]);
let cartBoardId = null;
function storage() {
try { return window.localStorage; } catch (e) { return null; }
}
// The cart of the board on screen, read from this browser once per board.
function cart() {
const boardId = Utils.getCurrentBoardId();
if (boardId !== cartBoardId) {
cartBoardId = boardId;
let lines = [];
try {
const raw = storage() && storage().getItem(shop.cartStorageKey(boardId));
lines = raw ? shop.normalizeCart(JSON.parse(raw)).items : [];
} catch (e) { lines = []; }
cartLines.set(lines);
}
return cartLines.get();
}
function saveCart(lines) {
const clean = shop.normalizeCart(lines.filter(l => l.quantity > 0)).items;
cartLines.set(clean);
try { storage() && storage().setItem(shop.cartStorageKey(Utils.getCurrentBoardId()), JSON.stringify(clean)); } catch (e) { /* a private window keeps it on screen only */ }
}
function addToCart(cardId, quantity) {
const lines = cart().slice();
const line = lines.find(l => l.cardId === cardId);
if (line) line.quantity = Math.min(shop.LIMITS.quantity, line.quantity + quantity);
else lines.push({ cardId, quantity });
saveCart(lines);
}
// ---------------------------------------------------------------- the board's shop
function board() {
return Utils.getCurrentBoard();
}
function settings() {
return shop.shopSettingsOf(board());
}
function coverUrlOf(product) {
let image = product.coverId ? ReactiveCache.getAttachment(product.coverId) : null;
if (!image || !image.isImage) {
image = (ReactiveCache.getAttachments({ 'meta.cardId': product._id }) || []).find(a => a && a.isImage);
}
return image && typeof image.link === 'function' ? image.link() : '';
}
function products() {
const boardId = Utils.getCurrentBoardId();
if (!boardId) return [];
return shop.productsOf({
lists: ReactiveCache.getLists({ boardId }) || [],
cards: ReactiveCache.getCards({ boardId, archived: false }) || [],
}, settings());
}
function money(minor) {
return formatMoney(minor, settings().currency, language());
}
// The cart priced from the products on screen - what the buyer sees before
// ordering. The server prices it again from the cards.
function priced() {
const items = cart();
if (!items.length) return { lines: [] };
const all = products();
const known = new Set(all.map(p => p._id));
const priceable = items.filter(i => known.has(i.cardId));
if (!priceable.length) return { lines: [] };
const result = shop.priceCart(priceable, all, settings());
return result.error ? { lines: [], error: result.error } : result;
}
function isBoardAdmin() {
const user = ReactiveCache.getCurrentUser();
return !!(user && typeof user.isBoardAdmin === 'function' && user.isBoardAdmin());
}
function refusal() {
const b = board();
return shop.checkoutRefusal({ settings: settings(), featureOn: true, canRead: !!b, userId: Meteor.userId() });
}
const ERROR_KEYS = {
'shop-closed': 'shop-closed',
'shop-guest-not-allowed': 'shop-login-to-order',
'shop-price-changed': 'shop-price-changed',
'shop-sold-out': 'shop-sold-out',
'shop-not-enough-stock': 'shop-sold-out',
'shop-no-orders-list': 'shop-closed',
'shop-no-payment-method': 'shop-closed',
};
function refusalTextOf(code) {
return ERROR_KEYS[code] ? t(ERROR_KEYS[code]) : code;
}
function goHome() {
mode.set('shop');
FlowRouter.setQueryParams({ product: null });
}
const shared = { money, settings };
// ---------------------------------------------------------------- the shop
Template.shopView.helpers({
...shared,
mode: () => mode.get(),
order: () => placedOrder.get(),
isBoardAdmin,
shopTitle() {
const b = board();
return settings().title || (b ? b.title : '');
},
shopIntro: () => settings().intro,
// A closed shop shows its products to the board's admins only, so they can
// see what it will look like before opening it.
showShop: () => settings().enabled || isBoardAdmin(),
cartCount: () => cart().reduce((n, l) => n + l.quantity, 0),
category: () => category.get(),
categories() {
const b = board();
return shop.categoriesOf(products(), b ? b.labels : [], settings());
},
products() {
return shop.productsInCategory(products(), category.get())
.map(p => ({ ...p, coverUrl: coverUrlOf(p), short: shop.shortDescription(p.description) }));
},
productPage() {
const id = FlowRouter.getQueryParam('product');
const product = id && products().find(p => p._id === id);
if (!product) return null;
return {
...product,
coverUrl: coverUrlOf(product),
hasStock: product.stock !== null,
maxQuantity: product.stock === null ? shop.LIMITS.quantity : Math.min(product.stock, shop.LIMITS.quantity),
};
},
});
Template.shopView.events({
'click .js-shop-home'(evt) {
evt.preventDefault();
goHome();
},
'click .js-shop-product'(evt) {
evt.preventDefault();
mode.set('shop');
FlowRouter.setQueryParams({ product: evt.currentTarget.getAttribute('data-id') });
window.scrollTo(0, 0);
},
'click .js-shop-category'(evt) {
evt.preventDefault();
category.set(evt.currentTarget.getAttribute('data-id') || '');
},
'click .js-shop-cart'(evt) {
evt.preventDefault();
mode.set('cart');
},
'click .js-shop-add-one'(evt) {
evt.preventDefault();
addToCart(evt.currentTarget.getAttribute('data-id'), 1);
},
'submit .js-shop-add'(evt) {
evt.preventDefault();
const quantity = parseInt(evt.currentTarget.elements.quantity.value, 10);
if (!Number.isInteger(quantity) || quantity < 1) return;
addToCart(evt.currentTarget.getAttribute('data-id'), Math.min(quantity, shop.LIMITS.quantity));
mode.set('cart');
},
'click .js-open-shop-settings'(evt) {
evt.preventDefault();
Popup.open('boardShopSettings', { titleKey: 'board-view-shop', dataContext: board() })(evt);
},
});
// ---------------------------------------------------------------- the cart
Template.shopCart.helpers({
...shared,
priced,
checkoutRefusal: refusal,
refusalText: () => refusalTextOf(refusal()),
priceErrorText: () => refusalTextOf(priced().error),
});
Template.shopCart.events({
'change .js-shop-quantity'(evt) {
const cardId = evt.currentTarget.getAttribute('data-id');
const quantity = parseInt(evt.currentTarget.value, 10);
saveCart(cart().map(l => (l.cardId === cardId ? { cardId, quantity: Number.isInteger(quantity) ? Math.max(0, Math.min(quantity, shop.LIMITS.quantity)) : l.quantity } : l)));
},
'click .js-shop-remove'(evt) {
evt.preventDefault();
const cardId = evt.currentTarget.getAttribute('data-id');
saveCart(cart().filter(l => l.cardId !== cardId));
},
'click .js-shop-checkout'(evt) {
evt.preventDefault();
if (!refusal()) mode.set('checkout');
},
});
Template.shopTotals.helpers(shared);
// ---------------------------------------------------------------- checkout
function methodLabel(entry) {
const m = entry.method || {};
return m.label || t(METHOD_KEYS[m.type] || m.type);
}
Template.shopCheckout.onCreated(function () {
this.error = new ReactiveVar('');
this.sending = new ReactiveVar(false);
});
Template.shopCheckout.helpers({
...shared,
priced,
error: () => Template.instance().error.get(),
sending: () => Template.instance().sending.get(),
paymentMethods: () => shop.enabledPaymentMethods(settings()).map(m => ({ id: m.id, label: methodLabel(m) })),
});
Template.shopCheckout.events({
'click .js-shop-cart'(evt) {
evt.preventDefault();
mode.set('cart');
},
async 'submit .js-shop-place-order'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const value = name => (form.elements[name] ? String(form.elements[name].value || '') : '');
const method = form.querySelector('input[name="paymentMethodId"]:checked');
const totals = priced();
tpl.error.set('');
tpl.sending.set(true);
try {
const order = await Meteor.callAsync('shopPlaceOrder', Utils.getCurrentBoardId(), {
// Card ids and quantities only: the server prices the order itself.
cart: cart().map(l => ({ cardId: l.cardId, quantity: l.quantity })),
contact: {
name: value('name'), email: value('email'), phone: value('phone'), address: value('address'), note: value('note'),
termsAccepted: !!(form.elements.termsAccepted && form.elements.termsAccepted.checked),
},
paymentMethodId: method ? method.value : '',
expectedTotalMinor: totals.totalMinor,
// The confirmation e-mail is written in the buyer's language.
language: language() || 'en',
});
saveCart([]);
placedOrder.set(order);
mode.set('done');
window.scrollTo(0, 0);
} catch (error) {
tpl.error.set(refusalTextOf(error && error.error) !== (error && error.error) ? refusalTextOf(error.error) : errorText(error));
} finally {
tpl.sending.set(false);
}
},
});
// ---------------------------------------------------------------- the order placed
Template.shopOrderDone.helpers({
...shared,
methodLabel() {
return methodLabel(this);
},
qrCode() {
return this.qr ? qrSvg(this.qr, this.swissCross) : '';
},
barcodeCode() {
return this.barcode ? barcodeSvg(this.barcode) : '';
},
// A payment link of the method: https, or a payment app's own scheme -
// never anything a browser would run.
safeLink() {
const link = typeof this.link === 'string' ? this.link : '';
return /^(https:\/\/|upi:\/\/|bitcoin:|ethereum:|litecoin:)/i.test(link) ? link : '';
},
formattedReference() {
const order = Template.currentData().order;
return order ? formatReference(order.reference) : '';
},
});
// ---------------------------------------------------------------- Board Settings / Shop
function fieldsOfBoard() {
const boardId = Utils.getCurrentBoardId();
return boardId ? (ReactiveCache.getCustomFields({ boardIds: { $in: [boardId] } }) || []) : [];
}
Template.boardShopSettingsPopup.onCreated(function () {
const b = board();
const current = settings();
// A board that never saved its shop gets the fields and the Orders list its
// names suggest: a custom field called Price, a list called Orders.
const suggested = shop.suggestedMapping({
customFields: fieldsOfBoard(),
lists: b ? (ReactiveCache.getLists({ boardId: b._id, archived: false }) || []) : [],
});
const stored = b && b.shopSettings;
// A copied board's shop keeps its look but not the source's fields and
// Orders list (models/lib/shop.js copiedShopSettings): suggest those too.
const fill = {};
for (const key of ['priceFieldId', 'skuFieldId', 'stockFieldId']) if (!current[key] && suggested[key]) fill[key] = suggested[key];
if (!current.ordersListId && suggested.ordersListId) Object.assign(fill, { ordersListId: suggested.ordersListId, ordersBoardId: b._id });
this.draft = new ReactiveVar(stored ? { ...current, ...fill } : { ...current, ...suggested, ordersBoardId: suggested.ordersListId ? b._id : '' });
this.methods = new ReactiveVar(current.paymentMethods.slice());
this.methodType = new ReactiveVar('sepa');
this.targets = new ReactiveVar([]);
this.error = new ReactiveVar('');
this.saved = new ReactiveVar(false);
Meteor.callAsync('shopOrderTargets').then(targets => this.targets.set(targets || [])).catch(error => this.error.set(errorText(error)));
});
Template.boardShopSettingsPopup.helpers({
draft: () => Template.instance().draft.get(),
boardTitle: () => (board() ? board().title : ''),
fieldsFor(key) {
const types = shop.FIELD_TYPES[key] || [];
return fieldsOfBoard().filter(f => types.includes(f.type)).map(f => ({ _id: f._id, name: f.name }));
},
referenceTypes: () => shop.REFERENCE_TYPES.map(value => ({ value, label: t(`billing-reference-${value}`) })),
boardLists() {
const b = board();
const ticked = new Set(Template.instance().draft.get().saleListIds);
return (b ? ReactiveCache.getLists({ boardId: b._id, archived: false }, { sort: { sort: 1 } }) || [] : [])
.map(l => ({ _id: l._id, title: l.title, checked: ticked.has(l._id) }));
},
boardLabels() {
const b = board();
const ticked = new Set(Template.instance().draft.get().categoryLabelIds);
return ((b && b.labels) || []).map(l => ({ _id: l._id, name: l.name || l.color, color: l.color, checked: ticked.has(l._id) }));
},
orderTargets: () => Template.instance().targets.get(),
isOrdersList(boardId, listId) {
const d = Template.instance().draft.get();
return d.ordersListId === listId && (d.ordersBoardId || Utils.getCurrentBoardId()) === boardId;
},
showsOnPublic: () => shop.showsShopOnPublic(board()),
// The view a visitor of this public board sees now, by its menu label.
publicViewName() {
const view = require('/models/lib/boardViewSettings').defaultBoardView(board(), 'public');
const entry = BOARD_VIEWS.find(v => v.view === view);
return entry ? t(entry.labelKey) : view;
},
draftMethods() {
return Template.instance().methods.get().map(m => ({
id: m.id, enabled: m.enabled !== false, label: methodLabel(m),
summary: m.method.iban ? formatIban(m.method.iban)
: (m.method.payee || m.method.key || m.method.vpa || m.method.address || m.method.user || m.method.url || m.method.details || ''),
}));
},
methodTypes: () => Object.keys(PAYMENT_METHODS).map(value => ({ value, label: t(METHOD_KEYS[value] || 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] || '' }));
},
error: () => Template.instance().error.get(),
saved: () => Template.instance().saved.get(),
});
Template.boardShopSettingsPopup.events({
'change .js-shop-method-type'(evt, tpl) {
tpl.methodType.set(evt.currentTarget.value);
},
'click .js-shop-method-add'(evt, tpl) {
evt.preventDefault();
const type = tpl.methodType.get();
const method = { type };
for (const name of PAYMENT_METHODS[type].fields) {
const input = tpl.find(`.js-shop-method-field[data-name="${name}"]`);
method[name] = input ? input.value : '';
}
tpl.methods.set([...tpl.methods.get(), { id: Random.id(12).replace(/[^A-Za-z0-9]/g, ''), enabled: true, method }]);
tpl.findAll('.js-shop-method-field').forEach(input => { input.value = ''; });
},
'change .js-shop-method-enabled'(evt, tpl) {
const id = evt.currentTarget.getAttribute('data-id');
tpl.methods.set(tpl.methods.get().map(m => (m.id === id ? { ...m, enabled: evt.currentTarget.checked } : m)));
},
'click .js-shop-method-remove'(evt, tpl) {
evt.preventDefault();
const id = evt.currentTarget.getAttribute('data-id');
tpl.methods.set(tpl.methods.get().filter(m => m.id !== id));
},
async 'submit .js-shop-settings'(evt, tpl) {
evt.preventDefault();
const form = evt.currentTarget;
const el = form.elements;
const ticked = name => [...form.querySelectorAll(`input[name="${name}"]:checked`)].map(i => i.value);
const [ordersBoardId, ordersListId] = String(el.orders.value || '').split('/');
const input = {
enabled: el.enabled.checked,
title: el.title.value,
intro: el.intro.value,
currency: el.currency.value,
priceFieldId: el.priceFieldId.value,
skuFieldId: el.skuFieldId.value,
stockFieldId: el.stockFieldId.value,
decrementStock: el.decrementStock.checked,
confirmationEmail: el.confirmationEmail.checked,
vatPercent: el.vatPercent.value === '' ? 0 : Number(el.vatPercent.value),
pricesIncludeVat: el.pricesIncludeVat.checked,
referenceType: el.referenceType.value,
saleListIds: ticked('saleListIds'),
categoryLabelIds: ticked('categoryLabelIds'),
ordersBoardId: ordersBoardId || '',
ordersListId: ordersListId || '',
guestCheckout: el.guestCheckout.checked,
termsUrl: el.termsUrl.value,
paymentMethods: tpl.methods.get(),
};
tpl.error.set('');
tpl.saved.set(false);
try {
const stored = await Meteor.callAsync('shopSetSettings', Utils.getCurrentBoardId(), input, el.showOnPublic.checked);
tpl.draft.set(stored);
tpl.methods.set(stored.paymentMethods.slice());
tpl.saved.set(true);
} catch (error) {
tpl.error.set(errorText(error));
}
},
});
@@ -5,7 +5,7 @@ import CardComments from '/models/cardComments';
import { Utils } from '/client/lib/utils';
import { liveAttachments } from '/models/lib/attachmentSoftDelete';
import { IMPORT_SOURCES } from '/models/lib/importSources';
import { attachmentKind } from '/models/lib/attachmentKind';
import { attachmentKind, attachmentCanPreview } from '/models/lib/attachmentKind';
import { openAttachmentSlideshow } from '/client/components/cards/attachments';
const vcs = require('/models/lib/versionControlView');
@@ -257,9 +257,8 @@ Template.versionControlView.helpers({
_id: file._id,
attachment: file,
isImage: !!kind.isImage,
// What the attachment viewer opens (cards/attachments.js attachmentCanBeOpened).
canPreview: !!(kind.isImage || kind.isPDF || kind.isText || kind.isJSON
|| kind.isOffice || kind.isZIP || kind.isVideo || kind.isAudio),
// What the attachment viewer opens (models/lib/attachmentKind.js attachmentCanPreview).
canPreview: attachmentCanPreview(file),
name: file.name,
link: typeof file.link === 'function' ? file.link() : '',
size: humanSize(file.size),
+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 });
},
});
+118 -9
View File
@@ -399,31 +399,140 @@ button.attachment-thumbnail-container.attachment-thumbnail-compact:active {
width: 100%;
height: 100%;
}
#txt-viewer {
background-color: white;
width: 100%;
height: 100%;
}
#office-viewer {
background-color: #e5e7eb;
width: 100%;
height: 100%;
overflow: hidden;
}
/* Text, Markdown, CSV, code, iCalendar, Outlook .msg, tar and OpenDocument
(client/lib/attachmentRichViewer.js), read windowed (attachmentWindow.js):
the .attachment-window scrolls, its viewport stays in view and holds only
the visible rows, and the spacer gives the scrollbar the file's length. */
#rich-viewer,
#zip-viewer {
background: white;
color: #222;
width: 100%;
height: 100%;
overflow: auto;
padding: 1em;
overflow: hidden;
box-sizing: border-box;
text-align: start;
overflow-wrap: anywhere;
display: flex;
flex-direction: column;
}
.attachment-window {
flex: 1 1 auto;
min-height: 0;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
position: relative;
}
.attachment-window-viewport {
position: sticky;
top: 0;
height: 100%;
overflow-x: auto;
overflow-y: hidden;
padding: 0 1em;
box-sizing: border-box;
}
.attachment-window-row {
height: 1.5em;
line-height: 1.5em;
white-space: pre;
overflow: hidden;
text-overflow: ellipsis;
font-family: monospace;
}
.attachment-window-list {
margin: 0;
padding-inline-start: 1.2em;
will-change: transform;
}
#rich-viewer li,
#zip-viewer li {
padding: 0.3em;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.attachment-csv-row {
display: flex;
font-family: inherit;
}
.attachment-csv-cell {
flex: 0 0 14em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border-inline-end: 1px solid #c1c7d0;
border-block-end: 1px solid #ebecf0;
padding: 0 0.5em;
box-sizing: border-box;
}
.attachment-csv-header {
position: sticky;
top: 0;
background: #f4f5f7;
font-weight: bold;
z-index: 1;
}
.attachment-preview-code .attachment-window-viewport {
background: #f6f8fa;
}
.attachment-preview-odf .attachment-window-list {
padding-inline-start: 0;
}
.attachment-preview-odf p,
.attachment-preview-odf h3 {
white-space: pre-wrap;
overflow-wrap: anywhere;
margin: 0 0 0.5em;
}
.attachment-preview-page {
border-block-start: 1px solid #c1c7d0;
padding-block-start: 0.5em;
}
.attachment-preview-field .attachment-preview-label {
display: inline-block;
min-width: 8em;
font-weight: bold;
font-family: inherit;
}
.attachment-preview-records .attachment-window-row {
font-family: inherit;
}
.attachment-preview-heading {
font-weight: bold;
}
.attachment-preview-records .attachment-preview-page {
font-weight: bold;
border-block-start: 1px solid #c1c7d0;
}
.attachment-preview-markdown {
height: 100%;
overflow: auto;
padding: 1em;
box-sizing: border-box;
}
.attachment-preview-fields {
display: grid;
grid-template-columns: max-content 1fr;
gap: 0.25em 1em;
margin: 1em;
overflow-wrap: anywhere;
}
.attachment-preview-fields dt {
font-weight: bold;
}
.attachment-preview-fields dd {
margin: 0;
}
.attachment-preview-mail-body {
flex: 1 1 auto;
min-height: 0;
border-block-start: 1px solid #c1c7d0;
}
.pdf-preview-error {
margin-top: 180px;
@@ -465,7 +574,7 @@ button.attachment-thumbnail-container.attachment-thumbnail-compact:active {
); /* Full height - height of top and bottom bars */
}
#zip-viewer,
#txt-viewer,
#rich-viewer,
#office-viewer {
width: 100%;
height: calc(
+7 -1
View File
@@ -77,11 +77,17 @@ template(name="attachmentViewer")
audio#audio-viewer.hidden(controls="true")
object#pdf-viewer.hidden(type="application/pdf")
span.pdf-preview-error {{_ 'preview-pdf-not-supported' }}
object#txt-viewer.hidden(type="text/plain")
#zip-viewer.hidden(aria-live="polite")
#office-viewer.hidden
#rich-viewer.hidden(aria-live="polite")
button.fa.fa-caret-right#next-attachment(type="button" aria-label="{{_ 'next'}}")
//- An attached Markdown file in the slideshow (client/lib/attachmentRichViewer.js):
the same +viewer as a card description, with all of its settings.
template(name="attachmentMarkdownPreview")
+viewer
= text
template(name="attachmentGallery")
.attachment-gallery
+71 -20
View File
@@ -3,7 +3,7 @@ import { trapTabKey } from '/client/lib/accessibility';
import { formatDateForDisplay } from '/client/lib/dateDisplay';
import { ReactiveCache } from '/imports/reactiveCache';
import '/client/components/cards/attachments.jade';
import { attachmentKind } from '/models/lib/attachmentKind';
import { attachmentKind, attachmentRichKind, attachmentCodeLanguage, attachmentCanPreview } from '/models/lib/attachmentKind';
import { generateUniversalAttachmentUrl } from '/models/lib/universalUrlGenerator';
import { canThumbnail, thumbnailUrl } from '/models/lib/attachmentThumbnail';
import { liveAttachments } from '/models/lib/attachmentSoftDelete';
@@ -24,6 +24,7 @@ import { EscapeActions } from '/client/lib/escapeActions';
import { openNewDrawing } from '/client/lib/newDrawing';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { ReactiveVar } from 'meteor/reactive-var';
import { Blaze } from 'meteor/blaze';
const { filesize } = require('filesize');
import prettyMilliseconds from 'pretty-ms';
@@ -41,9 +42,15 @@ let touchStartCoords = null;
let touchEndCoords = null;
let zipPreviewAbortController = null;
let zipPreview = null;
let officePreview = null;
let officePreviewAbortController = null;
let officePreviewGeneration = 0;
// Markdown, CSV, code, iCalendar, Outlook .msg, tar and OpenDocument
// (client/lib/attachmentRichViewer.js, loaded the first time one is opened).
let richPreview = null;
let richPreviewAbortController = null;
let richPreviewGeneration = 0;
Template.attachmentGallery.events({
'click .open-preview'(event) {
@@ -127,17 +134,25 @@ function attachmentCanBeOpened(attachment) {
// shared helper - which derives them from the mime type or the file name -
// rather than the raw document. Otherwise an image that renders as a
// thumbnail still refuses to open in the viewer.
const kind = attachmentKind(attachment);
return (
kind.isImage ||
kind.isPDF ||
kind.isText ||
kind.isJSON ||
kind.isOffice ||
kind.isZIP ||
kind.isVideo ||
kind.isAudio
);
return attachmentCanPreview(attachment);
}
// The rich viewer's Markdown: WeKan's own +viewer, so an attached .md follows
// every setting a card description does (code shown as text, hidden links,
// link schemes, sanitizing).
function renderAttachmentMarkdown(holder, text) {
const view = Blaze.renderWithData(Template.attachmentMarkdownPreview, { text }, holder);
return { destroy() { Blaze.remove(view); } };
}
function richPreviewLabels() {
return {
title: TAPi18n.__('title'), start: TAPi18n.__('card-start'), end: TAPi18n.__('card-end'),
due: TAPi18n.__('card-due'), description: TAPi18n.__('description'),
from: TAPi18n.__('email-view-from'), to: TAPi18n.__('email-view-to'), cc: TAPi18n.__('email-view-cc'),
subject: TAPi18n.__('email-view-subject'), date: TAPi18n.__('email-view-date'),
attachments: TAPi18n.__('attachments'), empty: TAPi18n.__('no-results'),
};
}
function getAttachmentUrl(attachment) {
@@ -156,10 +171,37 @@ function openAttachmentViewer(attachmentId) {
Instructions for adding a new viewer:
- add a new case to the switch statement below
- implement cleanup in the closeAttachmentViewer() function, if necessary
- mark attachment type as openable by adding a new condition to the attachmentCanBeOpened function
- mark attachment type as openable in attachmentCanPreview (models/lib/attachmentKind.js),
which the card, the version control view, the history table and Admin Panel / Files share
- a file that needs a library of its own goes in client/lib/attachmentRichViewer.js,
loaded only when such a file is opened
*/
const kind = attachmentKind(attachment);
// Any other text (a .txt, a .log) is read windowed as well, only what is on
// the screen (client/lib/attachmentWindow.js).
const rich = attachmentRichKind(attachment) || ((kind.isText || kind.isJSON) ? 'text' : null);
switch(true){
case (!!rich && !kind.isImage && !kind.isVideo && !kind.isAudio && !kind.isPDF): {
const generation = ++richPreviewGeneration;
const container = document.getElementById('rich-viewer');
richPreviewAbortController = new AbortController();
const { signal } = richPreviewAbortController;
container.classList.remove('hidden');
container.textContent = TAPi18n.__('loading');
import('/client/lib/attachmentRichViewer').then(({ openRichAttachment }) => openRichAttachment({
container, rich, signal, extension: kind.extension, language: attachmentCodeLanguage(attachment),
size: attachment.size, url: getAttachmentUrl(attachment), labels: richPreviewLabels(),
renderMarkdown: renderAttachmentMarkdown,
})).then(preview => {
if (generation !== richPreviewGeneration) { preview.destroy(); return; }
richPreview = preview;
}).catch(error => {
if (generation !== richPreviewGeneration || signal.aborted) return;
container.textContent = TAPi18n.__('error');
console.error('Could not preview attachment:', error);
});
break;
}
case (kind.isImage):
$("#image-viewer").attr("src", getAttachmentUrl(attachment));
// #337: the picture is named by its file for a screen reader.
@@ -188,11 +230,6 @@ function openAttachmentViewer(attachmentId) {
$("#audio-viewer").removeClass("hidden");
break;
case (kind.isText):
case (kind.isJSON):
$("#txt-viewer").attr("data", getAttachmentUrl(attachment));
$("#txt-viewer").removeClass("hidden");
break;
case (kind.isZIP): {
const container = document.getElementById('zip-viewer');
zipPreviewAbortController = new AbortController();
@@ -201,6 +238,10 @@ function openAttachmentViewer(attachmentId) {
container.textContent = TAPi18n.__('loading');
openZipAttachment({ container, signal, size: attachment.size,
url: getAttachmentUrl(attachment), emptyMessage: TAPi18n.__('no-results') })
.then(preview => {
if (signal.aborted) { preview.destroy(); return; }
zipPreview = preview;
})
.catch(error => {
if (signal.aborted) return;
container.textContent = TAPi18n.__('error');
@@ -258,8 +299,20 @@ export function openAttachmentSlideshow(attachmentId, attachmentIds = []) {
}
function closeAttachmentViewer(restoreFocus = true) {
richPreviewGeneration++;
richPreviewAbortController?.abort();
richPreviewAbortController = null;
if (richPreview) {
richPreview.destroy();
richPreview = null;
}
const richViewer = document.getElementById('rich-viewer');
richViewer?.replaceChildren();
richViewer?.classList.add('hidden');
zipPreviewAbortController?.abort();
zipPreviewAbortController = null;
zipPreview?.destroy();
zipPreview = null;
const zipViewer = document.getElementById('zip-viewer');
zipViewer?.replaceChildren();
zipViewer?.classList.add('hidden');
@@ -285,8 +338,6 @@ function closeAttachmentViewer(restoreFocus = true) {
$("#pdf-viewer").attr("data", "");
$("#pdf-viewer").addClass("hidden");
$("#txt-viewer").attr("data", "");
$("#txt-viewer").addClass("hidden");
$("#video-viewer").get(0)?.pause(); // Stop playback
if ($("#video-viewer").get(0)) $("#video-viewer").get(0).currentTime = 0;
+9 -3
View File
@@ -135,7 +135,9 @@ body.desktop-mode .card-details:not(.card-details-popup):not([style*="left"]):no
top: 8px;
inset-inline-start: auto;
inset-inline-end: 8px;
width: min(520px, 90vw);
/* #6939: the dragged width, else the Admin Panel's percentage, else 520px
(client/lib/cardDetailsWidthMemory.js sets the property). */
width: var(--wekan-card-details-width, min(520px, 90vw));
bottom: 8px;
}
@@ -564,8 +566,12 @@ body.card-window-dragging {
@media screen and (min-width: 801px) {
.card-details {
top: 97px;
inset-inline-start: calc(50% - (520px / 2)); /* #6465: narrower card (was 600px) */
width: 520px;
/* #6465: narrower card (was 600px). #6939: the remembered width, which the
card opened as a popup (Board Table view, search results, Roadmap bar)
takes too, centred and within the viewport. */
inset-inline-start: max(8px, calc(50% - (var(--wekan-card-details-width, 520px) / 2)));
width: var(--wekan-card-details-width, 520px);
max-width: calc(100vw - 16px);
bottom: 0;
position: fixed;
resize: both;
+45 -7
View File
@@ -398,6 +398,8 @@ template(name="cardFieldSectionDate")
template(name="cardFieldSectionMembers")
+cardSectionHeader(section="members" icon="fa-users" label="members")
if isSectionOpen "members"
//- The board's WIP limit per person (listFlowPolicies.jade).
+cardPersonWipWarnings(card=this)
.card-details-group-body
each field in orderedMembersFields
if $eq field "members"
@@ -548,6 +550,19 @@ template(name="cardFieldSectionCard")
a.js-add-dependency(title="{{_ 'add-dependency'}}")
i.fa.fa-plus
| {{_ 'add-dependency'}}
//- The Kanban and Scrum flow fields (docs/Features/Cards/Flow-Fields.md).
if $eq field "blocked"
if currentBoard.allowsBlockedOnCard
+cardFlowBlocked(card=this canModifyCard=canModifyCard)
if $eq field "classOfService"
if currentBoard.allowsClassOfServiceOnCard
+cardFlowClassOfService(card=this canModifyCard=canModifyCard)
if $eq field "moscow"
if currentBoard.allowsMoscowOnCard
+cardFlowMoscow(card=this canModifyCard=canModifyCard)
if $eq field "wsjf"
if currentBoard.allowsWsjfOnCard
+cardFlowWsjf(card=this canModifyCard=canModifyCard)
if $eq field "cardSortingByNumber"
if currentBoard.allowsCardSortingByNumber
.card-details-item.card-details-sort-order
@@ -624,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,
@@ -1086,6 +1101,10 @@ template(name="cardSectionHeader")
else
span.grid-icon
i.fa.fa-th-large
//- The section's ? (featureHelp.jade), at the far end of the heading and
before the hamburger, which then follows it instead of being pushed
to the end itself (cardDetails.css).
+featureHelp(id=sectionHelp)
//- A section whose settings live somewhere gets a hamburger at the far end
of its heading, like the card's own and the minicard's. `menuClass` is the
handler that opens them; the click must not reach the heading, or opening
@@ -1141,9 +1160,13 @@ template(name="cardDetailsActionsPopup")
Planning Poker, Change spent time and Card kind are in the hamburger of
their own section of the opened card, and in Card Settings' pane of that
section (docs/Features/Cards/Card-Fields.md).
//- Grouped under headings (2026-11-20): Move and copy, Watch, Appearance,
Share and history, Archive. Every entry keeps its own condition; a heading
sits inside its group's.
if currentUser
ul.pop-over-list
if cardMenuWrites
li.menu-group-heading {{_ 'menu-group-move-copy'}}
if currentUser.isBoardAdmin
li
a.js-move-card
@@ -1175,6 +1198,7 @@ template(name="cardDetailsActionsPopup")
a.js-move-card-to-bottom
i.fa.fa-arrow-down
| {{_ 'moveCardToBottom-title'}}
li.menu-group-heading {{_ 'watch'}}
li
a.js-toggle-watch-card
if isWatching
@@ -1196,6 +1220,7 @@ template(name="cardDetailsActionsPopup")
unless currentUser.isWorker
hr
ul.pop-over-list
li.menu-group-heading {{_ 'appearance'}}
li
a.js-set-card-color
i.fa.fa-paint-brush
@@ -1212,8 +1237,18 @@ template(name="cardDetailsActionsPopup")
a.js-description-action-items
i.fa.fa-tasks
| {{_ 'action-items-create'}}
//- #6939: every card opens at the width it was last dragged to; this goes
back to the default (Admin Panel / Settings / Appearance, else 520px).
Only shown when there is a dragged width to forget.
if hasCardDetailsWidth
ul.pop-over-list
li
a.js-reset-card-details-width
i.fa.fa-arrows-h
| {{_ 'card-details-reset-width'}}
hr
ul.pop-over-list
li.menu-group-heading {{_ 'menu-group-share'}}
if currentUser
//- Copy link, named - the card's header carried this as an icon with only
a tooltip. docs/Features/General/Board-Item-Links.md
@@ -1254,6 +1289,7 @@ template(name="cardDetailsActionsPopup")
if currentUser
if cardMenuWrites
unless currentUser.isWorker
li.menu-group-heading {{_ 'archives'}}
if archived
li
a.js-restore-archived-card
@@ -1269,12 +1305,14 @@ template(name="cardDetailsActionsPopup")
span.emoji-icon
i.fa.fa-link
| {{_ 'cardMorePopup-title'}}
unless canModifyCard
if boardCreationAllowed
li
a.js-create-board-from-card
i.fa.fa-external-link
| {{_ 'linkCardToNewBoard'}}
//- For every member who may write the card (cardMenuWrites, not a
Worker), as when it was added; createBoardFromCard checks the same
write access and the assigned-only scope on the server.
if boardCreationAllowed
li
a.js-create-board-from-card
i.fa.fa-external-link
| {{_ 'linkCardToNewBoard'}}
span.copied-tooltip {{_ 'copied'}}
//- #1173: the card export popup IS the shared export body - the same checkbox
+30 -2
View File
@@ -22,11 +22,13 @@ import {
import { canArchiveCard } from '/client/lib/archivePermission';
import { isTextSelectionInsideCard } from '/client/lib/cardCloseGuard';
import { placeCardDetailsX, MARGIN } from '/client/lib/cardDetailsPlacement';
import { rememberCardDetailsWidth, hasCardDetailsWidth, resetCardDetailsWidth } from '/client/lib/cardDetailsWidthMemory';
import { dueFromTitle } from '/client/components/forms/titleDueHint';
import { riskOf } from '/client/lib/cardRiskOf';
import Rules from '/models/rules';
import { suggestedMembersFor } from '/client/lib/suggestedMembers';
import '/client/components/cards/similarCards';
import { webhooksOff } from '/client/lib/webhooksSwitch';
// Which dependency the icon picker should apply its choice to. The icon popup's
// own data context is the dependency row (not the source card), so we capture
@@ -51,6 +53,7 @@ import { CARD_RECURRENCE_INTERVALS } from '/models/lib/cardRecurrenceSchedule';
import { isHexColor, isAllowedCardColor, toHex, contrastText, customColorsInUse } from '/models/lib/contrastColor';
import { uniqBy } from '/imports/lib/collectionHelpers';
import { memberTargetBoardId } from '/models/lib/linkedCardMembers';
import { cardSectionHelpId } from '/models/lib/featureHelp';
import { isSubmitKey } from '/models/lib/editorSubmitKey';
import { Filter } from '/client/lib/filter';
import { BoardSwimlaneListCardDialog } from '/client/lib/dialogWithBoardSwimlaneListCard';
@@ -528,6 +531,8 @@ Template.cardDetails.onRendered(function () {
if ($cardDetails.length) {
Tracker.afterFlush(() => {
const element = $cardDetails.get(0);
// #6939: a drag of the resize handle is remembered for the next card.
rememberCardDetailsWidth(element);
try {
anchorCardDetailsX(element);
} finally {
@@ -556,7 +561,8 @@ Template.cardDetails.onRendered(function () {
url: '',
};
const integrations = ReactiveCache.getIntegrations({
// None while all webhooks are turned off (the server sends nothing anyway).
const integrations = webhooksOff() ? [] : ReactiveCache.getIntegrations({
boardId: { $in: [card.boardId, Integrations.Const.GLOBAL_WEBHOOK_ID] },
enabled: true,
activities: { $in: ['CardDetailsRendered', 'all'] },
@@ -933,6 +939,9 @@ function cardSectionHasContent(card, board, id) {
case 'card': {
const swimlane = typeof card?.swimlane === 'function' ? card.swimlane() : null;
return Boolean(board.allowsDependencies || board.allowsCardSortingByNumber || board.allowsShowLists
// The flow fields (models/lib/cardFlow.js).
|| board.allowsBlockedOnCard || board.allowsClassOfServiceOnCard || board.allowsMoscowOnCard
|| board.allowsWsjfOnCard
|| (board.allowsSwimlaneNameOnCard && swimlane && swimlane.title)
|| (board.allowsCardButtonsOnCard !== false && cardHasButtons(card)));
}
@@ -1151,6 +1160,14 @@ Template.registerHelper('attachmentCount', function attachmentCount() {
Template.registerHelper('sectionCaret', section =>
caretClassFor(isCardSectionOpen(section)));
// The section's ? (docs/Features/General/Help-Button.md): which help it shows
// is models/lib/featureHelp.js CARD_SECTION_HELP.
Template.cardSectionHeader.helpers({
sectionHelp() {
return cardSectionHelpId(this.section);
},
});
Template.cardSectionHeader.events({
// A hamburger at the end of a heading opens that section's settings. Neither
// may reach the heading itself: a click there folds the section, so opening
@@ -1915,6 +1932,10 @@ Template.inlinedCardDescription.events({
});
Template.cardDetailsActionsPopup.helpers({
// #6939: "Reset width" is offered when there is a dragged width to forget.
hasCardDetailsWidth() {
return hasCardDetailsWidth();
},
// The moving and copying items: for who may change the card, and - as they
// always were - for a member who is not read-only.
cardMenuWrites() {
@@ -1966,6 +1987,11 @@ Template.cardSpentTimeMenu.events({
});
Template.cardDetailsActionsPopup.events({
'click .js-reset-card-details-width'(event) {
event.preventDefault();
resetCardDetailsWidth();
Popup.back();
},
// docs/Features/Cards/Action-Items.md: the description's action items.
'click .js-description-action-items': Popup.open('actionItems', { titleKey: 'action-items' }),
// History.md §7a: adding History to a menu is a menu item and this handler,
@@ -3362,7 +3388,9 @@ EscapeActions.register(
: null,
getCardDetailsElement(getCurrentCardFromContext()?._id),
);
if (Session.get('cardDetailsIsDragging') || selectingInsideCard) {
// #6939: a resize of the window by its corner handle ends outside the card
// whenever it made it wider (client/lib/cardDetailsWidthMemory.js).
if (Session.get('cardDetailsIsDragging') || Session.get('cardDetailsIsResizing') || selectingInsideCard) {
// Reset dragging status as the mouse landed outside the cardDetails template area and this will prevent a mousedown event from firing
Session.set('cardDetailsIsDragging', false);
Session.set('cardDetailsIsMouseDown', false);
+69
View File
@@ -0,0 +1,69 @@
/* The Kanban and Scrum flow fields (docs/Features/Cards/Flow-Fields.md). */
/* Blocked is a labelled native checkbox; the app-wide material form rule hides
native checkboxes three ways (display, visibility, an offset), so all three
are undone, as in scrumView.css. */
.card-flow-blocked-toggle 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;
padding: 0;
vertical-align: middle;
}
.card-details-item-flow-blocked.is-blocked .card-details-item-title,
.card-flow-blocked-text {
color: #c0392b;
}
.card-details-item-flow-blocked .js-card-flow-blocked-reason {
display: block;
width: 100%;
margin-top: 4px;
}
.card-flow-blocked-since {
font-size: 0.85em;
}
.card-flow-wsjf-score {
margin-inline-start: 6px;
font-weight: bold;
}
.card-flow-wsjf-parts {
display: flex;
flex-wrap: wrap;
gap: 4px 12px;
}
.card-flow-wsjf-part {
display: inline-flex;
align-items: center;
gap: 4px;
}
.minicard .badges .minicard-flow-blocked {
color: #fff;
background: #c0392b;
border-radius: 3px;
padding: 0 4px;
}
.minicard .badges .minicard-flow-class.flow-class-expedite {
color: #fff;
background: #d35400;
border-radius: 3px;
padding: 0 4px;
}
.minicard .badges .minicard-flow-class.flow-class-fixed-date {
color: #8e44ad;
}
.minicard .badges .minicard-flow-moscow {
border: 1px solid currentColor;
border-radius: 3px;
padding: 0 4px;
}
.minicard .badges .minicard-flow-moscow.flow-moscow-must {
color: #c0392b;
}
.minicard .badges .minicard-flow-moscow.flow-moscow-wont {
color: #7f8c8d;
}
+66
View File
@@ -0,0 +1,66 @@
//- The Kanban and Scrum flow fields of the opened card (models/lib/cardFlow.js,
docs/Features/Cards/Flow-Fields.md): each a row of Board Settings / Card,
drawn in the Card section. Saved through the setCardFlow method.
template(name="cardFlowBlocked")
with flowOf card
.card-details-item.card-details-item-flow-blocked(class="{{#if blocked}}is-blocked{{/if}}")
h3.card-details-item-title
i.fa.fa-ban
| {{_ 'card-blocked'}}
if ../canModifyCard
label.card-flow-blocked-toggle
input.js-card-flow-blocked(type="checkbox" checked=blocked)
| {{_ 'card-blocked'}}
if blocked
input.js-card-flow-blocked-reason(type="text" maxlength="1000" value=blockedReason placeholder="{{_ 'card-blocked-reason'}}")
else
if blocked
span.card-flow-blocked-text {{_ 'card-blocked'}}{{#if blockedReason}}: {{blockedReason}}{{/if}}
if blocked
if blockedAt
.card-flow-blocked-since.quiet {{_ 'card-blocked-since' date=(flowDate blockedAt) user=(flowUser blockedBy)}}
template(name="cardFlowClassOfService")
with flowOf card
.card-details-item.card-details-item-flow-class
h3.card-details-item-title
i.fa.fa-road
| {{_ 'class-of-service'}}
if ../canModifyCard
select.js-card-flow-class
each option in classOptions
option(value=option.value selected=option.selected) {{#if option.labelKey}}{{_ option.labelKey}}{{else}}-{{/if}}
else
span.card-flow-value {{#if classLabelKey}}{{_ classLabelKey}}{{else}}-{{/if}}
template(name="cardFlowMoscow")
with flowOf card
.card-details-item.card-details-item-flow-moscow
h3.card-details-item-title
i.fa.fa-sort-amount-desc
| {{_ 'moscow-priority'}}
if ../canModifyCard
select.js-card-flow-moscow
each option in moscowOptions
option(value=option.value selected=option.selected) {{#if option.labelKey}}{{_ option.labelKey}}{{else}}-{{/if}}
else
span.card-flow-value {{#if moscowLabelKey}}{{_ moscowLabelKey}}{{else}}-{{/if}}
template(name="cardFlowWsjf")
with flowOf card
.card-details-item.card-details-item-flow-wsjf
h3.card-details-item-title
i.fa.fa-balance-scale
| {{_ 'wsjf-score'}}
if wsjfScore
span.card-flow-wsjf-score {{wsjfScore}}
.card-flow-wsjf-parts
each part in wsjfParts
label.card-flow-wsjf-part
span {{_ part.labelKey}}
if ../canModifyCard
select.js-card-flow-wsjf(data-part=part.key)
each option in part.options
option(value=option.value selected=option.selected) {{option.text}}
else
span.card-flow-value {{#if part.value}}{{part.value}}{{else}}-{{/if}}
+87
View File
@@ -0,0 +1,87 @@
// The Kanban and Scrum flow fields of a card (models/lib/cardFlow.js,
// docs/Features/Cards/Flow-Fields.md): the opened card's rows and the
// minicard's `cardFlowOf` helper. Every change goes through setCardFlow, which
// checks the card edit right and the Expedite limit on the server.
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
const { flowView, CLASSES_OF_SERVICE, MOSCOW, WSJF_PARTS, WSJF_SCALE, CLASS_LABEL, MOSCOW_LABEL } = require('/models/lib/cardFlow');
const WSJF_LABEL = { businessValue: 'wsjf-business-value', timeCriticality: 'wsjf-time-criticality',
riskReduction: 'wsjf-risk-reduction', jobSize: 'wsjf-job-size' };
// A linked card shows its source's flow, as the server writes it.
function sourceOf(card) {
if (card && typeof card.isLinkedCard === 'function' && card.isLinkedCard()) {
return ReactiveCache.getCard(card.linkedId) || card;
}
return card;
}
Template.registerHelper('cardFlowOf', card => {
const view = flowView(sourceOf(card));
return view.blocked || view.classOfService || view.moscow || view.wsjfScore ? view : null;
});
function choices(values, labels, chosen) {
return [{ value: '', labelKey: null, selected: !chosen },
...values.map(value => ({ value, labelKey: labels[value], selected: value === chosen }))];
}
function save(card, patch) {
Meteor.callAsync('setCardFlow', card._id, patch).catch(error => {
if (error && error.error === 'expedite-limit') window.alert(TAPi18n.__('expedite-limit'));
else window.alert((error && (error.reason || error.error)) || String(error));
});
}
const helpers = {
flowOf(card) { return flowView(sourceOf(card)); },
flowDate(date) { return date ? new Date(date).toLocaleString() : ''; },
flowUser(userId) {
const user = userId && ReactiveCache.getUser(userId);
return (user && (user.profile?.fullname || user.username)) || '-';
},
// Each select's options, the empty one ("-") first, with which is chosen.
classOptions() { return choices(CLASSES_OF_SERVICE, CLASS_LABEL, this.classOfService); },
moscowOptions() { return choices(MOSCOW, MOSCOW_LABEL, this.moscow); },
wsjfParts() {
const wsjf = this.wsjf || {};
return WSJF_PARTS.map(key => {
const value = WSJF_SCALE.includes(wsjf[key]) ? wsjf[key] : null;
return { key, labelKey: WSJF_LABEL[key], value,
options: [{ value: '', text: '-', selected: value === null },
...WSJF_SCALE.map(n => ({ value: String(n), text: String(n), selected: n === value }))] };
});
},
};
['cardFlowBlocked', 'cardFlowClassOfService', 'cardFlowMoscow', 'cardFlowWsjf'].forEach(name => {
Template[name].helpers(helpers);
});
Template.cardFlowBlocked.events({
'change .js-card-flow-blocked'(event, tpl) {
save(tpl.data.card, { blocked: event.currentTarget.checked });
},
'change .js-card-flow-blocked-reason'(event, tpl) {
save(tpl.data.card, { blockedReason: event.currentTarget.value });
},
});
Template.cardFlowClassOfService.events({
'change .js-card-flow-class'(event, tpl) {
save(tpl.data.card, { classOfService: event.currentTarget.value });
},
});
Template.cardFlowMoscow.events({
'change .js-card-flow-moscow'(event, tpl) {
save(tpl.data.card, { moscow: event.currentTarget.value });
},
});
Template.cardFlowWsjf.events({
'change .js-card-flow-wsjf'(event, tpl) {
const value = event.currentTarget.value;
save(tpl.data.card, { wsjf: { [event.currentTarget.dataset.part]: value === '' ? null : Number(value) } });
},
});
+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)));
},
});
+34
View File
@@ -17,6 +17,7 @@ template(name="minicard")
class="{{#if minicardCollapsed}}minicard-collapsed{{/if}}"
class="{{#if hasUnreadComments}}minicard-unread-comments{{/if}}"
class="{{#if hasUnreadChanges}}minicard-unread-changes{{/if}}"
class="{{#if splitDoneHere}}minicard-split-done{{/if}}"
title="{{#if hasUnreadComments}}{{_ 'card-has-unread-comments'}}{{else}}{{#if hasUnreadChanges}}{{_ 'card-has-unread-changes'}}{{/if}}{{/if}}"
style="{{#if showCardColorOnMinicard}}{{colorStyle}}{{/if}}")
if canMoveCard
@@ -30,6 +31,8 @@ template(name="minicard")
if canModifyCard
a.minicard-details-menu-with-handle.js-open-minicard-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
i.fa.fa-bars
//- Done here, in a list split into Doing and Done (listFlowPolicies.jade).
+minicardSplitDone
if showDependencyConnectHandle
a.dependency-connect-handle.js-dependency-connect-handle(title="{{_ 'drag-to-connect'}}")
i.fa.fa-dot-circle-o
@@ -211,6 +214,37 @@ template(name="minicard")
span.badge-icon(style="color:{{dependencyBadge.color}}")
i.fa(class="fa-{{dependencyBadge.icon}}")
span.badge-text {{ dependencyBadge.count }}
//- The flow fields, Show on Minicard (docs/Features/Cards/Flow-Fields.md).
if $eq field "blocked"
if currentBoard.allowsBlockedOnMinicard
with cardFlowOf this
if blocked
.badge.minicard-flow-blocked.js-minicard-flow-blocked(title="{{_ 'card-blocked'}}{{#if blockedReason}}: {{blockedReason}}{{/if}}")
span.badge-icon
i.fa.fa-ban
span.badge-text {{_ 'card-blocked'}}
if $eq field "classOfService"
if currentBoard.allowsClassOfServiceOnMinicard
with cardFlowOf this
if classOfService
.badge.minicard-flow-class(class="flow-class-{{classOfService}}" title="{{_ 'class-of-service'}}: {{_ classLabelKey}}")
span.badge-icon
i.fa.fa-road
span.badge-text {{_ classLabelKey}}
if $eq field "moscow"
if currentBoard.allowsMoscowOnMinicard
with cardFlowOf this
if moscow
.badge.minicard-flow-moscow(class="flow-moscow-{{moscow}}" title="{{_ 'moscow-priority'}}: {{_ moscowLabelKey}}")
span.badge-text {{_ moscowLabelKey}}
if $eq field "wsjf"
if currentBoard.allowsWsjfOnMinicard
with cardFlowOf this
if wsjfScore
.badge.minicard-flow-wsjf(title="{{_ 'wsjf-score'}}")
span.badge-icon
i.fa.fa-balance-scale
span.badge-text {{wsjfScore}}
if $eq field "stickers"
if showStickersOnMinicard
if stickers.length
+6
View File
@@ -180,6 +180,12 @@ Template.minicard.helpers({
// #3984: visual card aging — fade cards that have not been touched recently,
// based on dateLastActivity, when the board has card aging enabled.
// docs/Features/Cards/At-Risk.md
// Done here in a list split into Doing and Done (models/lib/boardFlowPolicies.js).
splitDoneHere() {
const { splitShown } = require('/client/components/lists/listFlowPolicies');
return splitShown(ReactiveCache.getBoard(this.boardId), ReactiveCache.getList(this.listId))
&& require('/models/lib/boardFlowPolicies').isSplitDone(this);
},
atRisk() {
return riskOf(this);
},
+118
View File
@@ -0,0 +1,118 @@
/* 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"] {
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;
}
/* Support tickets: the support board's Open / In progress / Done lists, side
by side as Board View / Lists draws a board, wrapping on a narrow screen. */
.cloud-ticket-columns {
display: flex;
flex-wrap: wrap;
gap: 0.8em;
align-items: flex-start;
margin-block: 0.8em;
}
.cloud-ticket-column {
flex: 1 1 14em;
min-width: 0;
max-width: 24em;
background: #e8e8e8;
border-radius: 4px;
padding: 0.5em;
}
.cloud-ticket-column-title {
font-size: 1em;
margin: 0 0 0.5em;
}
.cloud-ticket {
background: #fff;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
padding: 0.5em;
margin-block-end: 0.5em;
overflow-wrap: anywhere;
}
.cloud-ticket-title {
font-weight: bold;
}
.cloud-ticket-description {
white-space: pre-wrap;
margin-block: 0.3em;
}
.cloud-info th {
text-align: start;
padding-inline-end: 1em;
}
+354
View File
@@ -0,0 +1,354 @@
//- Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md): only where the server
has the CLOUD environment variable, at that address. Admin Panel / Cloud is the
Cloud Admins' Domains, Invoices, Tickets, Chat, Cloudflare, Caddy and Allowed
addresses; /cloud is a customer's own domain, Invoices, Tickets 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-admin-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 'allowed-addresses'
+cloudPanelAllowedAddresses(config=config reload=reload)
else if $eq pane 'domains'
+cloudPanelDomains
else if $eq pane 'info'
+cloudPanelInfo(domains=info.domains)
else if $eq pane 'invoices'
+cloudPanelInvoices(domains=info.domains isCloudAdmin=info.isCloudAdmin)
else if $eq pane 'tickets'
+cloudPanelTickets(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 boardPath
p
a.js-cloud-support-board(href=boardPath) {{_ 'cloud-support-board-open'}}
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}}
//- Admin Panel / Cloud / Allowed addresses (models/lib/cloudAddresses.js): the
server refuses a list without the Cloud Admin's own address, and the page
says so before it is sent.
template(name="cloudPanelAllowedAddresses")
form.js-cloud-addresses.cloud-form
p.quiet {{_ 'cloud-allowed-addresses-desc'}}
label(for="cloud-addresses") {{_ 'cloud-allowed-addresses'}}
textarea#cloud-addresses.js-cloud-addresses-text(name="addresses" rows="6" maxlength="12000" placeholder="203.0.113.0/24, 2001:db8::/32") {{addressesText}}
p.quiet.js-cloud-your-address {{_ 'cloud-allowed-addresses-yours' address=config.yourAddress}}
if lockout
.warning.js-cloud-addresses-lockout {{_ 'cloud-allowed-addresses-lockout' address=config.yourAddress}}
button.primary(type="submit") {{_ 'save'}}
if saved
span.quiet {{_ 'cloud-saved'}}
//- A customer's own domain: what the hosting is.
template(name="cloudPanelInfo")
each domain in domains
table.cloud-info
tbody
tr
th {{_ 'domain'}}
td {{domain.domain}}
tr
th {{_ 'cloud-customer-name'}}
td {{domain.customerName}}
tr
th {{_ 'cloud-start-date'}}
td {{domain.startDate}}
tr
th {{_ 'cloud-end-date'}}
td {{domain.endDate}}
tr
th {{_ 'cloud-panel-mode'}}
td
if $eq domain.mode 'shared'
| {{_ 'cloud-panel-mode-shared'}}
else
| {{_ 'cloud-panel-mode-own'}}
//- Support tickets: the cards of the domain's support board, in its Open, In
progress and Done lists, drawn the way Board View / Lists draws a board.
template(name="cloudPanelTickets")
.cloud-tickets
label(for="cloud-tickets-domain") {{_ 'domain'}}
select#cloud-tickets-domain.js-cloud-tickets-domain
each domain in ticketDomains
option(value=domain._id selected="{{#if $eq domain._id domainId}}selected{{/if}}") {{domain.domain}}
if board
.cloud-ticket-columns
each column in board.columns
.cloud-ticket-column(class="cloud-ticket-{{column.key}}" data-state=column.key)
h3.cloud-ticket-column-title {{columnTitle column.key}}
each card in column.cards
.cloud-ticket
.cloud-ticket-title {{card.title}}
if card.description
.cloud-ticket-description {{card.description}}
.quiet {{card.author}} · {{when card.createdAt}}
if isCloudAdmin
select.js-cloud-ticket-move(data-id=card._id aria-label="{{_ 'tickets'}}")
each state in states
option(value=state selected="{{#if $eq state column.key}}selected{{/if}}") {{columnTitle state}}
form.js-cloud-ticket-add.cloud-form
label(for="cloud-ticket-title") {{_ 'title'}}
input#cloud-ticket-title(type="text" name="title" maxlength="500" required)
label(for="cloud-ticket-description") {{_ 'description'}}
textarea#cloud-ticket-description(name="description" maxlength="20000" rows="3")
button.primary(type="submit") {{_ 'cloud-ticket-add'}}
p
a.js-cloud-support-board(href=boardPath) {{_ 'cloud-support-board-open'}}
+580
View File
@@ -0,0 +1,580 @@
// 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 { Session } from 'meteor/session';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
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');
const { TICKET_STATES, SUPPORT_LISTS } = require('/models/lib/cloudPanel');
const { normalizeAllowedAddresses, addressAllowed } = require('/models/lib/cloudAddresses');
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
// Admin Panel / Cloud, for a Cloud Admin; /cloud shows a customer their own.
const ADMIN_MENU = [
{ id: 'domains', icon: 'fa-globe', labelKey: 'domains' },
{ id: 'invoices', icon: 'fa-file-text-o', labelKey: 'billing-invoices' },
{ id: 'tickets', icon: 'fa-ticket', labelKey: 'tickets' },
{ id: 'chat', icon: 'fa-comments', labelKey: 'board-view-chat' },
{ id: 'cloudflare', icon: 'fa-cloud', label: 'Cloudflare' },
{ id: 'caddy', icon: 'fa-server', label: 'Caddy' },
{ id: 'allowed-addresses', icon: 'fa-shield', labelKey: 'cloud-allowed-addresses' },
];
const CUSTOMER_MENU = [
{ id: 'info', icon: 'fa-info-circle', labelKey: 'info' },
...ADMIN_MENU.filter(item => ['invoices', 'tickets', 'chat'].includes(item.id)),
];
function menu(info) {
return info.isCloudAdmin ? ADMIN_MENU : CUSTOMER_MENU;
}
// The pane to show: on Admin Panel / Cloud the one its address names, on
// /cloud the one last clicked; one the menu does not have opens the first.
function currentPane(tpl) {
const items = menu(tpl.info.get());
const wanted = FlowRouter.getRouteName() === 'cloud-admin' ? Session.get('cloudOpenPane') : tpl.pane.get();
return items.some(item => item.id === wanted) ? wanted : items[0].id;
}
// Every domain, for a Cloud Admin's pickers: the table's pages, one by one.
function allDomains() {
return 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 => pages.flat());
}
function boardPathOf(board) {
return board && board.boardId ? `/b/${board.boardId}/${board.boardSlug || 'board'}` : '';
}
Template.cloudPanel.onCreated(function () {
this.loading = new ReactiveVar(true);
this.info = new ReactiveVar({ enabled: false, 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);
return info.isCloudAdmin ? this.loadConfig() : null;
})
.catch(error => panelError.set(errorText(error)))
.finally(() => this.loading.set(false));
});
Template.cloudPanel.helpers({
loading: () => Template.instance().loading.get(),
info: () => Template.instance().info.get(),
config: () => Template.instance().config.get(),
pane: () => currentPane(Template.instance()),
actionError: () => panelError.get(),
// No CLOUD on this server, not at its address, or neither a Cloud Admin
// nor a customer here.
notAllowed() {
const info = Template.instance().info.get();
return !info.enabled || !info.onCloudHost || !(info.isCloudAdmin || info.domains.length > 0);
},
menuItems() {
const tpl = Template.instance();
return leftMenuData(menu(tpl.info.get()), currentPane(tpl), 'js-cloud-menu');
},
paneTitleData() {
const tpl = Template.instance();
return paneTitle(menu(tpl.info.get()), currentPane(tpl));
},
reload() {
const tpl = Template.instance();
return () => tpl.loadConfig();
},
});
Template.cloudPanel.events({
'click a.js-cloud-menu'(event, tpl) {
event.preventDefault();
panelError.set('');
const id = event.currentTarget.getAttribute('data-id');
if (FlowRouter.getRouteName() === 'cloud-admin') FlowRouter.go(`/admin/cloud/${id}`);
else tpl.pane.set(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) allDomains().then(domains => this.allDomains.set(domains));
});
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.boardPath = new ReactiveVar('');
this.load = () => {
const id = this.domainId.get();
if (!id) return Promise.resolve();
return Meteor.callAsync('cloudPanelChat', id).then(messages => this.messages.set(messages));
};
// The support board itself, to open in Board View / Chat.
this.autorun(() => {
const id = this.domainId.get();
if (!id) return;
Meteor.callAsync('cloudPanelTickets', id).then(board => this.boardPath.set(boardPathOf(board))).catch(() => this.boardPath.set(''));
});
if (Template.currentData().isCloudAdmin) {
allDomains().then(domains => {
this.domains.set(domains);
if (!this.domainId.get() && domains[0]) this.domainId.set(domains[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(),
boardPath: () => Template.instance().boardPath.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);
},
});
// ---------------------------------------------------------------- Tickets
Template.cloudPanelTickets.onCreated(function () {
this.domains = new ReactiveVar(Template.currentData().domains || []);
this.domainId = new ReactiveVar((this.domains.get()[0] || {})._id || '');
this.board = new ReactiveVar(null);
this.load = () => {
const id = this.domainId.get();
if (!id) return Promise.resolve();
return report(Meteor.callAsync('cloudPanelTickets', id).then(board => this.board.set(board)));
};
if (Template.currentData().isCloudAdmin) {
allDomains().then(domains => {
this.domains.set(domains);
if (!this.domainId.get() && domains[0]) this.domainId.set(domains[0]._id);
return this.load();
});
} else {
this.load();
}
this.poll = Meteor.setInterval(() => this.load(), 30000);
});
Template.cloudPanelTickets.onDestroyed(function () {
Meteor.clearInterval(this.poll);
});
const COLUMN_KEYS = Object.fromEntries(SUPPORT_LISTS.map(list => [list.key, list.titleKey]));
Template.cloudPanelTickets.helpers({
ticketDomains: () => Template.instance().domains.get(),
domainId: () => Template.instance().domainId.get(),
board: () => Template.instance().board.get(),
states: () => TICKET_STATES,
columnTitle: key => TAPi18n.__(COLUMN_KEYS[key] || key),
boardPath: () => boardPathOf(Template.instance().board.get()),
when: at => (at ? new Date(at).toLocaleString(language()) : ''),
});
Template.cloudPanelTickets.events({
'change .js-cloud-tickets-domain'(event, tpl) {
tpl.domainId.set(event.currentTarget.value);
tpl.board.set(null);
tpl.load();
},
'submit .js-cloud-ticket-add'(event, tpl) {
event.preventDefault();
const form = event.currentTarget;
report(Meteor.callAsync('cloudPanelAddTicket', tpl.domainId.get(), { title: field(form, 'title'), description: field(form, 'description') })
.then(() => { form.reset(); return tpl.load(); }));
},
'change .js-cloud-ticket-move'(event, tpl) {
report(Meteor.callAsync('cloudPanelMoveTicket', tpl.domainId.get(), event.currentTarget.getAttribute('data-id'), event.currentTarget.value)
.then(() => tpl.load()));
},
});
// ---------------------------------------------------------------- Allowed addresses
Template.cloudPanelAllowedAddresses.onCreated(function () {
this.text = new ReactiveVar(null);
this.saved = new ReactiveVar(false);
});
// Would this list lock the Cloud Admin out? The same rule the server applies
// when it refuses to save it.
function locksOut(text, yourAddress) {
let list;
try { list = normalizeAllowedAddresses(text); } catch (e) { return false; }
return list.length > 0 && !addressAllowed(yourAddress, list);
}
Template.cloudPanelAllowedAddresses.helpers({
addressesText() {
const config = Template.currentData().config;
return ((config && config.allowedAddresses) || []).join('\n');
},
lockout() {
const tpl = Template.instance();
const config = Template.currentData().config || {};
const text = tpl.text.get();
return text !== null && locksOut(text, config.yourAddress);
},
saved: () => Template.instance().saved.get(),
});
Template.cloudPanelAllowedAddresses.events({
'input .js-cloud-addresses-text'(event, tpl) {
tpl.saved.set(false);
tpl.text.set(event.currentTarget.value);
},
'submit .js-cloud-addresses'(event, tpl) {
event.preventDefault();
const form = event.currentTarget;
const { reload } = Template.currentData();
tpl.saved.set(false);
report(Meteor.callAsync('cloudPanelSetAllowedAddresses', form.elements.addresses.value)
.then(() => { tpl.saved.set(true); tpl.text.set(null); return reload(); }));
},
});
+2 -4
View File
@@ -9,7 +9,7 @@ import { Meteor } from 'meteor/meteor';
// caught that; the build did, first time.
import { formatDateTime } from '/imports/lib/dateUtils';
import { ReactiveCache } from '/imports/reactiveCache';
import { attachmentKind } from '/models/lib/attachmentKind';
import { attachmentCanPreview } from '/models/lib/attachmentKind';
import { historyRowOffersRestore } from '/models/lib/attachmentSoftDelete';
import { openAttachmentSlideshow } from '/client/components/cards/attachments';
@@ -157,13 +157,11 @@ function attachmentForRow(row) {
if (!row || row.entityType !== 'attachment') return null;
const attachment = ReactiveCache.getAttachment(row.entityId);
if (!attachment) return null;
const kind = attachmentKind(attachment);
return {
_id: attachment._id,
name: attachment.name,
link: typeof attachment.link === 'function' ? attachment.link() : '',
canPreview: !!(kind.isImage || kind.isPDF || kind.isText || kind.isJSON
|| kind.isOffice || kind.isVideo || kind.isAudio),
canPreview: attachmentCanPreview(attachment),
isDeleted: historyRowOffersRestore(row, attachment),
};
}
+18 -4
View File
@@ -9,7 +9,7 @@
import { ReactiveVar } from 'meteor/reactive-var';
import { TAPi18n } from '/imports/i18n';
import { CSV_IMPORT_FIELDS, csvSeparatorOf, normalizeHeader } from '/models/lib/csvImportMapping';
import { csvGetMembersToMap } from './csvMembersMapper';
import { csvGetMembersToMap, csvMembersFromNames } from './csvMembersMapper';
const Papa = require('papaparse');
@@ -28,7 +28,7 @@ export function parseCsvImportText(text) {
// `excelBase64` for a workbook (read on the server, which answers with the
// first board sheet's header and the sheets it found). `membersStep`: the
// "map members" step follows this one.
export async function startCsvMapping(importTpl, { rows, excelBase64, membersStep = false }) {
export async function startCsvMapping(importTpl, { rows, excelBase64, uploadId, membersStep = false }) {
activeImportTpl = importTpl;
if (!importTpl.csvMappingState) importTpl.csvMappingState = new ReactiveVar(null);
importTpl.csvMapping = null;
@@ -40,6 +40,9 @@ export async function startCsvMapping(importTpl, { rows, excelBase64, membersSte
let preview;
if (excelBase64) {
preview = await Meteor.callAsync('excelImportPreview', excelBase64);
} else if (uploadId) {
// A file streamed to the server's disk (server/lib/importUpload.js).
preview = await Meteor.callAsync('csvUploadPreview', uploadId);
} else {
const header = (rows && rows[0]) || [];
preview = {
@@ -52,7 +55,9 @@ export async function startCsvMapping(importTpl, { rows, excelBase64, membersSte
}
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({
@@ -62,6 +67,7 @@ export async function startCsvMapping(importTpl, { rows, excelBase64, membersSte
boards: preview.boards || [],
skipped: preview.skipped || [],
rows: rows || null,
uploadId: uploadId || null,
membersStep,
mapping,
});
@@ -201,7 +207,15 @@ Template.importCsvMapping.events({
...(chosen.columns.list === undefined ? { listName } : {}),
};
const state = tpl.state();
// The people to map are the ones in the columns chosen for people.
// The people to map are the ones in the columns chosen for people - read
// by the server from an uploaded file.
if (state.uploadId && state.membersStep) {
Meteor.callAsync('csvUploadPeople', state.uploadId, chosen.columns).then(names => {
importTpl.membersToMap.set(csvMembersFromNames(names || []));
importTpl.nextStep();
}, error => tpl.mappingError.set((error && error.error) || 'error-csv-schema'));
return;
}
if (state.rows && state.membersStep) {
importTpl.membersToMap.set(csvGetMembersToMap(state.rows, chosen.columns));
}
+15 -51
View File
@@ -1,54 +1,18 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { splitByField, splitPeople } from '/models/lib/csvImportMapping';
import { csvPeopleNames } from '/models/lib/csvPeople';
// The usernames to map. Without `columns`, the ones in a column named
// "Members"; with the columns the mapping step chose, the ones in every
// people column: owner, members, assignees, requested by and assigned by.
export function csvGetMembersToMap(data, columns) {
// we will work on the list itself (an ordered array of objects) when a
// mapping is done, we add a 'wekan' field to the object representing the
// imported member
const membersToMap = [];
const importedMembers = [];
const peopleColumns = [];
if (columns) {
['owner', 'members', 'assignees'].forEach(field => {
if (columns[field] !== undefined) peopleColumns.push({ index: columns[field], split: splitPeople });
});
['requestedBy', 'assignedBy'].forEach(field => {
if (columns[field] !== undefined) peopleColumns.push({ index: columns[field], split: splitByField });
});
} else {
for (let i = 0; i < data[0].length; i++) {
if (String(data[0][i] || '').toLowerCase() === 'members') {
peopleColumns.push({ index: i, split: cell => String(cell).split(' ') });
}
}
}
for (let i = 1; i < data.length; i++) {
for (const { index, split } of peopleColumns) {
if (data[i][index]) {
for (const importedMember of split(data[i][index])) {
if (importedMember && importedMembers.indexOf(importedMember) === -1) {
importedMembers.push(importedMember);
}
}
}
}
}
for (let importedMember of importedMembers) {
importedMember = {
username: importedMember,
id: importedMember,
};
const wekanUser = ReactiveCache.getUser({ username: importedMember.username });
if (wekanUser) importedMember.wekanId = wekanUser._id;
membersToMap.push(importedMember);
}
return membersToMap;
// The people to map, each matched to a WeKan user of the same username when
// there is one. `rows` are the file's rows, or `names` the usernames the
// server read from an uploaded file (csvUploadPeople).
export function csvMembersFromNames(names) {
return names.map(username => {
const member = { username, id: username };
const wekanUser = ReactiveCache.getUser({ username });
if (wekanUser) member.wekanId = wekanUser._id;
return member;
});
}
export function csvGetMembersToMap(data, columns) {
return csvMembersFromNames(csvPeopleNames(data, columns));
}
+15
View File
@@ -280,3 +280,18 @@ a.show-mapping {
.import-report-row {
overflow-wrap: anywhere;
}
/* The Import page's sources by kind (models/lib/toolGroups.js). */
.import-source-list .import-source-group {
margin-top: 0.8em;
font-weight: bold;
font-size: 0.85em;
text-transform: uppercase;
letter-spacing: 0.04em;
/* #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;
}
+2
View File
@@ -39,6 +39,8 @@ template(name="import")
h2 {{_ 'import-source-heading'}}
ul.import-source-list
each importSources
if groupHeading
li.import-source-group {{groupHeading}}
li
//- The same green tick every checkbox in the app uses
(`.materialCheckBox`, forms.css) - the one Admin Panel /
+89 -6
View File
@@ -3,7 +3,7 @@ import { trelloGetMembersToMap } from './trelloMembersMapper';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { wekanGetMembersToMap } from './wekanMembersMapper';
import { csvGetMembersToMap } from './csvMembersMapper';
import { jiraGetMembersToMap } from './jiraMembersMapper';
import { jiraGetMembersToMap } from '/models/lib/jiraMembersMapper';
import getSlug from 'limax';
import { UserSearchIndex } from '/models/users';
import { Utils } from '/client/lib/utils';
@@ -49,6 +49,13 @@ function attachmentAuthData(importTpl) {
return auth ? { attachmentAuth: auth } : {};
}
// The file streamed to the server for this import (postImportUpload), by its
// id; the preview of its people and the import itself both read it.
function uploadData(importTpl) {
return importTpl.upload && importTpl.upload.uploadId
? { uploadId: importTpl.upload.uploadId, ...(importTpl.uploadExtras || {}) } : {};
}
// Helper to find the closest ancestor template instance by name
function findParentTemplateInstance(childTemplateInstance, parentTemplateName) {
let view = childTemplateInstance.view;
@@ -118,6 +125,33 @@ async function postTrelloImport(body, contentType) {
return result;
}
// A chosen file of the generalized importer's sources, streamed to the server
// a part at a time (server/routes/importUpload.js) rather than read here and
// sent whole through the importBoard method: the server writes it to its disk,
// checking the free space and the administrator's import limit, and importBoard
// reads it by the id answered here. Returns { uploadId, size }.
async function postImportUpload(source, file) {
const token =
(window.localStorage && window.localStorage.getItem('Meteor.loginToken')) || '';
const resp = await fetch(`/api/import/upload/${encodeURIComponent(source)}`, {
method: 'POST',
credentials: 'same-origin',
headers: {
'Content-Type': 'application/octet-stream',
...(token ? { Authorization: `Bearer ${token}` } : {}),
},
body: file,
});
let result = {};
try {
result = await resp.json();
} catch (e) {
result = {};
}
if (!resp.ok || result.error || !result.uploadId) throw new Error(result.error || 'import-upload-failed');
return result;
}
// A WeKan .zip export (the document and its attachment files) imported as a
// NEW board: posted as it is to /api/import/zip?newBoard=1 (models/importZip.js),
// which opens it on the server under its limits. Returns the new board's id.
@@ -313,7 +347,19 @@ Template.import.onCreated(function () {
openOrReportImportedBoard(boardId, '');
return;
}
if (file) {
this.upload = null;
this.uploadExtras = null;
// Jira too: its people are read from the uploaded file by the server.
if (file && (spec.creator === 'generalized' || dataSource === 'jira' || dataSource === 'csv')) {
// Streamed to the server's disk, never read into this page whole.
try {
this.upload = await postImportUpload(dataSource, file);
} catch (e) {
this.setError((e && e.message) || 'import-upload-failed');
return;
}
doc = {};
} else if (file) {
doc = documentForFile(dataSource, file.name || '', new Uint8Array(await file.arrayBuffer()));
} else {
const text = (this.find('.js-import-json') || {}).value || '';
@@ -331,6 +377,13 @@ Template.import.onCreated(function () {
// CSV/TSV and Excel: which column is which field comes first
// (csvMapping.js), the people after it for CSV.
if (dataSource === 'csv') {
// An uploaded file: its header, rows and people are read on the server.
if (this.upload) {
this.importedData.set([]);
this.membersToMap.set([]);
await startCsvMapping(this, { uploadId: this.upload.uploadId, membersStep: !skipMapping });
return;
}
if (!Array.isArray(doc) || !doc.length) {
this.setError('error-csv-schema');
return;
@@ -356,6 +409,8 @@ Template.import.onCreated(function () {
const estimateFieldId = this.find('.js-jira-estimate-field')?.value.trim();
if (estimateFieldId) doc.wekanScrumMapping = { estimateFieldId,
estimateUnit: this.find('.js-jira-estimate-unit')?.value.trim() };
// An uploaded file is read on the server: the mapping goes with the call.
if (this.upload && doc.wekanScrumMapping) this.uploadExtras = { wekanScrumMapping: doc.wekanScrumMapping };
}
// Trello: remember the target personal-workspace name for finishImport.
this.workspaceName = '';
@@ -373,6 +428,17 @@ Template.import.onCreated(function () {
await this.mapPeopleOrImport(dataSource, skipMapping);
return;
}
// An uploaded Jira file: its people from the server, read from the file.
if (this.upload && dataSource === 'jira') {
try {
this.membersToMap.set(await Meteor.callAsync('importBoard', {}, { previewPeople: true, ...uploadData(this) }, 'jira', null));
} catch (e) {
this.setError((e && (e.reason || e.error)) || 'error-json-malformed');
return;
}
await advance();
return;
}
this.membersToMap.set(_prepareAdditionalData(doc));
await advance();
};
@@ -393,7 +459,7 @@ Template.import.onCreated(function () {
let people = [];
try {
people = await Meteor.callAsync('importBoard', pruneImportDocument(this.importedData.get(), selectedFields()),
{ previewPeople: true, importFields: selectedFields() }, source, null);
{ previewPeople: true, importFields: selectedFields(), ...uploadData(this) }, source, null);
} catch (e) {
this.setError((e && (e.reason || e.error)) || 'error-json-malformed');
return;
@@ -544,7 +610,10 @@ Template.import.onCreated(function () {
this.membersToMap.set([]);
let settled = false;
const importDocument = pruneImportDocument(importedData, selectedFields());
const timeoutMs = importDeadlineFor(parseInt(window.WEKAN_IMPORT_TIMEOUT_MS, 10) || 120000, importDocument);
// An uploaded file is not in the document: its size gives it time, two
// seconds a megabyte on top of the usual deadline.
const uploadMs = this.upload ? Math.ceil((this.upload.size || 0) / (1024 * 1024)) * 2000 : 0;
const timeoutMs = importDeadlineFor(parseInt(window.WEKAN_IMPORT_TIMEOUT_MS, 10) || 120000, importDocument) + uploadMs;
const watchdog = Meteor.setTimeout(() => {
if (settled) return;
settled = true;
@@ -560,7 +629,7 @@ Template.import.onCreated(function () {
// The selection again, for the parts only a creator can leave out:
// the Scrum planning external parsers find (models/kanboardCreator.js).
{ membersMapping: mappingById, importFields: selectedFields(), membersMode: this.membersMode || 'map', ...csvMappingData(this),
...attachmentAuthData(this),
...attachmentAuthData(this), ...uploadData(this),
...(splitByProject(this.importSource) ? { splitBy: 'swimlane' } : {}) },
this.importSource,
Session.get('fromBoard'),
@@ -614,12 +683,21 @@ Template.import.helpers({
const setting = ReactiveCache.getCurrentSetting();
const product = productNameOrDefault(setting && setting.productName);
const current = Session.get('importSource');
return IMPORT_SOURCES.map(source => ({
// 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,
// 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,
// "a previous export of <Product name>", which for an unbranded WeKan is
// "WeKan" and for a rebranded one is whatever it was rebranded to.
name: source.product ? `${product} (JSON, .zip)` : source.name,
selected: source.key === current,
}))).map(source => ({
...source,
groupHeading: source.groupStart
? (source.groupLabelKey ? TAPi18n.__(source.groupLabelKey) : source.groupLabel || product)
: '',
}));
},
hasImportSource() {
@@ -713,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() {
@@ -4,7 +4,10 @@ export function trelloGetMembersToMap(data) {
// we will work on the list itself (an ordered array of objects) when a
// mapping is done, we add a 'wekan' field to the object representing the
// imported member
const membersToMap = data.members;
// A Trello file may have no members (an export of a board nobody else is
// on): there is then nobody to map, not an error. Without the fallback the
// forEach below threw and the Import button silently did nothing.
const membersToMap = Array.isArray(data.members) ? data.members : [];
// auto-map based on username
membersToMap.forEach(importedMember => {
const wekanUser = ReactiveCache.getUser({ username: importedMember.username });
+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));
},
});
@@ -0,0 +1,57 @@
/* The Kanban flow policies of the lists (docs/Features/Lists/Flow-Policies.md). */
.list-policy-mark,
.list-commitment-mark {
display: inline-block;
margin-inline-start: 4px;
opacity: 0.75;
}
.list-policy-mark {
cursor: pointer;
}
.list-commitment-mark {
color: #27ae60;
}
.list-policy-popup textarea {
width: 100%;
box-sizing: border-box;
}
.list-policy-popup .list-policy-text {
white-space: pre-wrap;
}
.board-flow-list-settings .board-flow-setting {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-top: 8px;
}
.board-flow-list-settings .board-flow-setting input,
.board-flow-list-settings .board-flow-setting select {
max-width: 50%;
}
.card-person-wip-over {
color: #c0392b;
margin-bottom: 4px;
}
/* Split Doing / Done lists. */
.list-split-counts {
display: inline-block;
margin-inline-start: 4px;
font-size: 0.85em;
opacity: 0.8;
}
.minicard-split-toggle {
float: inline-end;
margin-inline-start: 4px;
cursor: pointer;
opacity: 0.6;
}
.minicard-split-toggle.is-done {
color: #27ae60;
opacity: 1;
}
.minicard.minicard-split-done {
opacity: 0.6;
border-inline-start: 3px solid #27ae60;
}
@@ -0,0 +1,78 @@
//- The Kanban flow policies of the lists (models/lib/boardFlowPolicies.js,
docs/Features/Lists/Flow-Policies.md). Each is shown only when Admin Panel /
Features offers it; a board admin changes them, others see them disabled.
template(name="boardFlowListSettings")
form.board-flow-list-settings
if allowFeature 'list-policies'
div.check-div
a.flex.js-toggle-list-policies(class="{{#if allowsListPolicies}}is-checked{{/if}}" title="{{_ 'show-list-policies'}}")
i.fa(class="{{#if allowsListPolicies}}fa-check{{else}}fa-square-o{{/if}}")
span
i.fa.fa-gavel
| {{_ 'show-list-policies'}}
if allowFeature 'split-lists'
div.check-div
a.flex.js-toggle-split-lists(class="{{#if allowsSplitLists}}is-checked{{/if}}" title="{{_ 'show-split-lists'}}")
i.fa(class="{{#if allowsSplitLists}}fa-check{{else}}fa-square-o{{/if}}")
span
i.fa.fa-columns
| {{_ 'show-split-lists'}}
if allowFeature 'commitment-point'
label.board-flow-setting
span
i.fa.fa-flag-checkered
| {{_ 'commitment-point'}}
select.js-commitment-list(disabled=notBoardAdmin)
each option in commitmentOptions
option(value=option.value selected=option.selected) {{option.title}}
p.quiet {{_ 'commitment-point-hint'}}
if allowFeature 'person-wip-limit'
label.board-flow-setting
span
i.fa.fa-user-times
| {{_ 'person-wip-limit'}}
input.js-person-wip-limit(type="number" min="1" max="99" value=personWipLimit disabled=notBoardAdmin)
//- At the list header: the policy as an icon whose tooltip is the text, and the
commitment point's flag.
template(name="listFlowMarks")
if showPolicy
a.list-policy-mark.js-open-list-policy(title=policy aria-label="{{_ 'list-policy'}}")
i.fa.fa-gavel
if splitCounts
span.list-split-counts(title="{{_ 'list-split'}}") {{_ 'split-counts' doing=splitCounts.doing done=splitCounts.done}}
if isCommitmentPoint
span.list-commitment-mark(title="{{_ 'commitment-point'}}: {{_ 'commitment-point-hint'}}" aria-label="{{_ 'commitment-point'}}")
i.fa.fa-flag-checkered
template(name="listPolicyPopup")
.list-policy-popup
if canEdit
form.js-list-policy-form
textarea.js-list-policy-text(rows="6" maxlength="2000" placeholder="{{_ 'list-policy-placeholder'}}")= policy
input.primary(type="submit" value="{{_ 'save'}}")
else
if policy
p.list-policy-text= policy
else
p.quiet {{_ 'list-policy-placeholder'}}
//- In the opened card's Members section: each of its people over the board's
WIP limit per person.
template(name="cardPersonWipWarnings")
each warning in warnings
.card-person-wip-over.js-card-person-wip-over
i.fa.fa-user-times
| {{_ 'person-wip-over' user=warning.name count=warning.count limit=warning.limit}}
//- On a minicard of a split list: whether it is Done here, and the toggle for
whoever may change the card.
template(name="minicardSplitDone")
if inSplitList
if canModifyCard
a.minicard-split-toggle.js-minicard-split-done(class="{{#if splitDone}}is-done{{/if}}" title="{{#if splitDone}}{{_ 'split-done'}}{{else}}{{_ 'mark-split-done'}}{{/if}}" aria-pressed="{{#if splitDone}}true{{else}}false{{/if}}")
i.fa(class="{{#if splitDone}}fa-check-circle{{else}}fa-circle-o{{/if}}")
else
if splitDone
span.minicard-split-toggle.is-done(title="{{_ 'split-done'}}")
i.fa.fa-check-circle
+134
View File
@@ -0,0 +1,134 @@
// The Kanban flow policies of the lists (models/lib/boardFlowPolicies.js,
// docs/Features/Lists/Flow-Policies.md): Board Settings / List, the marks at
// a list's header, the list's policy popup and the opened card's warning.
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveCache } from '/imports/reactiveCache';
import { allowFeature } from '/client/lib/instanceFeatures';
import { TAPi18n } from '/imports/i18n';
import { Utils } from '/client/lib/utils';
import Lists from '/models/lists';
const { normalizePolicy, overPersonWip, isSplitDone, splitCounts } = require('/models/lib/boardFlowPolicies');
// Whether a list of `board` is drawn split into Doing and Done.
const splitShown = (board, list) => Boolean(board?.allowsSplitLists === true && list?.split === true && allowFeature('split-lists'));
export { splitShown };
const board = () => Utils.getCurrentBoard();
const isBoardAdmin = () => Boolean(ReactiveCache.getCurrentUser()?.isBoardAdmin?.());
Template.boardFlowListSettings.helpers({
allowsListPolicies() { return board()?.allowsListPolicies === true; },
allowsSplitLists() { return board()?.allowsSplitLists === true; },
notBoardAdmin() { return !isBoardAdmin(); },
personWipLimit() { return board()?.personWipLimit || ''; },
commitmentOptions() {
const current = board();
if (!current) return [];
const lists = ReactiveCache.getLists({ boardId: current._id, archived: false }, { sort: { sort: 1 } }) || [];
const chosen = current.commitmentListId || '';
return [{ value: '', title: '-', selected: !chosen },
...lists.map(list => ({ value: list._id, title: list.title, selected: list._id === chosen }))];
},
});
Template.boardFlowListSettings.events({
'click .js-toggle-list-policies'(event) {
event.preventDefault();
const current = board();
if (current && isBoardAdmin()) current.setAllowsListPolicies(current.allowsListPolicies !== true);
},
'click .js-toggle-split-lists'(event) {
event.preventDefault();
const current = board();
if (current && isBoardAdmin()) current.setAllowsSplitLists(current.allowsSplitLists !== true);
},
'change .js-commitment-list'(event) {
const current = board();
if (current && isBoardAdmin()) current.setCommitmentListId(event.currentTarget.value);
},
'change .js-person-wip-limit'(event) {
const current = board();
if (!current || !isBoardAdmin()) return;
current.setPersonWipLimit(event.currentTarget.value.trim()).catch(() => {
window.alert(TAPi18n.__('person-wip-limit'));
});
},
'submit .board-flow-list-settings'(event) { event.preventDefault(); },
});
// The list header's marks; the data context is the list.
Template.listFlowMarks.helpers({
showPolicy() {
const current = ReactiveCache.getBoard(this.boardId);
return Boolean(current?.allowsListPolicies === true && this.policy && allowFeature('list-policies'));
},
splitCounts() {
const current = ReactiveCache.getBoard(this.boardId);
if (!splitShown(current, this)) return null;
return splitCounts(ReactiveCache.getCards({ listId: this._id, archived: false }, { fields: { listId: 1, flow: 1, archived: 1 } }) || []);
},
isCommitmentPoint() {
const current = ReactiveCache.getBoard(this.boardId);
return Boolean(current?.commitmentListId && current.commitmentListId === this._id && allowFeature('commitment-point'));
},
});
Template.listFlowMarks.events({
'click .js-open-list-policy': Popup.open('listPolicy'),
});
Template.listPolicyPopup.helpers({
// Whoever may write to the list's board (models/lib/boardRoleCapabilities.js),
// the same as the server's Lists allow rule.
canEdit() {
return Utils.currentUserCan('write', ReactiveCache.getBoard(this.boardId));
},
});
Template.listPolicyPopup.events({
async 'submit .js-list-policy-form'(event, tpl) {
event.preventDefault();
let policy;
try {
policy = normalizePolicy(tpl.find('.js-list-policy-text').value);
} catch (e) {
return;
}
const modifier = policy ? { $set: { policy } } : { $unset: { policy: '' } };
await Lists.updateAsync(this._id, modifier);
Popup.back();
},
});
// The opened card's people over the WIP limit per person; the data is the card.
Template.cardPersonWipWarnings.helpers({
warnings() {
const card = this.card;
const current = card && ReactiveCache.getBoard(card.boardId);
if (!current || !current.personWipLimit || !allowFeature('person-wip-limit')) return [];
const cards = ReactiveCache.getCards({ boardId: card.boardId, archived: false },
{ fields: { assignees: 1, members: 1, dueComplete: 1, archived: 1, type: 1 } }) || [];
return overPersonWip(card, cards, current.personWipLimit).map(row => {
const user = ReactiveCache.getUser(row.userId);
return { ...row, name: (user && (user.profile?.fullname || user.username)) || row.userId };
});
},
});
// The minicard's Done here toggle; the data is the card.
Template.minicardSplitDone.helpers({
inSplitList() {
const card = this;
return splitShown(ReactiveCache.getBoard(card.boardId), ReactiveCache.getList(card.listId));
},
splitDone() { return isSplitDone(this); },
canModifyCard() { return Utils.canModifyCard(this); },
});
Template.minicardSplitDone.events({
'click .js-minicard-split-done'(event) {
event.preventDefault();
event.stopPropagation();
Meteor.callAsync('setCardFlow', this._id, { splitDone: !isSplitDone(this) })
.catch(error => window.alert((error && (error.reason || error.error)) || String(error)));
},
});
+35 -5
View File
@@ -35,6 +35,7 @@ template(name="listHeader")
|&nbsp;(
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cardsCountWhole}}
|/#{wipLimit.value})
+listFlowMarks
if showCardsCountForList cardsCountWhole
span.cardCount {{cardsCount containerSwimlaneId}} {{cardsCountForListIsOne cardsCountWhole}}
if hasNumberFieldsSum
@@ -88,6 +89,8 @@ template(name="listHeader")
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cardsCountWhole}}
|/#{wipLimit.value})
unless collapsed
//- List policy and commitment point (listFlowPolicies.jade).
+listFlowMarks
if showCardsCountForList cardsCountWhole
span.cardCount {{cardsCount containerSwimlaneId}} {{cardsCountForListIsOne cardsCountWhole}}
if hasNumberFieldsSum
@@ -165,9 +168,13 @@ template(name="editListTitleForm")
i.fa.fa-times-thin
template(name="listActionPopup")
//- Grouped under headings by what the entries act on (2026-11-20); every
entry keeps its own condition, and a heading sits inside the same condition
as its group.
//- Copy link, FIRST and above every permission check - see the swimlane
popup: copying an address is reading, not editing.
models/lib/boardItemUrl.js, docs/Features/General/Board-Item-Links.md
h4.menu-group-heading {{_ 'menu-group-share'}}
ul.pop-over-list
li: a.js-copy-list-link
i.fa.fa-link
@@ -196,6 +203,7 @@ template(name="listActionPopup")
Import WRITES, so it is offered only to somebody who may change the board;
`canImportIntoBoard` is the same question the popup itself asks
(client/components/boards/exportScope.js).
h4.menu-group-heading {{_ 'menu-group-export'}}
ul.pop-over-list
li: a.js-export-list
i.fa.fa-upload
@@ -207,6 +215,7 @@ template(name="listActionPopup")
hr
unless currentUser.isReadOnly
unless currentUser.isReadAssignedOnly
h4.menu-group-heading {{_ 'add'}}
ul.pop-over-list
li
a.js-add-card.list-header-plus-top
@@ -229,6 +238,7 @@ template(name="listActionPopup")
the fixed-width value it used to set is now a board-wide admin toggle
there too - a menu entry for the same thing was a second place to look
for it. client/components/sidebar/sidebar.jade
h4.menu-group-heading {{_ 'watch'}}
ul.pop-over-list
li
a.js-toggle-watch-list
@@ -241,6 +251,7 @@ template(name="listActionPopup")
unless currentUser.isCommentOnly
unless currentUser.isReadOnly
unless currentUser.isReadAssignedOnly
h4.menu-group-heading {{_ 'edit'}}
unless currentUser.isWorker
ul.pop-over-list
li
@@ -258,6 +269,7 @@ template(name="listActionPopup")
a.js-archive-list-cards
i.fa.fa-archive
| {{_ 'list-archive-cards'}}
h4.menu-group-heading {{_ 'settings'}}
if currentUser.isBoardAdmin
ul.pop-over-list
li
@@ -268,6 +280,22 @@ template(name="listActionPopup")
a.js-list-permissions
i.fa.fa-lock
| {{_ 'listPermissionsPopup-title'}}
//- The list's policy, when the board shows list policies
(listFlowPolicies.jade); every member who may edit the list.
if showsListPolicies
ul.pop-over-list
li
a.js-list-policy
i.fa.fa-gavel
| {{_ 'list-policy'}}
//- Split into Doing and Done (listFlowPolicies.jade), when the board
allows split lists.
if showsSplitLists
ul.pop-over-list
li
a.js-toggle-list-split
i.fa(class="{{#if split}}fa-check-square-o{{else}}fa-square-o{{/if}}")
| {{_ 'list-split'}}
//- #3847: board-wide toggle, exposed here per the maintainer's
instruction to reach it from the List hamburger menu. See
models/boards.js's stickyListHeaders and list.css's use of the
@@ -290,6 +318,7 @@ template(name="listActionPopup")
| &nbsp;
i.fa.fa-check-circle(class="{{#if syncSource.enabled}}list-sync-active{{else}}list-sync-paused{{/if}}")
hr
h4.menu-group-heading {{_ 'menu-group-move-copy'}}
ul.pop-over-list
unless currentUser.isWorker
li
@@ -304,6 +333,7 @@ template(name="listActionPopup")
unless currentUser.isWorker
if mayWriteList
hr
h4.menu-group-heading {{_ 'archives'}}
ul.pop-over-list
li
a.js-close-list
@@ -612,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'}}
@@ -649,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
+18 -1
View File
@@ -226,7 +226,9 @@ Template.listHeader.helpers({
showCardsCountForList(count) {
const currentUser = ReactiveCache.getCurrentUser();
const limit = currentUser ? currentUser.getLimitToShowCardsCount() : false;
return limit >= 0 && count >= limit;
// "Show cards count if list contains more than N": more than, as it says
// (it showed at N as well).
return limit >= 0 && count > limit;
},
cardsCountForListIsOne(count) {
@@ -452,6 +454,16 @@ Template.listHeader.events({
});
Template.listActionPopup.helpers({
showsSplitLists() {
const board = ReactiveCache.getBoard(this.boardId);
return board?.allowsSplitLists === true
&& require('/client/lib/instanceFeatures').allowFeature('split-lists');
},
showsListPolicies() {
const board = ReactiveCache.getBoard(this.boardId);
return board?.allowsListPolicies === true
&& require('/client/lib/instanceFeatures').allowFeature('list-policies');
},
isBoardAdmin() {
return ReactiveCache.getCurrentUser()?.isBoardAdmin();
},
@@ -611,6 +623,11 @@ Template.listActionPopup.events({
Popup.back();
},
'click .js-set-wip-limit': Popup.open('setWipLimit'),
'click .js-list-policy': Popup.open('listPolicy'),
async 'click .js-toggle-list-split'(event) {
event.preventDefault();
await Lists.updateAsync(this._id, this.split === true ? { $unset: { split: '' } } : { $set: { split: true } });
},
'click .js-list-permissions': Popup.open('listPermissions'),
'click .js-copy-list': Popup.open('copyList'),
'click .js-move-list': Popup.open('moveList'),
+192
View File
@@ -0,0 +1,192 @@
/* 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,
.billing-draft-lines li.billing-line-product {
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;
}
+634
View File
@@ -0,0 +1,634 @@
//- 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.feature-help-title
| {{_ 'billing-title'}}
+featureHelp(id='billing')
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'}}
+500
View File
@@ -0,0 +1,500 @@
// 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 { TAPi18n } from '/imports/i18n';
// The payment methods' labels and placeholders, and their QR codes and
// barcode as SVG, are shared with Board View / Shop (client/lib/paymentCodeSvg.js).
import { METHOD_KEYS, FIELD_KEYS, PLACEHOLDERS, qrSvg, barcodeSvg } from '/client/lib/paymentCodeSvg';
const { formatMoney, EXPENSE_CATEGORIES, LINE_KIND_LABEL_KEYS } = require('/models/lib/billing');
const { minorToText } = require('/models/lib/currencies');
const { PAYMENT_METHODS, 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' };
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_LABEL_KEYS[line.kind] || 'billing-line-fee'),
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);
},
});
+130
View File
@@ -0,0 +1,130 @@
/* The ? of a feature place and its popup (featureHelp.jade,
docs/Features/General/Help-Button.md).
Every rule here uses the LOGICAL side - inline-end, inline-start - so the ?
that is at the right of a heading in English is at its left in Arabic or
Hebrew, from the same rule and with nothing written twice. */
.feature-help-btn {
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
/* WCAG 2.2 target size: at least 24 by 24 CSS pixels. */
min-width: 28px;
min-height: 28px;
margin: 0;
padding: 0 4px;
border: 0;
border-radius: 50%;
background: transparent;
color: inherit;
font: inherit;
font-size: calc(18px * var(--wekan-ui-font-scale, 1));
line-height: 1;
cursor: pointer;
opacity: 0.75;
box-shadow: none;
}
.feature-help-btn:hover {
opacity: 1;
background: rgba(127, 127, 127, 0.18);
}
/* Keyboard focus is always visible. */
.feature-help-btn:focus-visible {
opacity: 1;
outline: 2px solid currentColor;
outline-offset: 2px;
}
.feature-help-btn i.fa {
margin: 0;
font-size: inherit;
}
/* A heading with a ? at its end: a flex row, the ? pushed to the inline end. */
.feature-help-title:has(> .feature-help-btn),
.admin-pane-title:has(> .feature-help-btn),
.sidebar-view-title:has(> .feature-help-btn) {
display: flex;
align-items: center;
gap: 8px;
}
.feature-help-title > .feature-help-btn,
.admin-pane-title > .feature-help-btn,
.sidebar-view-title > .feature-help-btn {
margin-inline-start: auto;
}
/* A card section's heading: the ? takes the far end, and the section's
hamburger, which had it, follows the ? instead of splitting the space. */
.card-details h3.card-details-item-title > .feature-help-btn {
margin-inline-start: auto;
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
}
.card-details h3.card-details-item-title > .feature-help-btn ~ .card-details-section-menu {
margin-inline-start: 0;
}
/* The Board View menu in the header bar: beside the view's button. */
.board-header-btn + .feature-help-btn {
margin-inline-start: 2px;
}
/* A popup's title bar places its maximize and close buttons absolutely at its
inline end (popup.css). The ? goes just before them - never over them -
and the title gives up the room it takes. */
.pop-over .header .feature-help-btn {
position: absolute;
top: calc(6px * var(--wekan-ui-font-scale, 1));
inset-inline-end: 44px;
}
.pop-over .header:has(.popup-maximize-btn) .feature-help-btn {
inset-inline-end: 76px;
}
.pop-over .header:has(.feature-help-btn) .header-title {
margin-inline-end: 80px;
}
.pop-over .header:has(.feature-help-btn):has(.popup-maximize-btn) .header-title {
margin-inline-end: 112px;
}
@media screen and (max-width: 800px) {
/* The phone's popup header is the theme's colour with a larger close button. */
.pop-over .header .feature-help-btn {
top: calc(10px * var(--wekan-ui-font-scale, 1));
inset-inline-end: 54px;
color: #fff;
}
.pop-over .header:has(.popup-maximize-btn) .feature-help-btn {
inset-inline-end: 86px;
}
.pop-over .header:has(.feature-help-btn) .header-title {
margin-inline-end: 90px;
}
.pop-over .header:has(.feature-help-btn):has(.popup-maximize-btn) .header-title {
margin-inline-end: 122px;
}
}
/* The popup itself is 720px wide on a desktop - popup.css, with the other
wide popups, mirrored in client/lib/popupOffset.js WIDE_POPUP_WIDTHS; below
801px every popup is a full-screen sheet. */
.feature-help-content {
padding-block-end: 8px;
line-height: 1.5;
text-align: start;
overflow-wrap: anywhere;
}
.feature-help-content .feature-help-heading {
margin: 18px 0 6px;
font-size: calc(22px * var(--wekan-ui-font-scale, 1));
font-weight: bold;
color: inherit;
}
.feature-help-content .feature-help-heading:first-child {
margin-top: 0;
}
.feature-help-content .feature-help-text {
margin: 0;
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
color: inherit;
}
+28
View File
@@ -0,0 +1,28 @@
//- The ? of a feature place (docs/Features/General/Help-Button.md).
//-
//- `+featureHelp(id='workload')` with an id of models/lib/featureHelp.js. An id
//- that is not there draws nothing, so a place whose help is chosen at run time
//- (the open view, popup, pane or card section) passes whatever it has and gets
//- a ? only when there is a help for it.
//-
//- A real button in the header's own row, after its title and before its other
//- controls end the row; featureHelp.css puts it at the inline END, which is
//- the right in a left-to-right page and the left in Arabic, from the same rule.
template(name="featureHelp")
if hasHelp
button.feature-help-btn.js-open-feature-help(
type="button"
data-feature-help=id
title="{{_ 'how-it-works'}}"
aria-label="{{_ 'how-it-works'}}"
aria-haspopup="dialog")
i.fa.fa-question-circle(aria-hidden="true")
//- The texts as TEXT: double braces, never triple, so nothing in a translation
//- can become markup. Title "How it works" comes from Popup's titleKey.
template(name="featureHelpPopup")
.feature-help-content(dir="auto" data-feature-help=id)
h2.feature-help-heading {{_ 'what-it-is'}}
p.feature-help-text {{_ whatKey}}
h2.feature-help-heading {{_ 'how-it-works'}}
p.feature-help-text {{_ howKey}}
+45
View File
@@ -0,0 +1,45 @@
import { Template } from 'meteor/templating';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
// The ? of a feature place and its popup (docs/Features/General/Help-Button.md).
// Which help a place shows is data: models/lib/featureHelp.js.
const {
featureHelp,
hasFeature,
boardViewHelpId,
sidebarViewHelpId,
popupHelpId,
cardSectionHelpId,
paneHelpId,
} = require('/models/lib/featureHelp');
Template.featureHelp.helpers({
hasHelp() {
return hasFeature(this.id);
},
});
Template.featureHelp.events({
'click .js-open-feature-help'(event) {
// The ? sits inside headings that do something on a click of their own -
// a card section folds - and the click is for the ? alone.
event.preventDefault();
event.stopPropagation();
const help = featureHelp(event.currentTarget.dataset.featureHelp);
if (!help) return;
// Titled "How it works" by the popup convention, featureHelpPopup-title.
Popup.open('featureHelp', {
dataContext: help,
// A ? inside a popup opens its help as a sub-popup; Escape goes BACK to
// that popup, where the button that opened the help gets the focus.
returnFocusSelector: `.js-pop-over .js-open-feature-help[data-feature-help="${help.id}"]`,
}).call(this, event);
},
});
// The places that show the help of whatever is open in them.
Template.registerHelper('boardViewHelpId', view => boardViewHelpId(view));
Template.registerHelper('sidebarViewHelpId', view => sidebarViewHelpId(view));
Template.registerHelper('popupHelpId', popupName => popupHelpId(popupName));
Template.registerHelper('cardSectionHelpId', section => cardSectionHelpId(section));
Template.registerHelper('paneHelpId', paneId => paneHelpId(FlowRouter.getRouteName(), paneId));
+4 -2
View File
@@ -177,9 +177,11 @@ Template.header.helpers({
return boardCreationAllowed();
},
// The Admin Panel is four routes; its tabs show on all of them.
// The Admin Panel is four routes; its tabs show on all of them - and on
// Admin Panel / Cloud, which exists only where the server has CLOUD.
isAdminPanel() {
return ADMIN_PANEL_ROUTES.includes(FlowRouter.getRouteName());
const route = FlowRouter.getRouteName();
return ADMIN_PANEL_ROUTES.includes(route) || route === 'cloud-admin';
},
// Whether to draw the hamburger at all. A page with no sidebar and nothing to
+22 -2
View File
@@ -362,6 +362,9 @@
@media screen and (min-width: 801px) {
.pop-over[data-popup='changeColorPopup'],
.pop-over[data-popup='boardChangeColorPopup'],
/* The ? of a feature (featureHelp.css): two headings and their texts, read
like a page rather than a menu. */
.pop-over[data-popup='featureHelpPopup'],
/* Stickers, for the same reason as the colours: the picker is a GRID, and
width buys columns. At the default 380px it was eight icons per row and a
hundred and fifty stickers made a column taller than the screen, so
@@ -1409,12 +1412,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;
@@ -1543,3 +1549,17 @@ body.mobile-mode .pop-over .content-wrapper {
.pop-over[data-popup='boardCardSettingsPopup'] .content-container > .clearfix {
display: none;
}
/* A heading over a group of a menu's entries (the list, card and swimlane
menus, 2026-11-20): not an entry - nothing to click. */
.pop-over .menu-group-heading {
margin: 0;
padding: 8px 10px 2px;
font-size: 0.8em;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #6b778c;
cursor: default;
pointer-events: none;
}
+6
View File
@@ -4,6 +4,7 @@ import { CSSEvents } from '/client/lib/cssEvents';
import { isMobileViewportNow } from '/client/lib/responsiveUtils';
import { trapTabKey } from '/client/lib/accessibility';
import { keptInside } from '/client/lib/popupBounds';
import { popupHelpId } from '/models/lib/featureHelp';
// Anchor the opposite edge while dragging the bottom inline-end corner.
function resizeDatePopup(element, width, height) {
@@ -74,6 +75,11 @@ Popup.template.helpers({
popupMaximizable() {
return MAXIMIZABLE_POPUPS.has(this.popupName);
},
// The ? of this popup's feature, in its title bar
// (docs/Features/General/Help-Button.md): models/lib/featureHelp.js POPUP_HELP.
popupHelp() {
return popupHelpId(this.popupName);
},
popupMaximized() {
return Template.instance().popupMaximized.get();
},
+3
View File
@@ -23,6 +23,9 @@
span.popup-drag-handle.js-popup-drag-handle(title="{{_ 'drag-to-move'}}")
i.fa.fa-arrows(aria-hidden="true")
span.header-title= title
//- The popup's ? (featureHelp.jade): after the title, before the maximize
and close buttons, never on top of them.
+featureHelp(id=popupHelp)
if popupMaximizable
if popupMaximized
a.popup-maximize-btn.js-popup-minimize(href="#" role="button" title="{{_ 'minimize-window'}}" aria-label="{{_ 'minimize-window'}}")
+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;
}
+256
View File
@@ -0,0 +1,256 @@
//- 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.feature-help-title
| {{_ 'workload-title'}}
+featureHelp(id='workload')
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')));
},
});
@@ -3,6 +3,7 @@ import { Utils } from '/client/lib/utils';
import { ReactiveCache } from '/imports/reactiveCache';
import { saveRuleTriggerAction } from '/client/components/rules/rulesSaveHelper';
import { RULE_ACTING_USER_SENTINEL } from '/models/lib/ruleActingUser';
import { webhooksOff } from '/client/lib/webhooksSwitch';
let cardColors;
Meteor.startup(() => {
@@ -21,7 +22,9 @@ Template.cardActions.onCreated(function () {
Template.cardActions.helpers({
// This board's bots (Board Settings / Bots), for "Dispatch to bot".
// None while all webhooks are turned off (client/lib/webhooksSwitch.js).
boardBots() {
if (webhooksOff()) return [];
return ReactiveCache.getIntegrations({ boardId: Session.get('currentBoard'), bot: true }) || [];
},
cardColorButton() {
+2 -1
View File
@@ -1,8 +1,9 @@
template(name="rulesList")
.rules(class=currentBoard.colorClass)
h2
h2.feature-help-title
i.fa.fa-magic
| {{_ 'r-board-rules' }}
+featureHelp(id='rules')
//- #2217: a board admin shows this board's Rules to its members, read-only,
when Admin Panel / Settings / Visibility allows it.
+5 -1
View File
@@ -2,6 +2,7 @@ import { currentRulesAccess } from '/client/lib/rulesAccess';
import { ReactiveCache } from '/imports/reactiveCache';
import { Utils } from '/client/lib/utils';
import { triggerValueHasVars } from '/models/lib/ruleTriggerVars';
import { webhooksOff } from '/client/lib/webhooksSwitch';
Template.rulesMain.onCreated(function () {
this.rulesCurrentTab = new ReactiveVar('rulesList');
@@ -72,7 +73,10 @@ Template.rulesMain.helpers({
return Session.get('rulesViewMode') === 'workflow';
},
// Board Settings / Bots: the alternative workflow view for bots.
isBotsView() { return Session.get('rulesViewMode') === 'bots'; },
// Not while all webhooks are turned off: a bot is a webhook.
isBotsView() {
return Session.get('rulesViewMode') === 'bots' && !webhooksOff();
},
});
function sanitizeObject(obj) {
@@ -0,0 +1,17 @@
/* Admin Panel / Settings / Privacy and security / Allowed addresses. */
.admin-panel-addresses textarea {
width: 100%;
max-width: 40em;
font-family: monospace;
}
.admin-panel-addresses .warning,
.admin-panel-address-refused {
color: #b00020;
}
.admin-panel-address-refused {
display: inline-flex;
align-items: center;
gap: 0.4em;
padding: 0 0.6em;
font-weight: bold;
}
@@ -0,0 +1,25 @@
//- Admin Panel / Settings / Privacy and security / Allowed addresses
(models/lib/adminPanelAddresses.js, server/adminPanelAddresses.js): from
any other address the Admin Panel and the admin REST API refuse, and a site
administrator there is a member like any other. The server refuses a list
without the saver's own address, and the page says so before it is sent.
template(name="adminPanelAllowedAddresses")
form.js-admin-panel-addresses.admin-panel-addresses
h2.admin-pane-group-title {{_ 'cloud-allowed-addresses'}}
p.description {{_ 'admin-panel-allowed-addresses-desc'}}
if fromEnvironment
p.warning.js-admin-panel-addresses-env {{_ 'admin-panel-allowed-addresses-env'}}
textarea.wekan-form-control.js-admin-panel-addresses-text(name="addresses" rows="5" maxlength="12000" placeholder="203.0.113.0/24&#10;2001:db8::/32" aria-label="{{_ 'cloud-allowed-addresses'}}")= addressesText
p.quiet.js-admin-panel-your-address {{_ 'cloud-allowed-addresses-yours' address=yourAddress}}
if lockout
p.warning.js-admin-panel-addresses-lockout {{_ 'cloud-allowed-addresses-lockout' address=yourAddress}}
button.primary(type="submit") {{_ 'save'}}
span.js-admin-panel-addresses-status= status
//- Shown in the Admin Panel's tabs to a site administrator at an address the
list does not have: the panes are empty there, and this says why.
template(name="adminPanelAddressRefused")
if refused
span.admin-panel-address-refused.js-admin-panel-address-refused
i.fa.fa-shield
| {{_ 'admin-panel-address-refused' address=yourAddress}}
@@ -0,0 +1,72 @@
// Admin Panel / Settings / Privacy and security / Allowed addresses
// (models/lib/adminPanelAddresses.js). The list is read and saved through
// site-admin methods, never published: it describes the admins' network.
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import { TAPi18n } from '/imports/i18n';
const { normalizeAllowedAddresses, addressAllowed } = require('/models/lib/adminPanelAddresses');
// Would this list lock the saver out? The rule the server applies when it
// refuses to save it.
function locksOut(text, yourAddress) {
let list;
try { list = normalizeAllowedAddresses(text); } catch (e) { return false; }
return list.length > 0 && !addressAllowed(yourAddress, list);
}
Template.adminPanelAllowedAddresses.onCreated(function () {
this.config = new ReactiveVar({ addresses: [], source: 'settings', yourAddress: '' });
this.text = new ReactiveVar(null);
this.status = new ReactiveVar('');
Meteor.call('getAdminPanelAllowedAddresses', (error, config) => {
if (!error && config) this.config.set(config);
});
});
Template.adminPanelAllowedAddresses.helpers({
addressesText() { return (Template.instance().config.get().addresses || []).join('\n'); },
yourAddress() { return Template.instance().config.get().yourAddress || ''; },
fromEnvironment() { return Template.instance().config.get().source !== 'settings'; },
lockout() {
const tpl = Template.instance();
const text = tpl.text.get();
return text !== null && locksOut(text, tpl.config.get().yourAddress);
},
status() { return Template.instance().status.get(); },
});
Template.adminPanelAllowedAddresses.events({
'input .js-admin-panel-addresses-text'(event, tpl) {
tpl.status.set('');
tpl.text.set(event.currentTarget.value);
},
'submit .js-admin-panel-addresses'(event, tpl) {
event.preventDefault();
const value = String(event.currentTarget.elements.addresses.value || '');
Meteor.call('saveAdminPanelAllowedAddresses', value, (error, result) => {
if (error) {
tpl.status.set(error.error === 'admin-panel-address-lockout'
? TAPi18n.__('cloud-allowed-addresses-lockout', { address: tpl.config.get().yourAddress })
: (error.reason || error.message));
return;
}
tpl.config.set({ ...tpl.config.get(), addresses: result.addresses });
tpl.text.set(null);
tpl.status.set(TAPi18n.__('feature-saved'));
});
},
});
Template.adminPanelAddressRefused.onCreated(function () {
this.state = new ReactiveVar({ refused: false });
Meteor.call('adminPanelAddressStatus', (error, state) => {
if (!error && state) this.state.set(state);
});
});
Template.adminPanelAddressRefused.helpers({
refused() { return Template.instance().state.get().refused === true; },
yourAddress() { return Template.instance().state.get().yourAddress || ''; },
});
@@ -54,6 +54,8 @@ template(name="adminProblems")
+officeReport
else if isPane 'report-password-length'
+passwordLengthReport
else if isPane 'report-webhooks'
+webhooksReport
else if tablePageData
+tablePage(tablePageData)
@@ -145,6 +147,8 @@ template(name="featuresPerformance")
//- Admin Panel / Settings / Security (moved from Problems on 2026-11-19).
template(name="featuresSecurity")
ul.setting-detail
li
+adminPanelAllowedAddresses
li
a.flex.js-toggle-render-links-as-plain-text
.materialCheckBox(class="{{#if renderLinksAsPlainText}}is-checked{{/if}}")
@@ -160,6 +164,13 @@ template(name="featuresSecurity")
.materialCheckBox(class="{{#if disableAllImport}}is-checked{{/if}}")
span {{_ 'disable-all-import'}}
p.description {{_ 'disable-all-import-description'}}
//- The largest import upload (server/lib/importDiskSpace.js); empty is no
limit, only the free disk space.
li
label.flex
span {{_ 'import-max-megabytes'}}
input.js-import-max-megabytes(type="number" min="0" step="1" value="{{importMaxMegabytes}}" placeholder="{{_ 'import-max-megabytes-none'}}")
p.description {{_ 'import-max-megabytes-description'}}
li
a.flex.js-toggle-disable-all-export
.materialCheckBox(class="{{#if disableAllExport}}is-checked{{/if}}")
@@ -326,6 +326,9 @@ const PROBLEMS_MENU = [
{ id: 'report-broken', icon: 'fa-chain-broken', labelKey: 'broken-cards' },
{ id: 'report-files', icon: 'fa-paperclip', labelKey: 'filesReportTitle' },
{ id: 'report-rules', icon: 'fa-magic', labelKey: 'rulesReportTitle' },
// Every webhook, its board or Global, who added it and what it sends
// (webhooksReport.js). Tokens are never shown.
{ id: 'report-webhooks', icon: 'fa-globe', labelKey: 'webhooks-report-title' },
{ id: 'report-boards', icon: 'fa-columns', labelKey: 'boardsReportTitle' },
{ id: 'report-cards', icon: 'fa-id-card-o', labelKey: 'cardsReportTitle' },
{ id: 'report-recovery', icon: 'fa-medkit', labelKey: 'recoveryReportTitle' },
@@ -534,6 +537,8 @@ const SELF_LOADING_PANES = [
'report-database', 'report-integrity', 'report-office', 'report-api', 'report-mail',
// passwordLengthReport.js loads its own rows and settings through methods.
'report-password-length',
// webhooksReport.js loads its rows through the webhooksReportPage method.
'report-webhooks',
];
function openReportPane(tmpl, targetID) {
@@ -1261,6 +1266,10 @@ const featurePaneHelpers = {
disableAllExport() {
return (ReactiveCache.getCurrentSetting() || {}).disableAllExport;
},
importMaxMegabytes() {
const mb = (ReactiveCache.getCurrentSetting() || {}).importMaxMegabytes;
return mb > 0 ? mb : '';
},
disableImportAvatars() {
return (ReactiveCache.getCurrentSetting() || {}).disableImportAvatars;
},
@@ -1302,6 +1311,14 @@ const featurePaneEvents = {
'click .js-toggle-disable-all-export'() {
toggleSettingField('disableAllExport');
},
// Empty or 0 is no limit; anything else a whole number of megabytes.
'change .js-import-max-megabytes'(event) {
const setting = ReactiveCache.getCurrentSetting();
if (!setting) return;
const mb = Math.floor(Number(event.currentTarget.value));
Settings.update(setting._id, Number.isFinite(mb) && mb > 0
? { $set: { importMaxMegabytes: mb } } : { $unset: { importMaxMegabytes: '' } });
},
'click .js-toggle-disable-import-avatars'() {
toggleSettingField('disableImportAvatars');
},
+9 -2
View File
@@ -90,14 +90,21 @@ template(name="leftMenuResize")
//- nothing left to unfold it.
//-
//- Data context: { titleKey } or { label } from paneTitle().
//- The ? of the open pane is at the inline end of the title (featureHelp.css),
//- chosen from the page and the pane: models/lib/featureHelp.js paneHelpId.
template(name="paneTitle")
if isLeftMenuCollapsed
h1.admin-pane-title.admin-pane-title-folded
+leftMenuCollapse(paneTitleKey=titleKey paneLabel=label)
+featureHelp(id=paneHelp)
else if titleKey
h1.admin-pane-title {{_ titleKey}}
h1.admin-pane-title
| {{_ titleKey}}
+featureHelp(id=paneHelp)
else if label
h1.admin-pane-title {{label}}
h1.admin-pane-title
| {{label}}
+featureHelp(id=paneHelp)
//- The caret that folds the menu away.
//-
+12
View File
@@ -3,6 +3,9 @@ import { Template } from 'meteor/templating';
import { Tracker } from 'meteor/tracker';
import { TAPi18n } from '/imports/i18n';
import { Utils } from '/client/lib/utils';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const { paneHelpId } = require('/models/lib/featureHelp');
// Collapsing the left menu, for both pages that have one.
//
@@ -28,6 +31,15 @@ import { Utils } from '/client/lib/utils';
Template.registerHelper('isLeftMenuCollapsed', () => Utils.getLeftMenuCollapseState());
// The ? of the open pane (docs/Features/General/Help-Button.md): its help
// depends on the page and on the open menu entry, which paneTitle() passes as
// `paneId`.
Template.paneTitle.helpers({
paneHelp() {
return paneHelpId(FlowRouter.getRouteName(), this && this.paneId);
},
});
Template.leftMenuCollapse.helpers({
// What the control DOES, for the tooltip and for a screen reader - the same
// two words a list's caret uses.
@@ -48,9 +48,10 @@ template(name="notificationSettingsPopup")
a.flex.js-due-reminder-off(role="checkbox" aria-checked="{{#if dueRemindersOff}}true{{else}}false{{/if}}")
.materialCheckBox(class="{{#if dueRemindersOff}}is-checked{{/if}}")
span {{_ 'due-reminder-off'}}
a.flex.js-due-reminder-webhook(role="checkbox" aria-checked="{{#if dueReminderWebhook}}true{{else}}false{{/if}}")
.materialCheckBox(class="{{#if dueReminderWebhook}}is-checked{{/if}}")
span {{_ 'due-reminder-webhook'}}
unless webhooksOff
a.flex.js-due-reminder-webhook(role="checkbox" aria-checked="{{#if dueReminderWebhook}}true{{else}}false{{/if}}")
.materialCheckBox(class="{{#if dueReminderWebhook}}is-checked{{/if}}")
span {{_ 'due-reminder-webhook'}}
if dueReminderMessage
p.quiet.js-due-reminder-message {{dueReminderMessage}}
button.primary.js-due-reminder-save(type="submit") {{_ 'save'}}
@@ -5,6 +5,7 @@ import { ReactiveVar } from 'meteor/reactive-var';
import { TAPi18n } from '/imports/i18n';
import { parseDueReminderInput } from '/models/lib/dueNotificationConfig';
import { GROUP_KEYS, cleanMutedGroups } from '/models/lib/notificationActivityGroups';
import { webhooksOff } from '/client/lib/webhooksSwitch';
// The 3-tier Notification Settings popup (see notificationSettingsPopup.jade
// and models/lib/notificationSettings.js). `this.data().scope` is one of
@@ -95,8 +96,10 @@ Template.notificationSettingsPopup.helpers({
deliveryTargetId() {
return Template.instance().data.scope === 'board' ? Utils.getCurrentBoardId() : null;
},
// The webhook channel is hidden while all webhooks are turned off.
deliveryChannels() {
return ['email', 'tray', 'webhook'].map(channel => ({ channel }));
const off = webhooksOff();
return ['email', 'tray', 'webhook'].filter(channel => !off || channel !== 'webhook').map(channel => ({ channel }));
},
// #572: every kind of card activity, ticked unless this member muted it.
isMemberScope() {
+34 -26
View File
@@ -549,6 +549,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' },
// No Cloud entry: the Cloud Panel's domain is the server's CLOUD
// environment variable, never a setting here, and the panel itself is
// Admin Panel / Cloud (docs/Features/Admin-Panel/Cloud-Panel.md).
{ id: 'org-setting', icon: 'fa-globe', labelKey: 'organizations' },
{ id: 'team-setting', icon: 'fa-users', labelKey: 'teams' },
{ id: 'people-setting', icon: 'fa-user', labelKey: 'people' },
@@ -1475,34 +1478,47 @@ Template.rolesGeneral.events({
// Feature #3313 "Shared templates": admin view of users' shareable template
// boards, grouped by Organization / Team / email Domain. The three checkboxes
// are LIVE view filters (no Save button) — each toggles a grouping dimension and
// the selection is remembered (persisted in localStorage) so it survives reload.
const SHARED_TEMPLATES_SCOPE_KEY = 'sharedTemplatesScopes';
const SHARED_TEMPLATES_VALID_SCOPES = ['organizations', 'teams', 'domains'];
// write the instance setting Settings.sharedTemplatesScopes at once (no Save
// button, like every checkbox here): it is both which groupings this view lists
// and which group kinds every user may share a template board with
// (models/lib/sharedTemplatesScopes.js). It used to live in this browser's
// localStorage, so it differed per browser and was empty for everyone else.
const sharedScopes = require('/models/lib/sharedTemplatesScopes');
function loadSharedTemplatesScopes() {
try {
const raw = window.localStorage.getItem(SHARED_TEMPLATES_SCOPE_KEY);
const arr = raw ? JSON.parse(raw) : [];
return Array.isArray(arr)
? arr.filter(s => SHARED_TEMPLATES_VALID_SCOPES.includes(s))
: [];
} catch (e) {
return [];
}
return sharedScopes.sharedTemplatesScopes(ReactiveCache.getCurrentSetting());
}
function saveSharedTemplatesScopes(scopes) {
const setting = ReactiveCache.getCurrentSetting();
if (!setting) return;
Settings.update(setting._id, {
$set: { sharedTemplatesScopes: sharedScopes.normalizeScopes(scopes) },
});
}
// An install that has never stored the setting takes over the ticks an admin
// made in this browser while it was localStorage, once; the old key is then
// dropped so it cannot come back.
function carryOverLegacyScopes() {
let legacy = [];
try {
window.localStorage.setItem(SHARED_TEMPLATES_SCOPE_KEY, JSON.stringify(scopes));
const raw = window.localStorage.getItem(sharedScopes.LEGACY_STORAGE_KEY);
legacy = sharedScopes.normalizeScopes(raw ? JSON.parse(raw) : []);
window.localStorage.removeItem(sharedScopes.LEGACY_STORAGE_KEY);
} catch (e) {
// ignore storage errors (e.g. private mode)
return;
}
const setting = ReactiveCache.getCurrentSetting();
if (legacy.length && setting && setting.sharedTemplatesScopes === undefined) {
saveSharedTemplatesScopes(legacy);
}
}
Template.templatesGeneral.onCreated(function () {
// Restore the previously-checked scopes (empty by default → nothing shown).
this.selectedScopes = new ReactiveVar(loadSharedTemplatesScopes());
carryOverLegacyScopes();
// The instance setting, reactively: another admin's change shows here too.
this.selectedScopes = { get: loadSharedTemplatesScopes };
// Raw rows returned by the admin-only method (one entry per user whose
// Templates board is non-empty).
this.sharedTemplates = new ReactiveVar([]);
@@ -1598,15 +1614,7 @@ Template.templatesGeneral.events({
'click a.js-toggle-template-scope'(event, tpl) {
event.preventDefault();
const scope = $(event.currentTarget).data('scope');
const current = tpl.selectedScopes.get().slice();
const idx = current.indexOf(scope);
if (idx >= 0) {
current.splice(idx, 1);
} else {
current.push(scope);
}
tpl.selectedScopes.set(current);
saveSharedTemplatesScopes(current);
saveSharedTemplatesScopes(sharedScopes.toggleScope(tpl.selectedScopes.get(), scope));
},
});
+27 -1
View File
@@ -49,7 +49,12 @@ template(name="setting")
else if isLayoutSetting
+pwaSettings
else if isWebhookSetting
+webhookSettings
//- Its menu entry is hidden while all webhooks are turned off; an
old link to it says why instead of showing the forms.
if webhooksOff
p.quiet.js-webhooks-off-notice {{_ 'webhooks-disabled'}}
else
+webhookSettings
else if isSharedLabelsSetting
+sharedLabelsSettings
@@ -402,6 +407,14 @@ template(name='tableVisibilityModeSettings')
.materialCheckBox#activity-pub-enabled(class="{{#if currentSetting.activityPubEnabled}}is-checked{{/if}}")
span {{_ 'activity-pub-enabled'}}
.feature-desc {{_ 'activity-pub-desc'}}
//- Turn off all webhooks (models/lib/webhooksSwitch.js): hides every
webhook screen, and the server sends no webhook and refuses to add
or change one. Saved as soon as it is switched; nothing is deleted.
li.tableVisibilityMode-form
a.flex.js-toggle-webhooks-off
.materialCheckBox#webhooks-off(class="{{#if webhooksOff}}is-checked{{/if}}")
span {{_ 'webhooks-off'}}
.feature-desc {{_ 'webhooks-off-desc'}}
li.admin-pane-group-separator
hr
@@ -556,6 +569,19 @@ template(name='tableVisibilityModeSettings')
button.js-visibility-date-save.primary {{_ 'save'}}
li.admin-pane-group-separator
hr
//- #6939: the width every card details window opens at, in percent of the
browser window, until a user drags their own (models/lib/cardDetailsWidth.js).
li
h2.admin-pane-group-title {{_ 'card-details-default-width'}}
li.tableVisibilityMode-form
.feature-desc {{_ 'card-details-default-width-desc'}}
.form-group
input.wekan-form-control#card-details-default-width-percent(type="number" min="30" max="95" step="1" placeholder="520px" value="{{currentSetting.cardDetailsDefaultWidthPercent}}" aria-label="{{_ 'card-details-default-width'}}")
li
button.js-visibility-card-width-save.primary {{_ 'save'}}
span.js-visibility-card-width-status(role="status" aria-live="polite")
li.admin-pane-group-separator
hr
li
h2.admin-pane-group-title {{_ 'settings-group-url'}}
li
+33
View File
@@ -17,6 +17,8 @@ import { adminPath } from '/models/lib/adminUrls';
import TableVisibilityModeSettings from '/models/tableVisibilityModeSettings';
import { format } from '/imports/lib/dateUtils';
import { errorMessage } from '/client/lib/errorMessage';
// Registers {{webhooksOff}}: Features / Turn off all webhooks, Global Webhooks.
import { webhooksOff } from '/client/lib/webhooksSwitch';
const { ALL_MAIL_SERVICES, mailServiceStorageKey } = require('/models/lib/mailServices');
const instanceFeatures = require('/models/lib/instanceFeatures');
const { cardFieldRows } = require('/models/lib/cardFieldVisibility');
@@ -251,6 +253,11 @@ function settingsMenu(user) {
// #2761, #4698: shared label catalogs.
{ id: 'shared-labels-setting', icon: 'fa-tags', labelKey: 'shared-labels', emoji: true },
];
// Global Webhooks is not offered while all webhooks are turned off
// (Features / Turn off all webhooks, models/lib/webhooksSwitch.js).
if (webhooksOff()) {
items.splice(items.findIndex(item => item.id === 'webhook-setting'), 1);
}
// Multitenancy option D (docs/Design/Multitenancy/Multitenancy.md, D.7/D.9): an
// Organization's own admin has ONE pane here - Visibility, for its "Change color"
// section, which is that Organization's site theme. Every other pane, and every
@@ -743,6 +750,15 @@ Template.tableVisibilityModeSettings.events({
console.error(error);
}
},
// Turn off all webhooks (models/lib/webhooksSwitch.js), saved at once.
async 'click .js-toggle-webhooks-off'(event, instance) {
event.preventDefault();
try {
await Meteor.callAsync('saveWebhooksDisabled', !instance.$('#webhooks-off').hasClass('is-checked'));
} catch (error) {
console.error(error);
}
},
// #4198
async 'click .js-toggle-activity-pub'(event, instance) {
event.preventDefault();
@@ -832,6 +848,23 @@ Template.tableVisibilityModeSettings.events({
}
},
// #6939: empty = 520px; otherwise a whole percentage, 30 to 95.
'click button.js-visibility-card-width-save'(event, instance) {
const { clampDefaultPercent } = require('/models/lib/cardDetailsWidth');
const raw = String(instance.$('#card-details-default-width-percent').val() || '').trim();
const percent = clampDefaultPercent(raw);
const status = instance.$('.js-visibility-card-width-status');
if (raw && percent === null) {
status.text(TAPi18n.__('card-details-default-width-desc'));
return;
}
const id = ReactiveCache.getCurrentSetting()._id;
if (percent === null) Settings.update(id, { $unset: { cardDetailsDefaultWidthPercent: '' } });
else Settings.update(id, { $set: { cardDetailsDefaultWidthPercent: percent } });
instance.$('#card-details-default-width-percent').val(percent === null ? '' : percent);
status.text(TAPi18n.__('card-details-default-width-saved'));
},
'click button.js-visibility-date-save'(event, instance) {
saveVisibilitySettings({
hideDateFormat: instance.$('#global-date-format-enabled').hasClass('is-checked'),
@@ -19,3 +19,13 @@ template(name="adminPanelTabs")
a.board-header-btn.problems(class="{{isProblemsActive}} {{problemsClass}}" href="{{pathFor 'problems'}}" title="{{_ 'problems'}}")
i.fa.fa-exclamation-triangle
span.board-header-btn-label {{_ 'problems'}}
//- Admin Panel / Cloud: only where the server has the CLOUD environment
variable, at that address, for its Cloud Admins - the server says so
(cloudPanelWhoAmI); nothing in the browser can turn it on.
if isCloudAdmin
a.board-header-btn.cloud(class=isCloudActive href="{{pathFor 'cloud-admin-home'}}" title="{{_ 'cloud'}}")
i.fa.fa-cloud
span.board-header-btn-label {{_ 'cloud'}}
//- Admin Panel / Settings / Privacy and security / Allowed addresses: a
site administrator at another address sees why the panes are empty.
+adminPanelAddressRefused
@@ -11,8 +11,21 @@ function refreshProblems() {
});
}
// Is the signed-in user a Cloud Admin here? Asked once per page load: false
// on every WeKan without the CLOUD environment variable, which is nearly all.
const cloudAdminVar = new ReactiveVar(false);
let cloudAsked = false;
function askCloud() {
if (cloudAsked) return;
cloudAsked = true;
Meteor.callAsync('cloudPanelWhoAmI')
.then(info => cloudAdminVar.set(!!(info && info.enabled && info.onCloudHost && info.isCloudAdmin)))
.catch(() => cloudAdminVar.set(false));
}
Template.adminPanelTabs.onCreated(function () {
refreshProblems();
askCloud();
problemsTimer = Meteor.setInterval(refreshProblems, 30000);
});
Template.adminPanelTabs.onDestroyed(function () {
@@ -33,6 +46,12 @@ Template.adminPanelTabs.helpers({
isPeopleActive() {
return FlowRouter.getRouteName() === 'people' ? 'active' : '';
},
isCloudAdmin() {
return cloudAdminVar.get();
},
isCloudActive() {
return FlowRouter.getRouteName() === 'cloud-admin' ? 'active' : '';
},
isAttachmentsActive() {
return FlowRouter.getRouteName() === 'attachments' ? 'active' : '';
},
@@ -0,0 +1,49 @@
//- Admin Panel / Problems / Webhooks (docs/Features/Admin-Panel/Problems/Webhooks.md):
//- every board webhook and every global webhook, who added it and what it
//- sends, through the shared table page (docs/Features/General/Table.md). The
//- rows come from the site-admin method webhooksReportPage
//- (server/webhooksSwitch.js); a token is never sent here, only whether one is
//- set. Every value is text interpolation, so a title or URL is never markup.
template(name="webhooksReport")
if reportOff
p.quiet.js-webhooks-report-off {{_ 'webhooks-disabled'}}
+tablePage(tablePageData)
template(name="webhooksReportRow")
tr.js-webhooks-report-row(data-integration-id="{{_id}}")
td
if isGlobal
| {{_ 'webhooks-report-global'}}
else if boardMissing
| {{boardId}}
else
a.js-webhooks-report-board(href="{{boardPath}}") {{boardTitle}}
td
if ownerUsername
| {{ownerUsername}}
if ownerFullname
br
span.quiet {{ownerFullname}}
else
| {{ownerId}}
td {{title}}
td {{url}}
td
| {{_ typeKey}}
if mattermostDirectMessages
br
span.quiet Mattermost
td
if enabled
| {{_ 'webhooks-report-on'}}
else
| {{_ 'webhooks-report-off'}}
td
if allActivities
| {{_ 'webhook-activities-all'}}
else
| {{activitiesText}}
td
if tokenSet
| {{_ 'webhooks-report-token-set'}}
td.table-page-nowrap {{createdText}}
@@ -0,0 +1,111 @@
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { formatDateForDisplay } from '/client/lib/dateDisplay';
import { buildFilters, buildHeader, pageInfo } from '/models/lib/tablePage';
import { webhooksOff } from '/client/lib/webhooksSwitch';
// Admin Panel / Problems / Webhooks: every integration, its board or Global,
// who added it and what it sends (models/lib/webhooksSwitch.js
// webhookReportRow, server/webhooksSwitch.js webhooksReportPage).
const { DEFAULT_REPORT_FILTER } = require('/models/lib/webhooksSwitch');
const PER_PAGE = 25;
// The header of webhooksReportRow, in the same order as its cells.
const COLUMNS = [
{ labelKey: 'board' },
{ labelKey: 'owner' },
{ labelKey: 'webhook-title' },
{ labelKey: 'settings-group-url' },
{ labelKey: 'type' },
{ labelKey: 'status' },
{ labelKey: 'activities' },
{ labelKey: 'webhooks-report-token' },
{ labelKey: 'createdAt' },
];
const FILTER_OPTIONS = [
{ value: 'all', labelKey: 'webhooks-report-title' },
{ value: 'on', labelKey: 'webhooks-report-on' },
{ value: 'off', labelKey: 'webhooks-report-off' },
];
Template.webhooksReport.onCreated(function () {
this.rows = new ReactiveVar([]);
this.total = new ReactiveVar(0);
this.page = new ReactiveVar(1);
this.search = new ReactiveVar('');
this.filter = new ReactiveVar(DEFAULT_REPORT_FILTER);
this.load = () => {
Meteor.call('webhooksReportPage', {
filter: this.filter.get(),
search: this.search.get() || '',
limit: PER_PAGE,
skip: (this.page.get() - 1) * PER_PAGE,
}, (error, result) => {
if (error) return;
this.rows.set((result && result.rows) || []);
this.total.set((result && result.total) || 0);
});
};
this.load();
});
Template.webhooksReport.helpers({
// The report still lists them while they are turned off: they are kept.
reportOff() { return webhooksOff(); },
tablePageData() {
const t = Template.instance();
const info = pageInfo(t.total.get(), t.page.get(), PER_PAGE);
const docs = (t.rows.get() || []).map(row => ({
...row,
boardPath: row.boardId ? FlowRouter.path('board', { id: row.boardId, slug: row.boardSlug || 'board' }) : '',
activitiesText: (row.activities || []).join(', '),
createdText: row.createdAt ? formatDateForDisplay(row.createdAt) : '',
}));
return {
descKey: 'webhooks-report-desc',
emptyKey: 'webhooks-report-no-results',
searchTerm: t.search.get(),
filters: buildFilters([{
id: 'webhooks-report-status', labelKey: 'status', current: t.filter.get(), options: FILTER_OPTIONS,
}]),
header: buildHeader(COLUMNS),
rowTemplate: 'webhooksReportRow',
docs,
rowCount: docs.length,
total: t.total.get(),
page: info.page,
totalPages: info.totalPages,
hasPrev: info.hasPrev,
hasNext: info.hasNext,
};
},
});
Template.webhooksReport.events({
'change .js-table-page-filter'(event, tmpl) {
tmpl.filter.set(event.currentTarget.value || DEFAULT_REPORT_FILTER);
tmpl.page.set(1);
tmpl.load();
},
'click .js-table-page-prev'(event, tmpl) {
event.preventDefault();
if (tmpl.page.get() > 1) { tmpl.page.set(tmpl.page.get() - 1); tmpl.load(); }
},
'click .js-table-page-next'(event, tmpl) {
event.preventDefault();
const info = pageInfo(tmpl.total.get(), tmpl.page.get(), PER_PAGE);
if (info.hasNext) { tmpl.page.set(tmpl.page.get() + 1); tmpl.load(); }
},
'keydown .js-table-page-search'(event, tmpl) {
if (event.keyCode === 13 && !event.shiftKey) {
event.preventDefault();
event.stopPropagation();
tmpl.search.set(event.currentTarget.value || '');
tmpl.page.set(1);
tmpl.load();
}
},
});
@@ -0,0 +1,20 @@
/* The Scrum meeting helpers (docs/Features/Scrum/Meetings.md). */
.daily-standup {
min-width: 220px;
}
.daily-standup-speaker {
font-size: 1.4em;
margin: 4px 0;
}
.daily-standup-clock {
font-size: 2em;
font-variant-numeric: tabular-nums;
margin: 4px 0;
}
.daily-standup-clock.is-overtime {
color: #c0392b;
}
.daily-standup-order {
margin-block: 4px;
padding-inline-start: 20px;
}
Loaded 100 of 1466 files, more files were not shown because too many files have changed in this diff. Show more