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.
bb issue list
Section titled “bb issue list”List issues. By default only “open-ish” issues are shown (states new and
open), sorted most recently updated first.
bb issue list [options]Options
Section titled “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) |
Examples
Section titled “Examples”bb issue listbb issue list --state resolvedbb issue list --kind bug --assignee some.userbb 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 issuesbb issue list --json --jq '.issues[] | select(.priority == "critical") | .id'- Filter composition: without
--stateor--querythe command filters on(state="new" OR state="open"). An explicit--statematches exactly (the CLI’son-holdmaps to the API’s"on hold").--kind,--assignee, and--reporterclauses are AND-ed on. --querygrouping: the expression replaces the default state filter. It is wrapped in parentheses and placed first in the AND-ed clause list, so a top-levelORinside it stays correctly grouped against--kind/--assignee/--reporter. The composed expression comes back asfilters.qin--jsonoutput.- JSON envelope:
{ workspace, repoSlug, filters, count, issues }, wherefiltersechoes the active flags plus the effectiveqexpression. - TITLE is truncated to 50 characters in the table; pass the global
--no-truncatefor full titles (--jsonalways carries the full value). UPDATED is formatted with--locale/BB_LOCALE, falling back to the system locale and thenen-US. --limitis enforced across paginated responses; a hint shows when results were capped (suppressed with--json).
bb issue view
Section titled “bb issue view”View the full details of a single issue.
bb issue view <id> [options]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
id |
Issue ID (e.g. 42) |
Examples
Section titled “Examples”bb issue view 42
# Print just the state, for a CI guardbb 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
404is reported asIssue #<id> not found in <workspace>/<repo>., with a reminder that a disabled issue tracker 404s identically.
bb issue create
Section titled “bb issue create”Create an issue.
bb issue create --title <title> [options]Options
Section titled “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 |
Examples
Section titled “Examples”bb issue create --title "Crash on login"bb issue create --title "Crash on login" --kind bug --priority major --assignee some.userbb issue create --title "RFC: new API" --body-file ./rfc.md
# Capture the new issue id in a scriptbb 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
404here means the issue tracker is disabled (see the note at the top of this page).
bb issue edit
Section titled “bb issue edit”Edit an issue. At least one change flag is required.
bb issue edit <id> [options]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
id |
Issue ID (e.g. 42) |
Options
Section titled “Options”| 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") |
Examples
Section titled “Examples”bb issue edit 42 --title "Crash on login (Safari only)"bb issue edit 42 --state on-hold --priority critical
# Confirm the reassignment landedbb 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.
bb issue close
Section titled “bb issue close”Close an issue — sugar for bb issue edit <id> --state closed, optionally
posting a comment first.
bb issue close <id> [options]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
id |
Issue ID (e.g. 42) |
Options
Section titled “Options”| Option | Description |
|---|---|
-c, --comment <text> |
Post this comment before closing |
Examples
Section titled “Examples”bb issue close 42bb issue close 42 --comment "Fixed in 1.4.2"
# Verify the new statebb 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.
bb issue comment
Section titled “bb issue comment”Add a comment to an issue.
bb issue comment <id> --body <text>Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
id |
Issue ID (e.g. 42) |
Options
Section titled “Options”| Option | Description |
|---|---|
-b, --body <text> |
Comment text in Markdown (required) |
Examples
Section titled “Examples”bb issue comment 42 --body "Reproduced on main"
# Capture the new comment idbb issue comment 42 --body "Reproduced on main" --json --jq '.comment.id'- JSON envelope:
{ workspace, repoSlug, comment }with the created comment.