Commit Graph
161 Commits
Author SHA1 Message Date
Lauri Ojansivu a6b10e3592 Dark themes: the quiet greys, Card Settings, popups and sidebars are readable again.
The accessibility audit made the quiet text greys dark for every theme, and
old rules never followed the dark themes: Card Settings drew white text on
light grey blocks, popup items, the sidebar's shortcuts row, quiet buttons and
sidebar labels were black on dark, and an !important list header beat each
theme's own. The quiet text is a variable with a light value on the dark
surfaces; Card Settings' sections, popup items and the other rules follow the
theme. axe-core finds no colour contrast failure in cleandark, moderndark, dark
and exodark on the board, sidebar, Card Settings, an opened card and the custom
fields popup.

Thanks to Samunosuke and xet7 !

Fixes #6863,
2026-11-03 11:41:58 +02:00
Lauri Ojansivu c8bcc4817d Accessibility: fix the findings of the axe-core audit in the default theme.
The default theme's blue is #2573a7, so the header's white and #f2f2f2 text
passes WCAG AA; label colours, quiet greys and grey tiles have text that
passes too. The Starred menu, the user menu and initials avatars carry their
visible text in their accessible name. The card's Pomodoro field and the
comment and description editors have a name. A card section heading is an h3
holding a real button with aria-expanded, and its menu and layout toggle sit
beside it. The sign-in form is the main landmark with a level-one title, every
page has a level-one heading, and the shortcuts list is reachable by keyboard.

After the fixes axe-core finds no violation on 22 pages. Spec 45 runs the scan
and tests/accessibilityAuditFixes.test.cjs pins each fault by its shape.

Thanks to xet7 !
2026-11-02 16:08:32 +02:00
Lauri Ojansivu 34d9817110 Rules page: Back to the board.
The Rules page lost its Back with its own sidebar; only the trigger, action
and rule details pages kept one, to the rules list, so the way back to the
board was the Board View menu. The rules list and its Workflow, Bots,
Blocks and History views now have a Back link to the board at the top. The
three sub-pages keep their own Back and show no second one.

Thanks to mimZD and xet7 !

Fixes #6852.
2026-11-02 00:07:42 +02:00
Lauri Ojansivu 2211b24119 Rule suggestions from what people on a board keep doing by hand.
Board menu -> Rules shows Suggested rules above the rule list: when the
same person does one thing to a card and, within two minutes, another, that
pair is counted once per card, and a pair seen on three cards in the last 30
days is offered as a rule (moved to a list -> label, member or archive;
added to a list -> label or member; label added -> member). A pair a rule
already does is not offered. Create goes through rules.createRule with the
same trigger and action the wizard builds; Dismiss hides one suggestion for
that admin on that board (profile.dismissedRuleSuggestions).

Only board admins get suggestions, and Admin Panel / Settings / Visibility /
Features has a Rule suggestions tick that turns them off, on the server too.
Translated in every language.

Thanks to xet7 !
2026-10-17 14:42:59 +03:00
Lauri Ojansivu b7589737f5 File docs/Features the way the WeKan menus are.
A feature's guide now sits under the menu it is used from, read from the
templates rather than from where somebody once put it: Header-Bar,
All-Boards, Pages, Board-Header (search and every Board View), Board-Sidebar
(Board Settings, Filter, Members, Labels, Archive), Rules, Swimlanes, Lists,
Cards, Member-Settings, Admin-Panel and Login-Page. Topics used from several
menus (editor, history, theme, translations, email, troubleshooting) are in
General.

- Each area has a README mapping its menu entries to their guides and to the
  template or server module that implements them. Board-Header/README.md
  lists all 40 Board View entries with the template boardBody.jade renders;
  five views (Table, Calendar Mode, Time, Timeline, Map) have no guide of
  their own yet and say so.
- Board-View.md listed 25 views while BOARD_VIEWS has 40; it now lists all
  of them with their English labels.
- Pages keep their file names. Where a released changelog links an old path,
  a "# Moved" page stays there and points to the new one; test-menu.sh skips
  folders holding only those.
- Undo was filed under Login; it is General/Undo now.
- Every link in docs, code comments, scripts and tests follows the move;
  docsLinksResolve checks them all.

Tests that read a doc follow it to its new place. boardViewSettings now fails
when Board-View.md or Board-Header/README.md differs from BOARD_VIEWS, or
names a template boardBody.jade does not render.

Thanks to xet7 !
2026-10-16 23:45:35 +03:00
Lauri Ojansivu 75e260966b Rule emails: pick board members for To from a list with autocomplete.
The send-email action gets a member picker under To: typing filters the
board's active members by user name or full name, and a pick adds
@username to To. Addresses are still typed into To as before. When the
rule runs, each @username becomes that member's current email address,
so the rule - and whoever edits it - holds a user name, never somebody's
address, and a member who changes address is still reached. A @name of
somebody who is not an active member of the board, or has no address, is
dropped rather than sent as text, and nobody is mailed twice.

models/lib/ruleEmailMembers.js holds the parsing, the choices and the
expansion; tests/ruleEmailMembers.test.cjs covers them, non-members,
duplicates, an address with @ inside, and that the picker never reads an
email address. rulesHelper imports it, so the ruleEmailFailure harness,
which runs rulesHelper without require, is given it as it is given
ruleParts. The new strings are English placeholders until the next
translation pass.

Thanks to chenghongxi and xet7 !

Fixes #2435.
2026-10-14 14:30:10 +03:00
Lauri Ojansivu f4a3690256 Rules can be shown to board members, read-only, when the Admin Panel allows it.
Admin Panel / Settings / Visibility / Rules gets "Boards may show their
Rules to members, read-only", off by default (Settings
rulesReadOnlyForMembers, site admin only). With it on, a board admin ticks
"Show these Rules to board members, read-only" on the board's Rules page
(rulesVisibleToMembers). Members of that board then get Rules in Board
Settings and see the rules list and each rule's details, with no control
that changes a rule; the methods that change rules keep their board-admin
checks, so nothing is granted. Without both ticks only board and site
admins see the Rules page, which until now drew its list for any member
who opened the address.

models/lib/rulesReadOnly.js decides 'edit', 'read' or 'none', and
client/lib/rulesAccess.js is the one place the Rules page, Board Settings
and rule details ask. tests/rulesReadOnly.test.cjs covers both switches,
each alone, a non-member, and that a reader's page has no edit control.
boardMenuOrder now leaves the reader's alternative branch out of the
admin's sequence and pins it alone; instanceFeatures counts the fourth
site-admin method; roleHelperRegressions follows the canAdmin check to
rulesAccess.js. The new strings are English placeholders until the next
translation pass.

Thanks to justinr1234 and xet7 !

Fixes #2217.
2026-10-14 14:23:31 +03:00
Lauri Ojansivu aa48a2b71d Board Settings / Bots: hand cards to external runners, as kanbots does.
Board Settings -> Bots, below Workflow view, is the Rules page's view for
bots: runners on your own server - an AI agent, a CI job, a script - that
the board hands cards to. It is laid out like kanbots in the board's own
theme, Font Awesome and drag and drop: a rail of bots, live runs and
activity; the board's lists as columns, each card with its run's state
(Queued, Running, Waiting for you, Ready to review, Done, Failed, Stopped),
the step it is on and the answers to a question it asked; and a drawer with
the card's thread, Hand to bot, Stop and a reply box. Board admins only,
like the rest of the Rules page, and never a board or public view.

A bot has no rights of its own, like Rules and workflows. WeKan only sends
to it: a bot is an outgoing webhook marked as a bot, subscribed to no board
activity and no reminders, and a dispatch goes through the ordinary webhook
queue - the SSRF guard, its signing token, retries, Sandstorm's Powerbox.
The runner works on the board through WeKan's REST API with its own user's
token and board role, and reports its run at one REST route that needs
write access to the board. Handing over is a board admin's choice, in the
view or with the new Rule action "Hand the card to bot"; an answer or a
reply is the admin's own comment, under their right to comment.

The GitHub- and Gitea-compatible APIs' routes are regular expression
literals now, and an instance board is Trello's "org" level.

The new strings are translated in every locale.

Thanks to xet7 !
2026-10-14 13:39:18 +03:00
Lauri Ojansivu 935e68dfdd GitHub organization import: repositories, issues, releases, Actions, wiki.
Import -> GitHub -> Import a whole GitHub organization makes every
repository of an organization or user its own board, opening in Board View
/ Version Control. Issues go through the ordinary importBoard, as the person
who started the job, with their comments, labels and files. Releases are
cards in a Releases list, their files attached only when chosen. Each
.github/workflows file becomes Rules. The wiki is read from its git
repository with isomorphic-git (1.42.4, pinned), every request through the
SSRF guard and only to github.com: a page is a card in the Wiki list, its
[[links]] point at and are attached to the linked pages' cards, and each
commit that changed it is a dated edit in the card's history, so Restore
brings back an older version. The job shows progress, can be cancelled,
pauses on a restart and stops at a rate limit; the token is kept in memory
only.

Version Control gains Releases and Wiki tabs: the wiki as GitHub shows it,
with the page list, _Sidebar and _Footer, links that stay in the tab, and
each page's history with Restore.

GitHub Actions workflows map to Rules: issue events to triggers, label,
close, reopen, comment, assign and create steps to actions, actions/stale to
an aging rule. Code - builds, tests, scripts - is never run: such a workflow
is a disabled rule with its YAML as the description. WeKan's Rules gain what
they lacked for it: a "commented on" trigger, an "add comment" action written
as the person whose change ran the rule and only where they may comment,
cron schedules in UTC, and a rule description shown on the rule. A disabled
rule no longer fires on a schedule or from its button, which it did.

The new strings are translated in every locale.

Thanks to xet7 !
2026-10-14 12:43:36 +03:00
Lauri Ojansivu 548834c4ee Fix five role helpers that answered the same for everybody.
Found while mapping every role check for custom board roles:
- canImportIntoBoard tested the role helpers as references
  (`!user.isWorker`, always false), so Import was offered to nobody; it
  asks the write capability now, as the server does.
- the rules list's canAdmin used `user.isBoardAdmin` without calling it,
  so every member saw the rule controls.
- the role popup's isLastAdmin compared activeAdmins() - a list - with 1,
  so the last admin was never stopped from giving the role away.
- the members widget's isWorker called Boards.hasWorker, which is not a
  collection function.
- OIDC's DEFAULT_BOARD_ID used Array#contains, which does not exist, so
  the configured role flags threw; isCommentOnly works next to the
  documented isCommentsOnly spelling.

tests/roleHelperRegressions.test.cjs pins each, and fails for any role
helper tested as a bare reference anywhere in client/, models/ and
packages/, and for a list compared with a number.

Thanks to xet7 !
2026-10-14 08:22:12 +03:00
Lauri Ojansivu 7858d84e12 Import and export many boards at once for every format, and document each format in its own directory.
Import many boards: on the import page of every source, several export
files, or one .zip holding them, each become their own board through the
same path a single import of that file takes, and the page lists what each
file became (models/lib/importManyFiles.js). A .zip that is itself one
export (Vikunja, Notion, Plane, WeKan with attachments) stays one board.
One board per project: for the generalized importer, each swimlane the
import would make - a project, folder or list of the tool - becomes its own
board (models/lib/importSplit.js), so an export of a whole app imports as
many boards, as a Trello .zip does. Kanri's all-data export now reads every
board, not only the first, so it splits into one board per Kanri board.

Export all boards: All Boards sidebar, or Multi-Selection for the selected
boards, downloads every board the user may export in one format, each
checked as its own export is. Excel is one workbook with a sheet per board,
named after the board; every other format is a .zip with one file per board
(server/routes/exportAllBoards.js). The per-format bytes are made in one
place, server/lib/renderExternalExport.js, for the board route and this.

A WeKan .zip export imports as a new board from All Boards, unpacked on the
server with its attachments (it was refused in the browser). api.py gains
importboardsfrom and exportallboards, sends every source in the shape the
import page sends, and fetches Excel, PDF, CSV and TSV exports from their
own routes and writes them as bytes.

Fixed while documenting: a Trello Butler rule's list name kept its case,
so the rule fires; the HTML export fetches the board JSON by URL instead of
a link the export popup no longer has; Tasks.org exports time spent;
Nextcloud Deck's done flag marks the due date done.

docs/Features/ImportExport has a directory per format with the steps to
import and export it, one board and many, and its details, moved from
Format-Coverage.md, which is now the index and the shared contract.
tests/importExportDocsCoverage.test.cjs fails when a format has no page.

Thanks to xet7 !
2026-10-09 10:33:37 +03:00
Lauri Ojansivu a78b4aa744 Export Wrike Excel with Wrike's custom workflow statuses, and import and export Wrike workflows as lists and rules.
The Wrike Excel export wrote the WeKan list as a custom column named WeKan
list, which Wrike reads as a custom field rather than a status. It now
writes the five workflow columns of Wrike's import help article: Default
task workflow on folder rows, and on task rows Workflow (named after the
board), Status (the list's status group) and Custom Status (the list).
Wrike applies a custom status only when that workflow exists, matching
case, so the board's lists are also exported as that workflow: the JSON of
Wrike's GET /workflows, one custom status per list with the nearest Wrike
color. That JSON is the only exchange format, since Wrike has no file
import or export of workflows.

A list's status group comes from the board's rules. A "moved to this list,
mark complete" rule makes it Completed (Cancelled when its name says so), a
"mark incomplete" rule makes it Active (or Deferred), otherwise the name
decides. In Rules > Import / Export, a pasted Wrike workflow adds a list for
each status the board lacks, after the previous status's list, and adds the
rules that do what Wrike's status groups do. Those rules show in the list,
Workflow and Blocks views. A server method does this as a board admin and
adds nothing twice. Wrike's own automation rules have no export, import or
API, so they cannot be carried over.

The Wrike import reads Custom Status as the list and a single Workflow as
the board title. It reports a status group the status name does not imply,
since only the workflow import's rules keep it.

tests/wrikeWorkflow.test.cjs and tests/wrikeFormat.test.cjs cover the
workflow, rules, colors, refusals and round trips. Two new Playwright cases
import a workbook with the workflow columns and apply a Wrike workflow
through the Rules popup twice, and the export audit fetches the workflow.
New text is in English, pending Transifex.

Thanks to xet7 !
2026-10-09 09:48:47 +03:00
Lauri Ojansivu eac524380f Add rule triggers for a card moved forward or back.
The reporter puts a card at the bottom of the next list when it moves on and
at the top when it moves back. With only "moved to" and "moved from" a list
triggers, that needs a rule for every pair of lists. "A card is moved forward
to a later list" and "moved back to an earlier list" now fire on any move
between two lists of the board, compared by the lists' order rather than by
the screen, so they also work in right-to-left languages. They are matched
on the rule's own board, like the other trigger kinds
(models/lib/ruleMoveDirection.js).

tests/ruleMoveDirection.test.cjs covers the directions and what has none; a
Playwright case moves cards both ways through the REST API. The RepointBleed
guard counts the new matching path. New text is in English, pending
Transifex.

Thanks to rlach and xet7 !

Fixes #2076.
2026-10-08 12:25:29 +03:00
Lauri Ojansivu f735eba194 Rules: assignee actions, an optional title, and remove-all members that removes them.
#4294 asked for four things. Several triggers and actions, rule variables,
renaming in place and rule import/export were built earlier; two parts were
still missing.

- "I want the assignee to be the creator of the card by default": rules had
  member actions only. Add and Remove assignee actions take a username, a
  {creator}/{assignees}/{members} token, the user who triggered the rule, or
  "*" for every assignee, and write card.assignees. They are durable through
  Sync like the member actions, with the joinAssignee/unjoinAssignee
  activities the assignees hook writes.
- "give a Rule a default name": Add Rule with an empty title showed an
  error, and rules.createRule stored the literal "Rule". The title is now
  optional; the rule is named after its trigger and action ("When ...,
  then ..."), and the rules list renames it in place.

Fixing this found that "Remove all members from the card" iterated the
card's assignees while removing from its members: an earlier fix believed
assignMember wrote assignees, but both definitions in models/cards.js write
members. It removed only members who were also assignees. Remove-all now
iterates card.members, in the ordinary and the durable path, and the guards
that pinned the wrong collection now read models/cards.js to decide.

New text is added in English, pending Transifex.

Thanks to xeruf and xet7 !

Fixes #4294.
2026-10-08 11:31:12 +03:00
Lauri Ojansivu 2c16c3f173 Show the Rules list selection checkboxes, so Select all / Unselect all visibly work.
The Select all / Unselect all handlers did set the selection, and each
row's checkbox followed it, but the checkboxes were never on screen:
forms.css hides every native checkbox app-wide (display: none,
visibility: hidden, position: absolute and a -9999px offset), and the
rules list used native ones with nothing undoing that. So the buttons
changed invisible state, and no rule could be ticked by hand for Delete
selected / Export selected either.

rules.css now undoes all parts of that rule for .js-rule-select, with a
selector that outranks [type="checkbox"]:checked, and the checkbox is
labelled with its rule's title. tests/rulesSelectAllCheckboxes.test.cjs
runs the select-all / unselect-all / single-toggle logic with several
rules, pins the override, and as the negative test checks that no native
checkbox under client/components/rules is left hidden. Playwright spec
44-rules checks the boxes are visible and follow both buttons.

Thanks to titver968 and xet7 !

Fixes #6749,
2026-10-07 17:05:36 +03:00
Lauri Ojansivu 1ad558f371 Rules: let the "Set color to" action pick colors other than green.
The swatch click handler of the rule action color popup read the color
from Template.currentData(). Inside a Blaze event handler that is the data
of the template the handler is defined on - the popup, opened with the
cardActions context { ruleName, triggerVar, ruleId } - not the clicked
swatch, so every click set the selection to undefined and the action could
only ever be saved with the "green" default. The handler now reads the
swatch's own data with Blaze.getData(event.currentTarget), like the card,
list and swimlane color popups, and ignores anything that is not a card
color. The Save button is type="button" so it cannot submit the form.

Tests: tests/ruleSetColorActionPicker.test.cjs drives the real handlers
with Blaze event semantics (every color is selectable and saved, a click
without a valid color keeps the selection, nothing applies without Save)
and scans every palette click handler under client/ so none takes its
color from Template.currentData() first; a Playwright spec picks red in
the Rules editor and checks the stored action.

Thanks to titver968 and xet7 !

Fixes #6748,
2026-10-07 17:04:32 +03:00
Lauri Ojansivu 8d30e4fdbc Give Board Settings / Card rows to what the card and minicard drew without one.
The card color, the parent card path and prefix, the linked card
indicator, the rule card buttons, the description badge and the unread
comments marker were drawn with no Board Settings / Card row, so a board
could not turn them off. Each has a row now, with a card and a minicard
side. Where something was drawn before it stays on; the description
badge on the card, the card buttons on the minicard and the unread
marker on the card are new and off until chosen. The minicard's card
buttons read the board's rules from one board-level subscription, taken
only while that side is on, and run a rule without opening the card.

Not given rows, by decision: the archived banner and the upload progress
are status, not options; week-of-year is the user's own Member Settings
preference; card aging has its own board setting. The new labels are in
English, pending Transifex.

Thanks to xet7 !
2026-10-02 16:45:01 +03:00
Lauri Ojansivu 40a4d9b171 Give the Rules page the board's right sidebar instead of its own.
The Rules page had a separate right sidebar holding only Back and its
views (List view, Workflow view, Blocks, History, Import / Export
rules). It now uses the board's own sidebar, like the board: the same
views are in its Board Settings under Rules, and choosing one there
while on the Rules page closes the sidebar so the view is not left
under it. The separate sidebar and its template are removed.

Its Back button went with it, so picking a view in the Board View menu
while on the Rules page now goes back to the board, asking first before
unsaved Blocks work would be lost.

Source tests pin the Rules route to the board sidebar, the absence of
the old controls, the way back and the Board Settings entries' existing
translated labels. The Rules browser specs open views through Board
Settings; a member who is not a board admin is not offered them there,
and the Blocks view still refuses such a member. The Rules and Board
Settings specs pass in Chromium and WebKit.

Thanks to xet7 !
2026-09-30 09:29:46 +03:00
Lauri Ojansivu b4217f962d Put the Rules views under Rules in Board Settings.
Board Settings now lists the Rules page's own views directly under
Rules - List view, Workflow view, Blocks, History and Import / Export
rules - so the one wanted is a click away instead of Rules first and
then its page sidebar. Each opens the Rules page in that view, asking
first before unsaved Blocks work would be lost, as the Rules page
sidebar does; Import / Export rules opens its popup from the menu. They
share Rules' board-admin guard. A divider now separates that group from
Change Color.

The Import / Export entry reads "Import / Export rules" in Board
Settings and in the Rules page sidebar, using the popup's own title key,
which is already translated in 234 locales, so no new text is added.

The menu order test pins the new first group, its divider, the guards,
the handlers and the label keys; a Playwright case checks the order and
that Workflow, History and Import / Export rules open what they say, in
Chromium and WebKit. The Board Settings and Rules docs follow.

Thanks to xet7 !
2026-09-30 08:42:47 +03:00
Lauri Ojansivu 7c11276028 Repair update hooks, UI layouts and EVERYTHING test harness
Keep trusted card snapshots intact after checking caller field permissions.
Restore custom-field activities, History and Sync updates; fix popup layouts,
textarea rule descriptions, WebKit date resets and mobile Rules mail rows.

Align Meteor versions, make image fixtures portable, configure local SMTP
for both test server modes, and bridge Docker Desktop database and SMTP
connections. Stabilize paginated, lazy-loading and security test fixtures.

Focused Node and Chromium, WebKit and Docker Firefox regressions pass.
The full Node rerun still reports translation completeness failures.

Thanks to xet7 !
2026-09-30 01:16:12 +03:00
Lauri Ojansivu 0bc06c801b Pick rule variables from a list instead of typing them.
The trigger and action editors have an "Insert variable" list with the
card's people, card, list and board names and one {customField:Name} per
custom field of the board. Picking one inserts it at the caret of the text
field last focused. Admin-only fields are not offered, since rules do not
read them, and neither is a name the token syntax cannot spell.

Thanks to chessboards and xet7 !

Fixes #3195.
2026-09-29 18:45:10 +03:00
Lauri Ojansivu b1dbea2152 Accept rule variables in trigger values.
A trigger's list, swimlane, title, checklist and user fields may now use the
variables actions already resolve - {creator}, {assignees}, {members},
{customField:Name} and the rest - read from the card when the rule is
checked: "when a card is moved to the list named in its {customField:Stage}".
Such a value never equals what an activity carries, so the rule engine now
also fetches this board's triggers that hold a token and resolves them; every
other field keeps the ordinary exact-or-wildcard rule. People tokens match any
one of the named users, "by {assignees}" is kept as typed and compared by
username, and an unknown token stays literal. The editor explains this in a
new hint, English pending Transifex.

Thanks to xet7 !
2026-09-29 16:09:49 +03:00
Lauri Ojansivu 69eeb00c84 Let a rule have several triggers (any fires it) and several actions (in order).
Maintainer decision for #4294 and #2953: a rule keeps its own trigger and
action and may add up to ten more of each. It fires when any of its
triggers fires - once per activity, even when several match - and runs its
actions in order, its own first. Rule details lists the extra parts with
Add another trigger / Add another action and Remove; the new
rules.addPart/removePart methods keep the board-admin and cross-board
destination checks of rules.createRule and refuse a button as an extra
trigger.

Ordinary, scheduled and button rules, the durable Sync rule plan, rule
History (snapshot, part edits and restore), deletion, board copy, WeKan
export/import, the rules JSON export/import, the REST representation and
the admin rules report all handle every part. Two rule-engine test
harnesses now receive the new helpers they evaluate.

New strings are in en.i18n.json, pending translation.

Thanks to xet7 !

Fixes #2953,
2026-09-29 14:34:18 +03:00
Lauri Ojansivu 0f8d35fe72 Let scheduled rule triggers watch a card's start date.
#4278 asks for rule reminders to assigned people when a card is due,
overdue or starting. Scheduled due triggers existed; the trigger form now
chooses Due Date or Start, so a rule can fire when a card starts within N
days or should have started N days ago. With {assignees} in the email
recipient the reminder goes to the card's assignees. The date filter is a
pure module with unit tests; triggers saved before keep the due date.

Thanks to xet7 !

Fixes #4278,
2026-09-29 14:10:38 +03:00
Lauri Ojansivu a918559939 Resolve people and custom-field variables in rule action values.
Maintainer decision: rule actions reuse the email {token} syntax.
{creator}, {assignees} and {members} name the triggering card's people -
usernames in text, email addresses in the send-email recipient, where
entries without an address are dropped - and {customField:Name} reads the
displayed value of a custom field, excluding admin-only fields. Member
actions accept a token that names several people and act on each; list and
swimlane names of move actions are resolved too. Literal values behave
exactly as before and unknown tokens stay literal.

The email action shows the new tokens in a second hint, English pending
Transifex.

Thanks to xet7 !
2026-09-29 14:02:14 +03:00
Lauri Ojansivu c06b429765 Include authorized card details in rule emails
Render dates, placement, labels, people, custom-field display values, notes and readable relationships behind an opt-in Details checkbox. Recheck source and related access, admin-only field policy and field definitions; do not serialize account secrets or stale linked-source snapshots.

Thirty-six Node suites and two local SMTP browser scenarios pass. Linked-source details and specialized fields remain open under #2713.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 19:44:33 +03:00
Lauri Ojansivu 05080fc02e Include checklists and public comments in rule emails
Offer an independent opt-in choice, render checklist completion and chronological comments, exclude deleted or foreign content and private webhook state, and recheck access after child reads. Bound output without silent truncation.

Verify 35 Node suites and two local SMTP browser scenarios, including disabling the option. Other card metadata remains open under #2713.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 19:39:51 +03:00
Lauri Ojansivu 846f190690 Send authorized card attachments with email rules
Add an opt-in native checkbox, read live triggering-card files through the storage strategy, recheck source access and attachment metadata after reads, and preserve byte snapshots through email localization and transport.

Verify filesystem and GridFS MIME delivery with local SMTP capture, soft deletion, missing-file failures, keyboard selection, permission changes and durable attachment integrity. Full card-content rendering remains open in #2713.

Thanks to kabi178, bbyszio and xet7 !
2026-09-28 19:35:19 +03:00
Lauri Ojansivu 998b96bf91 Add authorized Copy Card rule actions with destination pickers
Reuse ordinary card copying, preserve the source, validate destination placement and current write access, and stop recursive copy chains while allowing independent events.

Verify automatic and manual copies, checklists and comments, revoked access, forged destinations and same-board recursion in Chromium. All 29 rule Node suites pass.

Thanks to javen9881, phaseshift3r, gugmt15 and xet7 !

Fixes #4160,
Fixes #3235,
2026-09-28 19:25:40 +03:00
Lauri Ojansivu d273b86ed5 Add editable Blockly rules with local translated message catalogs
Lazy-load Blockly for board administrators, preserve existing rule documents and execution, and provide direct List, Workflow, Blocks and History choices. Route workflow writes through server methods. Include local media, complete message-key coverage, translation merging and placeholder checks.

Translation coverage remains incomplete in additional locales. Low-confidence specialist terminology needs native review in Aragonese, Asturian, Corsican, Neapolitan, Occitan, Sardinian, Sicilian, Kashubian, Upper Sorbian, Silesian, Cornish, Manx, Gaelic and Breton; Faroese and Frisian also merit review.

Verified five Blockly/catalog Node tests, existing rules suites and four Blockly Chromium scenarios, including admin permissions, localization, drag editing and persisted execution.

Thanks to xet7 !
2026-09-27 17:07:02 +03:00
Lauri Ojansivu 0a8334ef17 Keep rules forms and workflow controls visible across layouts
Wrap long text and buttons, remove overlapping absolute positioning, and keep form controls readable on mobile, RTL and dark themes. Four Chromium scenarios cover desktop and mobile layout boundaries.

Thanks to xet7 !
2026-09-27 17:06:01 +03:00
Lauri Ojansivu 88e234f05f Make text editors multiline and resizable with consistent Enter and theme behavior
Honor Submit editors with Enter across textarea editors, retain composition and mention handling, and route shortcuts through existing scoped save actions. Preserve manual resize dimensions after typing and retain single-line structured fields.

Keep the typography reset from overriding themed button foregrounds, including Board Settings column actions. Verify blue, green, dark and Clean Light buttons and chart actions.

Thanks to xet7.
2026-09-27 13:45:41 +03:00
Lauri Ojansivu 896f1222bd Implement audited board usability and accessibility fixes.
Repair relative ordering and destination dialog lifecycles, retain failed operations, and make checklist, rule and attachment controls keyboard accessible. Improve scaled layouts and reuse canonical translated labels.

Add source-execution and Chromium/Firefox regression coverage, including awaiting background persistence before reload. Record implementation decisions and validation limits.

Thanks to xet7 !
2026-09-19 14:00:48 +03:00
Lauri Ojansivu cff1fdc323 Apply Basque named subject order to the assignee rule control 2026-09-14 22:29:50 +03:00
Lauri Ojansivu 1e44111837 Order Basque named rule subjects before their final demonstrative 2026-09-14 19:02:40 +03:00
Lauri Ojansivu bc26fa8904 Repair Galician attachment trigger agreement
Use masculine attachment-specific action labels while preserving feminine shared labels for other subjects. Reuse existing action translations in other locales. Replace Portuguese attachment/card fragments in the Galician regional locale.

Retain three correct original Galician fragments with their contextual explanation. Verify correction and review ledgers, all-locale label reuse, member agreement and real Jade compilation. Browser regression is added and syntax-checked; live browser and whole-language review remain open.
2026-09-14 16:34:35 +03:00
Lauri Ojansivu afbff51dfb Repair Basque trigger linking-verb composition
Replace Spanish es with native Basque da and omit the separate linking verb in Basque trigger templates whose action labels already contain the temporal verb clause. Preserve other locales and language switching. Add positive, negative, helper-runtime and browser regression coverage. Node and Jade checks pass; browser execution and full Basque fluency review remain open.

Thanks to xet7.
2026-09-14 16:25:20 +03:00
Lauri Ojansivu 5057a0a2c1 Add member-selected calendars and accessible date and time controls
Apply the selected calendar to shared date displays, calendar month views and date inputs. Provide mouse and keyboard date navigation and hour/minute selection while preserving native date storage. Document the supported offline calendars and add display, picker and browser regressions.

Thanks to mimZD and xet7 !
2026-09-12 21:01:41 +03:00
Lauri Ojansivu ad3554bbcc Show the Rules Workflow view when it is selected from another tab.
Reported directly, with screenshots: on Board Settings / Rules, clicking
"Workflow view" in the page sidebar changed the button's label to "List
view" but the page kept showing the "Add trigger" tab - the workflow
builder never appeared.

rulesMain.jade renders +rulesWorkflow only while its rulesCurrentTab
ReactiveVar is 'rulesList'. The toggle lives in rulesControls, a separate
template in the page sidebar with no handle on the rulesMain instance, so
it only flips Session 'rulesViewMode'; from the Add trigger / Add action /
rule details tabs that changed nothing visible. rulesMain now owns an
autorun that brings the page back to the list tab whenever the workflow
view is selected - the one place the tab state can be changed from.

tests/rulesWorkflowViewToggle.test.cjs pins it.

Thanks to xet7 !
2026-09-11 11:00:23 +03:00
Lauri Ojansivu 952679f9c3 CHANGELOG: close the list/swimlane link issue (#1089).
Thanks to xet7 and xet7 !

Fixes #1089,
2026-09-10 21:01:12 +03:00
Lauri Ojansivu b420341719 Add a "card title/description contains {value}" rule trigger.
#2194 asked for a text-search rule condition combinable with other
triggers. WeKan's rules stay single-trigger/single-condition today -
combining several conditions in one rule with AND was already looked
at and explicitly deferred by #4294 (see TODO Later) - so this adds
ONE new standalone trigger type instead: "when a card's title or
description contains {value}", the same scope-down the #3092
advanced-filter trigger used.

A new pure module, models/lib/ruleTextContainsMatch.js, does a
case-insensitive substring test against a card's title/description;
server/rulesHelper.js (already wired to import and call it) evaluates
it the same way it already evaluates the advanced-filter trigger, on
card creation and the a-changedTitle/a-changedDescription activities.
This commit adds the missing pieces to complete that wiring: the pure
module itself, the card-triggers Add Rule UI row (cardTriggers.jade/
.js) with its text input, and tests/rulesTextContainsTrigger.test.cjs
pinning the match function, the trigger registration, the
rulesHelper.js wiring, the UI wiring and the i18n keys.

Thanks to sfahrenholz and xet7 !

Closes #2194,
2026-09-10 21:00:23 +03:00
Lauri Ojansivu 6f79e87914 Add the missing acting-user module and UI button for rule "add member" (#2522).
The "add member" rule action's acting-user option (issue #2522 - "add
whoever just moved the card as a member") landed on main missing its
shared module: server/rulesHelper.js and cardActions.js already import
RULE_ACTING_USER_SENTINEL/resolveActingUserId from
/models/lib/ruleActingUser, but that file was never committed, breaking
the import on main. It also landed without the actual UI button that
saves the sentinel action.

models/lib/ruleActingUser.js resolves "who triggered this rule" from
activity.userId - the exact same source buildRuleVars() already uses for
the {username} template variable (#3304/#3301) - so both call one shared
function instead of two implementations of the same concept.
cardActions.jade gets the missing trigger button, wired to the existing
js-add-actinguser-member-action handler in cardActions.js.

tests/ruleAddMemberActingUser.test.cjs pins the sentinel resolution, that
rulesHelper.js and buildRuleVars() both call the one shared resolver (with
a negative, whole-tree source-pattern check that no other file
re-implements the same activity.userId shape), that the ordinary
fixed-member path is unaffected, the client/jade wiring, and that every
locale file has a real (non-English-placeholder) translation of the new
label. tests/ruleRemoveMemberAction.test.cjs and
tests/rulesApiTriggerNormalize.test.cjs are updated for the addMember
block's new if/else shape around the sentinel check.

Thanks to arisjr and xet7 !

Closes #2522,
2026-09-10 20:46:04 +03:00
Lauri Ojansivu b8a6de1c89 Let a rule's trigger/action be edited in place, and email the card's description too.
#2713 asked for two things.

Editing a rule used to mean delete it and rebuild it from scratch, losing
its position and its identity. rulesList's rule row gets a second "Edit
trigger/action" button next to the existing title-rename pencil, opening
the same trigger/action wizard used to create a rule (rulesMain.js /
rulesTriggers / rulesActions and the board/card/checklist/mail action
templates), pre-filled with the rule's current title. A new server method,
rules.updateRule (server/rulesButton.js), mirrors rules.createRule's
authorization and cross-board destination checks but REPLACES the existing
trigger/action documents in place (full-document update by their existing
_id, not remove+insert), so the rule keeps its own _id, and its trigger/
action keep theirs, across an edit. Every action-template click handler
that used to call rules.createRule or insert Triggers/Actions/Rules
directly now goes through one shared helper,
client/components/rules/rulesSaveHelper.js, which picks create vs. update
based on whether the wizard was opened to edit an existing rule.

The "send an email" rule action already appended the card's title and a
link to it automatically (#3301), even when the user's own template used
none of the {card}/{cardLink} tokens; it did not do the same for the card's
description. server/rulesHelper.js now appends "Description: ..." to the
footer alongside the existing title/link lines, using the vars.description
value buildRuleVars already computed.

Actually attaching the card's FILE ATTACHMENTS to the outgoing email is
deferred - see CHANGELOG TODO Later. Every WeKan email today goes through
either Meteor's `Email.sendAsync`/`EmailLocalization.sendEmail`, which take
{ to, from, subject, text }, with no `attachments` parameter anywhere in
this codebase's call sites; wiring a real file through would need the
mailer wrapper itself to grow attachment support and code to read the file
back out of whichever storage backend (local disk / GridFS / S3) holds it,
which is mailer-level scope well past this rule action.

tests/ruleUpdateInPlace.test.cjs pins rules.updateRule's authorization,
its RuleBleed cross-board guard, and - the part that actually makes it an
edit rather than a second create - that it keeps the rule/trigger/action
_ids stable, including a logic-level round trip against a small in-memory
mock proving a changed actionType does not leave the old type's fields
behind. tests/ruleEmailIncludesDescription.test.cjs pins the new
description line, guarded the same way the existing title/link lines are
(only appended when non-empty).
tests/ruleCardActionSchema.test.cjs (#6630's guard, that desc lives on the
Action document and never leaks onto the Rule document) is updated for the
new saveRuleTriggerAction call shape.

Thanks to kabi178 and xet7 !
2026-09-10 20:38:21 +03:00
Lauri Ojansivu 16c8f425d0 Let a rule's trigger/action be edited in place, and email the card's description too.
#2713 asked for two things.

Editing a rule used to mean delete it and rebuild it from scratch, losing
its position and its identity. rulesList's rule row gets a second "Edit
trigger/action" button next to the existing title-rename pencil, opening
the same trigger/action wizard used to create a rule (rulesMain.js /
rulesTriggers / rulesActions and the board/card/checklist/mail action
templates), pre-filled with the rule's current title. A new server method,
rules.updateRule (server/rulesButton.js), mirrors rules.createRule's
authorization and cross-board destination checks but REPLACES the existing
trigger/action documents in place (full-document update by their existing
_id, not remove+insert), so the rule keeps its own _id, and its trigger/
action keep theirs, across an edit. Every action-template click handler
that used to call rules.createRule or insert Triggers/Actions/Rules
directly now goes through one shared helper,
client/components/rules/rulesSaveHelper.js, which picks create vs. update
based on whether the wizard was opened to edit an existing rule.

The "send an email" rule action already appended the card's title and a
link to it automatically (#3301), even when the user's own template used
none of the {card}/{cardLink} tokens; it did not do the same for the card's
description. server/rulesHelper.js now appends "Description: ..." to the
footer alongside the existing title/link lines, using the vars.description
value buildRuleVars already computed.

Actually attaching the card's FILE ATTACHMENTS to the outgoing email is
deferred - see CHANGELOG TODO Later. Every WeKan email today goes through
either Meteor's `Email.sendAsync`/`EmailLocalization.sendEmail`, which take
{ to, from, subject, text }, with no `attachments` parameter anywhere in
this codebase's call sites; wiring a real file through would need the
mailer wrapper itself to grow attachment support and code to read the file
back out of whichever storage backend (local disk / GridFS / S3) holds it,
which is mailer-level scope well past this rule action.

tests/ruleUpdateInPlace.test.cjs pins rules.updateRule's authorization,
its RuleBleed cross-board guard, and - the part that actually makes it an
edit rather than a second create - that it keeps the rule/trigger/action
_ids stable, including a logic-level round trip against a small in-memory
mock proving a changed actionType does not leave the old type's fields
behind. tests/ruleEmailIncludesDescription.test.cjs pins the new
description line, guarded the same way the existing title/line lines are
(only appended when non-empty).
tests/ruleCardActionSchema.test.cjs (#6630's guard, that desc lives on the
Action document and never leaks onto the Rule document) is updated for the
new saveRuleTriggerAction call shape.

Thanks to jvavassori and xet7 !
2026-09-10 20:37:56 +03:00
Lauri Ojansivu 4eb54caca8 CHANGELOG: global admin board takeover, and #3249's other three asks.
Thanks to relikd and xet7 !
2026-09-10 20:05:47 +03:00
Lauri Ojansivu e643f0da71 Add a direct card link and {card}/{cardLink}/{list}/{board}/{member}
template tokens to the Rules "send an email" action.

The "send an email" rule action sent a bare message with no reference to
the card that triggered it - no title, no link, and no way to pull in the
list, board or triggering member. performAction() already builds a
ruleVars map and substituteVars() already replaces {name} tokens in email
subject/body (added for #2475), so this extends that existing mechanism
rather than building a new one:

- {cardLink} resolves via Card.absoluteUrl() (models/lib/cardUrl.js), the
  same helper card activity notification emails already use, so no new
  URL-building code is needed.
- {member} resolves the activity's memberId (the member added/removed/
  etc.) falling back to the acting user when the activity records none.
- {card}/{list}/{board} are short aliases of the existing cardname/
  listname/boardname/username variables, documented next to the email
  fields via a new r-email-vars-hint hint text so the tokens are
  discoverable without external docs.
- Independently of any template the user configures, the card's title and
  link are now always appended to the sent email body, so #3301's core ask
  (a direct link to the card) holds even for a rule someone set up before
  this change with no tokens at all.

substituteVars() moves out of server/rulesHelper.js into a new pure
models/lib/ruleVarsSubstitute.js so it can be unit tested directly, the
way models/lib/cardUrl.js next to it already is; tests/ruleEmailVars.test.cjs
covers token substitution (including case-insensitivity, unknown tokens
left as literal text, and malformed braces not being mistaken for tokens),
the automatic card-link footer, and that the new hint text is present and
translated.

Thanks to vossilius and ivan-paleo and xet7 !

Closes #3304,
Closes #3301,
2026-09-10 20:02:54 +03:00
Lauri Ojansivu 1c97bbac85 Add a "Remove all labels" rule action.
WeKan's IFTTT-style Rules already had per-label "add label X" / "remove
label X" card actions (models/cards.js addLabel/removeLabel, wired in
server/rulesHelper.js and the label dropdown in
client/components/rules/actions/cardActions.jade/.js). Removing every
label from a card required one "remove label" action per label.

Card.removeAllLabels() sets labelIds to an empty array in one update
(a card with no labels is a no-op), and a new "Remove all labels" rule
action (actionType 'removeAllLabels', no label-selection sub-field)
calls it from a new dropdown entry next to the existing label actions,
mirroring the existing "Remove all members" action's wiring.

Thanks to Southclaws and xet7 !

Closes #3432,
2026-09-10 19:59:11 +03:00
Lauri Ojansivu 52972b3e4c Add Admin Panel setting to restrict board creation to admins only.
Admin Panel -> Settings -> Visibility gets a new checkbox beside "Public
boards": "Only admins can create boards"
(tableVisibilityMode-boardCreationAdminOnly, off by default). It follows
the exact TableVisibilityModeSettings pattern its sibling
tableVisibilityMode-allowPrivateOnly already uses: a collection doc seeded
in server/models/collectionBootstrap.js, a jade checkbox and reactive
helper in settingBody.jade/js, and a write in the section's own Save
handler.

The real enforcement is server-side: createBoardWithInitialSwimlanes
(server/models/boards.js) now rejects the call with a not-authorized error
when the setting is on and the caller is not isAdmin === true, before the
board is ever inserted. The client mirrors this only as a convenience - a
new client/lib/boardCreationAllowed.js helper hides the top-bar "+" (header
header.js/.jade) and the All Boards "Add board" tile (boardsList.js) for a
restricted non-admin, but nothing depends on that for security.

A full per-user allow/deny override was left out of this pass: it would
need is own schema field, a People/Admin Panel UI to flip it per account,
and server enforcement layered under the global toggle, which is a larger
change than this issue's "let an admin forbid board creation instance-wide"
core request. The global toggle covers that request cleanly on its own.

Added imports/i18n/data/en.i18n.json's board-creation-admin-only string and
a direct translation (no external translation API) in all other locale
files, in en.i18n.json's key order. tests/boardCreationAdminOnly.test.cjs
pins the default-off setting, the checkbox/handler wiring, the server-side
admin check (and that it runs before the insert), the shared client helper,
the i18n key placement, and - as a negative test - that no OTHER
Boards.insertAsync call site was silently added outside the two already
known and deliberately ungated ones (the per-user Templates container and
createBoardFromCard).

Thanks to belf88 and xet7 !

Closes #4475,
2026-09-10 19:45:52 +03:00
Lauri Ojansivu 828fc2d718 Revert Legacy HTML4 browser interface and parity changes
Remove the progressive HTML4/Legacy Omi middleware, cookieless sessions, page controllers, assets, parity refactors, design documents and associated tests. Restore the standard Meteor interface and operations from before the HTML4 work began.

Preserve intervening translations, backup screenshots, session upgrades, cryptographic test identifiers, local image storage, document previews and lazy browser loading. Extract the GIF utilities still required by image features into imageGif.

Validate the Node suites and add standard-interface and GIF regressions. Two existing failures remain in docsLinksResolve and ruleDetailsLocalization; browser regressions are registered but require a running server.

Thanks to xet7 !
2026-09-07 17:03:59 +03:00
Lauri Ojansivu ba2bb4af53 Add accessible external rules import 2026-09-07 03:34:26 +03:00