fix(ploeg): route ClickUp work by tags and withdraw it when the task closes #170

Merged
ryangr0 merged 1 commit from ryangr0/ploeg-clickup-tags-and-close into development 2026-10-03 11:54:22 +00:00 AGit
Owner

The ClickUp provider dropped tags when it decoded a task, so a fetched
Work Item had no labels. Because the read succeeded, the resolver took the
empty list as authoritative and chose the board default, ignoring a
repo/* tag. ClickUp also normalized every taskStatusUpdated delivery to
an update, so closing a task never withdrew queued work that had not
started, unlike Vikunja.

FetchItem, FetchExecutionItem and BoardStatus now share one task read
that carries the tag names as labels, so routing, operator source checks
and gate tracking see the same tags and apply the Vikunja label rules.
A taskStatusUpdated delivery becomes a closure only when an authoritative
read of the task finds a status of type closed or done; with no API
token, or when the read fails, it stays an update. Closure then follows
the existing policy: unstarted queued work is withdrawn as
withdrawn_closed and started work runs on.

A taskStatusUpdated event becomes a closure only when a fresh task read says closed/done; no token, a failed read or an empty status type stays an update. Archived tasks are not treated as closed. Costs one extra GET per status change.

Verified with mise run verify on the pinned toolchain (all gates passed).

Ticket: https://vikunja.webgrip.dev/tasks/1754

🤖 Generated with Claude Code

The ClickUp provider dropped tags when it decoded a task, so a fetched Work Item had no labels. Because the read succeeded, the resolver took the empty list as authoritative and chose the board default, ignoring a repo/* tag. ClickUp also normalized every taskStatusUpdated delivery to an update, so closing a task never withdrew queued work that had not started, unlike Vikunja. FetchItem, FetchExecutionItem and BoardStatus now share one task read that carries the tag names as labels, so routing, operator source checks and gate tracking see the same tags and apply the Vikunja label rules. A taskStatusUpdated delivery becomes a closure only when an authoritative read of the task finds a status of type closed or done; with no API token, or when the read fails, it stays an update. Closure then follows the existing policy: unstarted queued work is withdrawn as withdrawn_closed and started work runs on. A taskStatusUpdated event becomes a closure only when a fresh task read says closed/done; no token, a failed read or an empty status type stays an update. Archived tasks are not treated as closed. Costs one extra GET per status change. Verified with `mise run verify` on the pinned toolchain (all gates passed). Ticket: https://vikunja.webgrip.dev/tasks/1754 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ploeg): route ClickUp work by tags and withdraw it when the task closes
Some checks failed
[Workflow] On Pull Request / checks (pull_request) Has been cancelled
[Workflow] On Pull Request / warnings (pull_request) Has been cancelled
[Workflow] On Pull Request / release-policy (pull_request) Has been cancelled
0330f0f503
The ClickUp provider dropped tags when it decoded a task, so a fetched
Work Item had no labels. Because the read succeeded, the resolver took the
empty list as authoritative and chose the board default, ignoring a
repo/* tag. ClickUp also normalized every taskStatusUpdated delivery to
an update, so closing a task never withdrew queued work that had not
started, unlike Vikunja.

FetchItem, FetchExecutionItem and BoardStatus now share one task read
that carries the tag names as labels, so routing, operator source checks
and gate tracking see the same tags and apply the Vikunja label rules.
A taskStatusUpdated delivery becomes a closure only when an authoritative
read of the task finds a status of type closed or done; with no API
token, or when the read fails, it stays an update. Closure then follows
the existing policy: unstarted queued work is withdrawn as
withdrawn_closed and started work runs on.

VIK-1754

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ryangr0 merged commit 808cffc10b into development 2026-10-03 11:54:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
webgrip/unfold!170
No description provided.