Update a Linear ticket status — move to In Progress, In Review, or Done. Use when ticket status changes.
Level: L0 — Sequential checklist execution
Update a Linear ticket's workflow state. Use this when a ticket moves through the lifecycle: Backlog, Todo, In Progress, In Review, Done, or Canceled.
BSW-123).backlog → Backlogtodo → Todoin-progress or in_progress or started → In Progressin-review or in_review or review → In Reviewdone or closed or complete → Donecanceled or cancelled → CanceledUsage: /update-ticket BSW-123 in-progress
Available statuses: backlog, todo, in-progress, in-review, done, canceled
LINEAR_API_KEY environment variable is set:
test -n "$LINEAR_API_KEY" && echo "OK" || echo "MISSING"
curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $LINEAR_API_KEY" \
-d '{"query": "{ issue(id: \"BSW-123\") { id identifier title state { id name } url } }"}'
id), current state name, and current state ID.curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $LINEAR_API_KEY" \
-d '{"query": "{ team(id: \"186fc3de-4e72-479f-a1ef-cddb3e7f6df9\") { states { nodes { id name type } } } }"}'
name field).Present the change to the user:
## Status Update
- Ticket: BSW-123 — Fix NullPointerException in InvoiceService
- Current status: Todo
- New status: In Progress
Proceed? (Yes / Cancel)
Wait for confirmation. If the user cancels, stop without making changes.
curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $LINEAR_API_KEY" \
-d '{"query": "mutation { issueUpdate(id: \"ISSUE_UUID\", input: { stateId: \"TARGET_STATE_ID\" }) { success issue { identifier title state { name } url } } }"}'
success field in the response.## Ticket Updated
- Ticket: BSW-123 — Fix NullPointerException in InvoiceService
- Previous status: Todo
- New status: In Progress
- URL: https://linear.app/botree-software/issue/BSW-123
If moving to Done, add a suggestion:
Tip: Make sure all tests pass before closing. Run `/test` to verify, then `/close` for the full workflow.
If moving to In Review, add a suggestion:
Tip: Run `/review` to check your changes, then `/pr` to create a pull request.
| Failure | Detection | Response |
|---|---|---|
| LINEAR_API_KEY not set | Environment variable is empty or unset | Report: "LINEAR_API_KEY is not set. Export it and try again." Stop. |
| Ticket not found | API returns null for the issue query | Report: "Ticket BSW-### not found in Linear. Check the identifier." Stop. |
| Invalid status name | Target status does not match any accepted value | Report: "Unknown status '{input}'. Available: backlog, todo, in-progress, in-review, done, canceled." Stop. |
| Already in target status | Current state matches target state | Report: "BSW-### is already in {status}. No change needed." Stop. |
| API error | Non-200 response or errors array in response | Report the error message from Linear. Suggest checking the API key. |
| Network error | curl times out or cannot connect | Report: "Cannot reach Linear API. Check your internet connection." Stop. |
| Mutation fails | success field is false in mutation response | Report: "Failed to update ticket. Linear returned an error." Include error details if available. |
/test firstAfter /update-ticket completes:
/ticket or /fix to start working/review then /pr to create a pull request/sprint to see overall progress