The ordinary rule engine reads the card by id for every action, so the
actions after a move to another board act on the card there. The
durable commands that can do the same now find the card where a saved
move of the same plan put it, and record their writes, History rows and
activities on that board: card fields, checklist toggles, adding and
removing checklists, linking, and the title variables of a new card or
swimlane. A copy refuses, as the ordinary copy does. A move to another
board is no longer required to be the plan's last action. It is lifted
when every action that can follow it in a plan, in its own rule or in a
rule of the same trigger type, is one of these. Moves, sorting and
moving all cards are resolved against the board the card left, and
archiving cascades to child cards there, so with any of those the board
keeps direct Sync.
Thanks to xet7 !
checkAll, uncheckAll, checkItem and uncheckItem join the durable rule
actions. The command is captured with performAction's own lookups - the
checklist by title on the card, the items in the order ReactiveCache returns
them, the bulk selection, and checkItem's item query as it is - so a replay
acts on the same items with the same outcome, including the ordinary
action's no-ops.
The ordinary action writes each item in turn, and the checklist item hooks
record on every write, changed or not: uncompleteChecklist before it when
the whole checklist was finished, checkedItem or uncheckedItem after it, and
completeChecklist when the whole checklist is finished - plus a History row
on the item when isFinished changed. The command simulates exactly that on
the captured items and saves one unit per item. The runner goes item by item:
the before-write activity, the conditional write with the item's three hooks
deferred, its History, its after-write activities - each delivered durably -
so a rule triggered by one item runs before the next, as ordinarily.
The History planner now accepts checklist-item rows (entity and card kept
apart), and the recording deferral can name one checklist item. Unit tests
cover the hook sequence for check-all, uncheck-all and hidden-all lists,
no-ops and tampering; a full-app test runs a "check every item" rule through
the stored rule stage - two checkedItem, one completeChecklist, two History
rows, and nothing more on replay. 566 server tests pass.
Thanks to xet7 !