Skip to content

Migrate board columns to workflow stages#71

Merged
seanogdev merged 2 commits into
masterfrom
migrate-boards-to-workflows
Jun 24, 2026
Merged

Migrate board columns to workflow stages#71
seanogdev merged 2 commits into
masterfrom
migrate-boards-to-workflows

Conversation

@seanogdev

Copy link
Copy Markdown
Contributor

Summary

Teamwork migrated installations to Workflows and retired the Boards endpoints, so the BOARD_COLUMN_* feature no longer works — the API now responds Installation migrated to Workflows, Boards endpoints are now unavailable and the action crashes on the empty payload (jq: error … Cannot iterate over null).

This reinstates the "move the task as the PR moves" behaviour against the v3 Workflows API:

  • Resolve the stage name to its workflowId + stageId in one project-scoped call — GET /projects/api/v3/workflows.json?projectIds=<id>&include=stages — matching on stage name (case-sensitive contains, first match wins, as before).
  • Move the task with PATCH /projects/api/v3/tasks/<taskId>/workflows/<workflowId>.json and body { "stageId": <id>, "positionAfterTask": -1 } (the same call the Go SDK's WorkflowStageTaskMove makes).
  • The new jq is null-guarded, so a project with no matching stage logs and skips instead of crashing.

Inputs

BOARD_COLUMN_OPENED / _MERGED / _CLOSED are renamed to WORKFLOW_STAGE_OPENED / _MERGED / _CLOSED. The old names still work as silent fallback aliases, so existing configs keep functioning.

Closes #68

Test Task

Teamwork retired the Boards endpoints after migrating installations to
Workflows, so the BOARD_COLUMN_* feature broke with "Boards endpoints are
now unavailable, please use Workflows endpoints" (#68).

Resolve the configured stage name to its workflow + stage IDs in a single
v3 call (GET /projects/api/v3/workflows.json?projectIds=&include=stages),
then move the task with PATCH /projects/api/v3/tasks/{id}/workflows/{wf}.json.
The null-guarded jq also fixes the "Cannot iterate over null" crash.

Rename the BOARD_COLUMN_* inputs to WORKFLOW_STAGE_*, keeping the old names
as silent fallback aliases.
@seanogdev seanogdev requested a review from a team as a code owner June 24, 2026 20:19
@seanogdev seanogdev requested a review from rafaeljusto June 24, 2026 20:24
@seanogdev seanogdev merged commit d0317cd into master Jun 24, 2026
2 checks passed
@seanogdev seanogdev deleted the migrate-boards-to-workflows branch June 24, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is this action still supported?

2 participants