Skip to content

Issue Commands - Manage the Bitbucket Issue Tracker

Manage issues in a repository’s built-in issue tracker — list, view, create, edit, close, and comment, mirroring the ergonomics of gh issue.

Issue commands operate at repository scope. Run them inside a cloned Bitbucket repository, or pass -w, --workspace <workspace> and -r, --repo <repo> explicitly.

Global options available on all issue commands: --json [fields], --jq <expression>, --no-color, --no-unicode, --no-truncate, --locale <locale>, -w, --workspace, -r, --repo. See Global flags for the full list. The per-command tables below list only command-specific options.


List issues. By default only “open-ish” issues are shown (states new and open), sorted most recently updated first.

Terminal window
bb issue list [options]
Option Description
--state <state> Filter by exact state: submitted, new, open, resolved, on-hold, invalid, duplicate, wontfix, or closed
--kind <kind> Filter by kind: bug, enhancement, proposal, or task
--assignee <username> Filter by assignee username
--reporter <username> Filter by reporter username
--query <q> Raw Bitbucket q filter expression (escape hatch)
--limit <number> Maximum number of issues (default: 25)
--all List all issues (overrides --limit)
Terminal window
bb issue list
bb issue list --state resolved
bb issue list --kind bug --assignee some.user
bb issue list --limit 50
# Raw q escape hatch (replaces the default state filter)
bb issue list --query 'priority="blocker" AND state!="closed"'
# Project to specific fields (returns a flat array)
bb issue list --json id,title,state
# Filter with built-in --jq — ids of critical issues
bb issue list --json --jq '.issues[] | select(.priority == "critical") | .id'
  • Filter composition: without --state or --query the command filters on (state="new" OR state="open"). An explicit --state matches exactly (the CLI’s on-hold maps to the API’s "on hold"). --kind, --assignee, and --reporter clauses are AND-ed on.
  • --query grouping: the expression replaces the default state filter. It is wrapped in parentheses and placed first in the AND-ed clause list, so a top-level OR inside it stays correctly grouped against --kind/--assignee/--reporter. The composed expression comes back as filters.q in --json output.
  • JSON envelope: { workspace, repoSlug, filters, count, issues }, where filters echoes the active flags plus the effective q expression.
  • TITLE is truncated to 50 characters in the table; pass the global --no-truncate for full titles (--json always carries the full value). UPDATED is formatted with --locale/BB_LOCALE, falling back to the system locale and then en-US.
  • --limit is enforced across paginated responses; a hint shows when results were capped (suppressed with --json).

View the full details of a single issue.

Terminal window
bb issue view <id> [options]
Argument Description
id Issue ID (e.g. 42)
Terminal window
bb issue view 42
# Print just the state, for a CI guard
bb issue view 42 --json --jq '.issue.state'
  • Human output shows the id, title, state, kind, priority, reporter, assignee, created/updated dates, votes, the issue body, and the web URL.
  • JSON envelope: { workspace, repoSlug, issue }.
  • A 404 is reported as Issue #<id> not found in <workspace>/<repo>., with a reminder that a disabled issue tracker 404s identically.

Create an issue.

Terminal window
bb issue create --title <title> [options]
Option Description
-t, --title <title> Issue title (required)
-b, --body <text> Issue description (Markdown)
-F, --body-file <file> Read the description from a file (mutually exclusive with --body)
--kind <kind> bug, enhancement, proposal, or task
--priority <priority> trivial, minor, major, critical, or blocker
--assignee <username> Assign the issue to a user
Terminal window
bb issue create --title "Crash on login"
bb issue create --title "Crash on login" --kind bug --priority major --assignee some.user
bb issue create --title "RFC: new API" --body-file ./rfc.md
# Capture the new issue id in a script
bb issue create --title "Crash on login" --json --jq '.issue.id'
  • On success the new issue number and its web URL are printed.
  • JSON envelope: { workspace, repoSlug, issue } with the created issue.
  • A 404 here means the issue tracker is disabled (see the note at the top of this page).

Edit an issue. At least one change flag is required.

Terminal window
bb issue edit <id> [options]
Argument Description
id Issue ID (e.g. 42)
Option Description
-t, --title <title> New title
-b, --body <text> New description (replaces the existing body)
--kind <kind> New kind
--priority <priority> New priority
--assignee <username> Reassign to a user
--state <state> New state (on-hold for the API’s "on hold")
Terminal window
bb issue edit 42 --title "Crash on login (Safari only)"
bb issue edit 42 --state on-hold --priority critical
# Confirm the reassignment landed
bb issue edit 42 --assignee some.user --json --jq '.issue.assignee.display_name'
  • Only the flags you pass are changed; everything else is left untouched.
  • JSON envelope: { workspace, repoSlug, issue } with the updated issue.

Close an issue — sugar for bb issue edit <id> --state closed, optionally posting a comment first.

Terminal window
bb issue close <id> [options]
Argument Description
id Issue ID (e.g. 42)
Option Description
-c, --comment <text> Post this comment before closing
Terminal window
bb issue close 42
bb issue close 42 --comment "Fixed in 1.4.2"
# Verify the new state
bb issue close 42 --json --jq '.issue.state'
  • With --comment, the comment is posted before the state change so it lands while the issue is still open.
  • JSON envelope: { workspace, repoSlug, issue } with the closed issue.

Add a comment to an issue.

Terminal window
bb issue comment <id> --body <text>
Argument Description
id Issue ID (e.g. 42)
Option Description
-b, --body <text> Comment text in Markdown (required)
Terminal window
bb issue comment 42 --body "Reproduced on main"
# Capture the new comment id
bb issue comment 42 --body "Reproduced on main" --json --jq '.comment.id'
  • JSON envelope: { workspace, repoSlug, comment } with the created comment.