Skip to main content

Jira

Integration

JiraService → JiraAdapter → Atlassian REST API v3

Service Layer
JiraService

Business logic
Pagination handling
Response mapping
JQL construction

24 methods
→
Adapter Layer
JiraAdapter

Auth injection
OAuth 2.0 token
API Token (Basic)
Request serialization

startAt / maxResults
→
External API
Atlassian REST API

API version 3
your-domain.atlassian.net
/rest/api/3/
/rest/agile/1.0/

cloud.id + access_token
OAuth 2.0 (Atlassian 3LO)
  1. Redirect → Atlassian authorize
  2. Exchange code for access_token
  3. Fetch accessible cloud resources
  4. Use cloud_id + Bearer token
API Token (Basic Auth)

Base64(email:api_token)
Authorization: Basic …
Direct domain URL
Simpler for server-to-server

What & Why​

Jira is the backbone of engineering project management. The Octopus Jira integration exposes the full surface of Atlassian's REST API v3 — projects, issues, sprints, boards, users, and JQL search — through a single consistent adapter pattern.

The JiraAdapter handles the two dominant auth modes: OAuth 2.0 (Atlassian's three-legged flow that issues per-cloud access tokens) and API Token (Basic Auth with email + token, common for server-side automation). Both modes share the same method signatures so switching auth doesn't change calling code.

Pagination is handled uniformly via Atlassian's startAt / maxResults / total envelope. transition_issue is the key workflow method — it moves an issue through Jira's configured transitions (e.g. Backlog → In Progress → Done) by transition name, without requiring callers to know transition IDs. search_issues accepts raw JQL so any Jira query expressible in the UI is also available to agents.

Issue Lifecycle

Status Transitions via transition_issue

Backlog
→
To Do
→
In Progress
→
In Review
→
Done
transition_issue moves issues along this flow

transition_issue(issue_key="PROJ-123", transition="In Progress")
// Jira resolves transition name → transition ID internally

Blocked / Reopened
Custom transitions per project workflow
Won't Fix / Duplicate
Resolution-based terminal transitions
Sprint transitions
Start / complete sprints update board state

Methods Reference​

All ~24 methods grouped by category. Key params listed for each.

Projects​

MethodDescriptionKey Params
list_projectsList all accessible Jira projectslimit, start_at
get_projectGet full details for a single projectproject_key
create_projectCreate a new Jira projectname, key, project_type, lead_account_id

Issues​

MethodDescriptionKey Params
list_issuesList issues in a project with optional JQL filterproject_key, status, assignee, limit, start_at
get_issueGet full details for a single issueissue_key
create_issueCreate a new issueproject_key, summary, issue_type, description, priority, assignee_id, labels
update_issueUpdate fields on an existing issueissue_key, summary, description, priority, labels
delete_issueDelete an issue permanentlyissue_key
transition_issueMove issue to a new status via workflow transitionissue_key, transition (name)
assign_issueAssign or unassign an issueissue_key, assignee_id
add_commentPost a comment on an issueissue_key, comment
list_commentsList comments on an issue (paginated)issue_key, limit, start_at
get_commentsGet all comments for an issueissue_key
add_attachmentUpload a file attachment to an issueissue_key, file_path, file_name
get_attachmentsList attachments on an issueissue_key

Sprints​

MethodDescriptionKey Params
list_sprintsList sprints for a boardboard_id, state (active/future/closed), limit
get_sprintGet sprint detailssprint_id
create_sprintCreate a new sprint on a boardboard_id, name, start_date, end_date, goal
start_sprintActivate a sprint (moves to active state)sprint_id, start_date, end_date
complete_sprintClose an active sprintsprint_id

Boards​

MethodDescriptionKey Params
list_boardsList all boards accessible to the userlimit, start_at, project_key
get_boardGet board configurationboard_id
get_board_issuesList issues currently on a boardboard_id, sprint_id, limit, start_at

Users​

MethodDescriptionKey Params
list_usersList users in the Atlassian organizationlimit, start_at
get_userGet user by account IDaccount_id
search_usersSearch users by display name or emailquery, limit
MethodDescriptionKey Params
search_issuesRun a JQL query against all accessible issuesjql, limit, start_at, fields

CLI Examples​

# List projects
constellation jira list-projects

# List issues in a project filtered by status
constellation jira list-issues --project PROJ --status "In Progress"

# Create a new bug issue
constellation jira create-issue --project PROJ --summary "Fix login bug" --type Bug --priority High

# Transition an issue to Done
constellation jira transition-issue --issue PROJ-123 --transition "Done"

# Assign an issue to a user
constellation jira assign-issue --issue PROJ-123 --assignee-id abc123def456

# Add a comment to an issue
constellation jira add-comment --issue PROJ-123 --comment "Fixed in branch feature/login-fix"

# Search issues with JQL
constellation jira search-issues --jql "project = PROJ AND sprint in openSprints() AND status = 'In Progress'"

# List sprints for a board
constellation jira list-sprints --board 42 --state active

# Create and start a sprint
constellation jira create-sprint --board 42 --name "Sprint 14" --start-date 2026-05-19 --end-date 2026-06-02
constellation jira start-sprint --sprint 108

# Search users
constellation jira search-users --query "jane.doe"

Auth Setup​

OAuth 2.0 (Atlassian 3LO):

  1. Register an OAuth 2.0 app at developer.atlassian.com
  2. Set redirect URI to your Octopus callback endpoint
  3. Authorize scopes: read:jira-work, write:jira-work, read:jira-user, manage:jira-project
  4. Complete the 3LO flow: /auth/jira/authorize → Atlassian consent → /auth/jira/callback
  5. Octopus stores the access token and cloud ID; all subsequent calls use Bearer auth

API Token (Basic Auth):

  1. Generate an API token at id.atlassian.com/manage-profile/security/api-tokens
  2. Pass credentials in the connection config:
    • base_url: https://your-domain.atlassian.net
    • email: your Atlassian account email
    • api_token: the generated token
  3. Adapter constructs Authorization: Basic base64(email:api_token) on every request