mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
The rules move-card-to-top/bottom (on another board) and link-card-to-another-board actions failed in two ways for boards the rule creator did not own: - The action showed BLANK after creating the rule: the wizard inserted the trigger/action/rule with three optimistic client Collection.insert() calls that landed in minimongo limbo once the wizard subscription stopped (and the client allow/deny rules rejected them outright for non-owner members). These now create the rule through the server rules.createRule method, which keeps the action's own destination boardId. - Execution crashed with a generic Internal Server Error: the destination swimlane fallback dereferenced ._id on a possibly-undefined swimlane titled exactly Default, which does not exist when the destination board's default swimlane was renamed, translated, or the board had no such swimlane. Resolution now uses the board's real default swimlane and a Meteor-free resolver (models/lib/ruleActionResolve.js) that returns empty string instead of throwing. The same guard is applied to the createCard and linkCard actions. Unit tested (positive + negative) in tests/ruleActionResolve.test.cjs. Thanks to DarthKillian and xet7.