fix(task-board): don't refire a Jira-synced column's automation when the column didn't change - #6840
Merged
pedrofrxncx merged 1 commit intoSep 1, 2026
Conversation
…the column didn't change
pedrofrxncx
enabled auto-merge (squash)
September 1, 2026 20:50
pedrofrxncx
deleted the
fix/jira-column-automation-same-column-refire-w1
branch
September 1, 2026 20:54
decocms Bot
pushed a commit
that referenced
this pull request
Sep 1, 2026
PR: #6840 fix(task-board): don't refire a Jira-synced column's automation when the column didn't change Bump type: patch - decocms (apps/api/package.json): 4.316.2 -> 4.316.3 - @decocms/native (apps/native/package.json): 4.316.2 -> 4.316.3 Deploy-Scope: server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Source: hardening follow-up to #6800 ("run a column's rule when a card lands there, however it moved") — the fix that landed there for the board's own drag path (
TASK_BOARD_ITEM_UPDATE) was never mirrored onto the Jira sync's leg of the same sharedrunColumnAutomation.Bug: the Jira pull (
apps/api/src/jira/sync.ts) re-fires an issue's landing column's automation onstatusChangedOnJira— i.e. whenever the Jira status literal changed — not on whether the card's board column actually changed. SincestatusMapping(and a mirrored Jira board) can map several distinct Jira statuses onto one board column, an issue flipping between two such statuses (e.g. "In Review (Dev)" → "In Review (QA)") never moves the card's column at all, yet still re-triggersrunColumnAutomation.runColumnAutomationis a no-op on an already-owned card, but a card a prior run un-delegated (a quota rejection, a burned reviewer retry — seeunassignSuperAgent) is unassigned again, so the next same-column Jira ping-pong re-claims it and dispatches a brand-new agent run for a card that, from the board's perspective, never left its column. The web/drag path already guards this exact case withprevious.status !== item.status(update.ts:528-537); the Jira leg had no equivalent.Fix: extracted the guard as a pure, unit-tested predicate
triggersColumnAutomation({ previousStatus, newStatus, isRescan })(same pattern as this file's existingrewritesStatus/rewritesSprint) and used it at the Jira sync'smaybeAutoDelegatecall site, gating on the card's actual board-column transition instead of the raw Jira status diff. The create-path call site is untouched — a brand-new card is a landing by definition.Regression test:
apps/api/src/jira/sync.test.ts— "does not fire when two Jira statuses map onto the same board column" encodes the old (broken) behavior inverted, plus a same-shape positive case and the pre-existing rescan case.To verify:
bun test apps/api/src/jira/sync.test.tsChecks run locally:
bun run fmt,cd apps/api && bunx tsc --noEmit(clean), the targeted test file above (34 pass),bunx oxlint apps/api/src/jira/sync.ts apps/api/src/jira/sync.test.ts(0 warnings/errors). Full CI validates the rest.Summary by cubic
Fixes the Jira sync re-firing a column's automation when the Jira status changed but the card's board column didn't. Multiple Jira statuses can map to one board column, so an issue pinging between two such statuses (e.g. "In Review (Dev)" → "In Review (QA)") previously re-triggered
runColumnAutomation, re-claiming an un-delegated card and dispatching a fresh agent run for a card that never left its column.triggersColumnAutomation({ previousStatus, newStatus, isRescan })predicate, mirroring the web/drag path's existing check.maybeAutoDelegatecall site; the create path is untouched since a new card is a landing by definition.Written for commit 5682aa7. Summary will update on new commits.