jira
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseJira with orbit CLI
使用orbit CLI管理Jira
Manage Jira issues, epics, sprints, boards, projects, releases, custom fields, screens, statuses, and issue types using the CLI. Supports both Jira Cloud (REST API v3) and Jira Server/Data Center (REST API v2) with multi-profile support and 1Password secret resolution.
orbit通过 CLI管理Jira的issues、epics、sprints、看板、项目、发布版本、自定义字段、屏幕、状态和问题类型。支持Jira Cloud(REST API v3)和Jira Server/数据中心(REST API v2),具备多profile支持和1Password密钥自动解析功能。
orbitPrerequisites
前提条件
- binary built and accessible
orbit - A profile with a or
jira-cloudservice configured injira-onprem~/.config/orbit/config.yaml - Valid credentials — API token for Cloud (basic auth with email + token), PAT for Server
- Credentials can be stored in 1Password with prefix for automatic resolution
op://
- 二进制文件已编译且可访问
orbit - 在中配置了带有
~/.config/orbit/config.yaml或jira-cloud服务的profilejira-onprem - 有效的凭据——Cloud版本使用API令牌(邮箱+令牌的基础认证),Server版本使用PAT
- 凭据可存储在1Password中,使用前缀可自动解析
op://
Quick Reference
快速参考
All commands follow the pattern:
orbit -p <profile> jira <resource> <action> [flags]The flag controls output format: (default), , .
-otablejsonyamlFor full command details and flags, see .
For Jira wiki markup formatting (Server only), see .
references/commands.mdreferences/wiki-markup.md所有命令遵循以下格式:
orbit -p <profile> jira <resource> <action> [flags]-otablejsonyaml如需完整命令详情和标志说明,请查看。
如需Jira wiki markup格式说明(仅Server版本),请查看。
references/commands.mdreferences/wiki-markup.mdCore Workflows
核心工作流
Creating Issues
创建Issues
bash
undefinedbash
undefinedSimple story
创建简单的Story
orbit -p myprofile jira issue create --project PROJ --type Story --summary "Add login page"
orbit -p myprofile jira issue create --project PROJ --type Story --summary "添加登录页面"
Bug with priority and assignment
创建带优先级和分配人的Bug
orbit -p myprofile jira issue create --project PROJ --type Bug
--summary "Fix timeout" --priority High --assignee john.doe
--summary "Fix timeout" --priority High --assignee john.doe
orbit -p myprofile jira issue create --project PROJ --type Bug
--summary "修复超时问题" --priority High --assignee john.doe
--summary "修复超时问题" --priority High --assignee john.doe
Sub-task under a parent
创建隶属于父级的子任务
orbit -p myprofile jira issue create --project PROJ --type Sub-task
--parent PROJ-123 --summary "Add validation"
--parent PROJ-123 --summary "Add validation"
undefinedorbit -p myprofile jira issue create --project PROJ --type Sub-task
--parent PROJ-123 --summary "添加验证功能"
--parent PROJ-123 --summary "添加验证功能"
undefinedCreating Epics
创建Epics
Epics require the "Epic Name" custom field. The CLI auto-sets this from the summary when is used. Use to override.
orbit--type Epic--epic-namebash
undefinedEpics需要“Epic Name”自定义字段。当使用时, CLI会自动从summary中设置该字段。可使用覆盖默认值。
--type Epicorbit--epic-namebash
undefinedCreate an epic (Epic Name auto-set from summary)
创建Epic(Epic Name自动从summary获取)
orbit -p myprofile jira issue create --type Epic --project PROJ
--summary "Q1 Auth Revamp" --priority Highest
--summary "Q1 Auth Revamp" --priority Highest
orbit -p myprofile jira issue create --type Epic --project PROJ
--summary "Q1认证体系重构" --priority Highest
--summary "Q1认证体系重构" --priority Highest
Create epic with Parent Link to a Capability/Initiative
创建带有父级链接(关联Capability/Initiative)的Epic
orbit -p myprofile jira issue create --type Epic --project PROJ
--summary "Okta Authentication Foundation"
--field "customfield_27521=PRT-4378"
--priority Highest
--summary "Okta Authentication Foundation"
--field "customfield_27521=PRT-4378"
--priority Highest
The `--field` flag sets arbitrary custom fields as `key=value`. Use `jira field list` to discover field IDs.orbit -p myprofile jira issue create --type Epic --project PROJ
--summary "Okta认证基础架构"
--field "customfield_27521=PRT-4378"
--priority Highest
--summary "Okta认证基础架构"
--field "customfield_27521=PRT-4378"
--priority Highest
`--field`标志用于设置任意自定义字段,格式为`key=value`。可使用`jira field list`命令查看字段ID。Editing Issues with Formatted Descriptions
编辑带有格式化描述的Issues
Jira Server uses wiki markup, not Markdown. Jira Cloud uses ADF (handled automatically by orbit for plain text). Always format values using wiki markup syntax for Server instances.
--bodybash
orbit -p myprofile jira issue edit PRT-123 --body "h2. Value Statement
The platform provides real authentication via Okta.
h2. User Stories
* *Story 1:* As a platform admin, I want all API requests to require a valid Okta JWT.
** Okta custom AS configured with epsilon_claims claim
** AUTH_BYPASS removed from all Terraform task definitions"Jira Server使用wiki markup而非Markdown。Jira Cloud使用ADF格式(orbit会自动处理纯文本内容)。对于Server实例,务必使用wiki markup语法格式化参数的值。
--bodybash
orbit -p myprofile jira issue edit PRT-123 --body "h2. 价值声明
该平台通过Okta提供真实的认证服务。
h2. 用户故事
* *故事1:* 作为平台管理员,我希望所有API请求都需要有效的Okta JWT。
** 已配置带有epsilon_claims声明的Okta自定义AS
** 已从所有Terraform任务定义中移除AUTH_BYPASS"Editing Custom Field Values
编辑自定义字段值
The flag supports multiple value formats. The correct format depends on the Jira field type:
-Fbash
undefined-Fbash
undefinedSingle-select field — use value: shorthand
单选字段——使用value:简写格式
orbit -p myprofile jira issue edit PROJ-123 -F customfield_10397=value:Yes
orbit -p myprofile jira issue edit PROJ-123 -F customfield_10397=value:Yes
Multi-select field — MUST use JSON array of objects (value: shorthand will return 400)
多选字段——必须使用JSON对象数组格式(使用value:简写会返回400错误)
orbit -p myprofile jira issue edit PROJ-123 -F 'customfield_10398=[{"value":"Developer"},{"value":"QA"}]'
orbit -p myprofile jira issue edit PROJ-123 -F 'customfield_10398=[{"value":"Developer"},{"value":"QA"}]'
Multi-select with a single value still needs array format
单个值的多选字段仍需使用数组格式
orbit -p myprofile jira issue edit PROJ-123 -F 'customfield_10400=[{"value":"Confirmed"}]'
orbit -p myprofile jira issue edit PROJ-123 -F 'customfield_10400=[{"value":"Confirmed"}]'
Number field
数字字段
orbit -p myprofile jira issue edit PROJ-123 -F customfield_10399=3
orbit -p myprofile jira issue edit PROJ-123 -F customfield_10399=3
Plain string field
纯字符串字段
orbit -p myprofile jira issue edit PROJ-123 -F customfield_10010=my-value
**Important**: Multi-select fields (checkboxes, multi-select dropdowns) require `[{"value":"X"}]` array format. Using `value:X` on a multi-select field returns a 400 error.orbit -p myprofile jira issue edit PROJ-123 -F customfield_10010=my-value
**重要提示**:多选字段(复选框、多选下拉框)需要使用`[{"value":"X"}]`数组格式。对多选字段使用`value:X`格式会返回400错误。Transitioning Issues
转换Issues状态
bash
undefinedbash
undefinedMove to In Progress
移至“进行中”状态
orbit -p myprofile jira issue move PROJ-123 "In Progress"
orbit -p myprofile jira issue move PROJ-123 "In Progress"
Close with comment and resolution
关闭Issue并添加评论和解决结果
orbit -p myprofile jira issue move PROJ-123 Done --comment "Fixed in v2.1" --resolution Fixed
undefinedorbit -p myprofile jira issue move PROJ-123 Done --comment "已在v2.1版本修复" --resolution Fixed
undefinedSearching Issues
搜索Issues
bash
undefinedbash
undefinedFilter by project and type
按项目和类型筛选
orbit -p myprofile jira issue list --project PROJ --type Epic
orbit -p myprofile jira issue list --project PROJ --type Epic
Filter by assignee and status
按经办人状态筛选
orbit -p myprofile jira issue list --assignee me --status "In Progress"
orbit -p myprofile jira issue list --assignee me --status "In Progress"
Raw JQL query
原始JQL查询
orbit -p myprofile jira issue list --jql "project = PROJ AND sprint in openSprints()"
orbit -p myprofile jira issue list --jql "project = PROJ AND sprint in openSprints()"
JSON output for processing
输出JSON格式以便后续处理
orbit -p myprofile jira issue list --project PROJ -o json
undefinedorbit -p myprofile jira issue list --project PROJ -o json
undefinedField Management (Cloud Only)
字段管理(仅Cloud版本)
Manage custom fields, their contexts, and options programmatically.
以编程方式管理自定义字段、字段上下文和选项。
Listing Fields
列出字段
bash
undefinedbash
undefinedList all fields
列出所有字段
orbit -p myprofile jira field list
orbit -p myprofile jira field list
List only custom fields
仅列出自定义字段
orbit -p myprofile jira field list --custom
orbit -p myprofile jira field list --custom
Filter by name or ID
按名称或ID筛选
orbit -p myprofile jira field list --filter "AI"
undefinedorbit -p myprofile jira field list --filter "AI"
undefinedCreating Custom Fields
创建自定义字段
bash
undefinedbash
undefinedCreate a select field (shorthand types: select, multiselect, number, checkbox, text, textarea)
创建单选字段(简写类型:select、multiselect、number、checkbox、text、textarea)
orbit -p myprofile jira field create --name "AI Assisted" --type select
--description "Was AI used on this ticket?"
--description "Was AI used on this ticket?"
orbit -p myprofile jira field create --name "AI辅助标识" --type select
--description "此工单是否使用了AI?"
--description "此工单是否使用了AI?"
Create a number field
创建数字字段
orbit -p myprofile jira field create --name "AI Prompt Iterations" --type number
--description "How many prompt cycles to get working output"
--description "How many prompt cycles to get working output"
orbit -p myprofile jira field create --name "AI提示迭代次数" --type number
--description "获得可用输出所需的提示循环次数"
--description "获得可用输出所需的提示循环次数"
Create a checkbox field
创建复选框字段
orbit -p myprofile jira field create --name "Human Review Confirmed" --type checkbox
--description "Engineer confirms AI output was reviewed"
--description "Engineer confirms AI output was reviewed"
undefinedorbit -p myprofile jira field create --name "人工审核确认" --type checkbox
--description "工程师确认已审核AI输出"
--description "工程师确认已审核AI输出"
undefinedManaging Field Contexts and Options
管理字段上下文和选项
bash
undefinedbash
undefinedList field contexts
列出字段上下文
orbit -p myprofile jira field context-list customfield_10397
orbit -p myprofile jira field context-list customfield_10397
List existing options
列出现有选项
orbit -p myprofile jira field option-list customfield_10397 10817
orbit -p myprofile jira field option-list customfield_10397 10817
Add options to a select/multiselect field
为单选/多选字段添加选项
orbit -p myprofile jira field option-add customfield_10397 10817
--values "Yes,No,Partial"
--values "Yes,No,Partial"
undefinedorbit -p myprofile jira field option-add customfield_10397 10817
--values "Yes,No,Partial"
--values "Yes,No,Partial"
undefinedScreen Management
屏幕管理
Control which fields appear on issue create/edit/view forms by managing screen tabs and field assignments.
通过管理屏幕标签页和字段分配,控制在创建/编辑/查看Issue的表单中显示哪些字段。
Listing Screens and Tabs
列出屏幕和标签页
bash
undefinedbash
undefinedList all screens
列出所有屏幕
orbit -p myprofile jira screen list
orbit -p myprofile jira screen list
Filter screens by name
按名称筛选屏幕
orbit -p myprofile jira screen list --filter "PYMT"
orbit -p myprofile jira screen list --filter "PYMT"
List tabs on a screen
列出屏幕的标签页
orbit -p myprofile jira screen tab-list 10089
orbit -p myprofile jira screen tab-list 10089
List fields on a screen tab
列出屏幕标签页上的字段
orbit -p myprofile jira screen field-list 10089 10189
undefinedorbit -p myprofile jira screen field-list 10089 10189
undefinedCreating Tabs
创建标签页
bash
undefinedbash
undefinedCreate a new tab to group related fields
创建新标签页以分组相关字段
orbit -p myprofile jira screen tab-create 10089 "AI Workflow"
undefinedorbit -p myprofile jira screen tab-create 10089 "AI工作流"
undefinedAdding and Removing Fields
添加和移除字段
bash
undefinedbash
undefinedAdd fields to a screen tab
向屏幕标签页添加字段
orbit -p myprofile jira screen field-add 10089 10868
--fields "customfield_10397,customfield_10398,customfield_10399"
--fields "customfield_10397,customfield_10398,customfield_10399"
orbit -p myprofile jira screen field-add 10089 10868
--fields "customfield_10397,customfield_10398,customfield_10399"
--fields "customfield_10397,customfield_10398,customfield_10399"
Remove fields from a screen tab
从屏幕标签页移除字段
orbit -p myprofile jira screen field-remove 10089 10189
--fields "customfield_10397,customfield_10398"
--fields "customfield_10397,customfield_10398"
undefinedorbit -p myprofile jira screen field-remove 10089 10189
--fields "customfield_10397,customfield_10398"
--fields "customfield_10397,customfield_10398"
undefinedMoving Fields Between Tabs
在标签页之间移动字段
bash
undefinedbash
undefinedMove fields from General tab to AI Workflow tab
将字段从“常规”标签页移至“AI工作流”标签页
orbit -p myprofile jira screen field-move 10089 10189 10868
--fields "customfield_10397,customfield_10398,customfield_10399"
--fields "customfield_10397,customfield_10398,customfield_10399"
undefinedorbit -p myprofile jira screen field-move 10089 10189 10868
--fields "customfield_10397,customfield_10398,customfield_10399"
--fields "customfield_10397,customfield_10398,customfield_10399"
undefinedStatus and Issue Type Management
状态和问题类型管理
Listing Workflow Statuses
列出工作流状态
bash
undefinedbash
undefinedList all statuses with their categories
列出所有状态及其分类
orbit -p myprofile jira status list
orbit -p myprofile jira status list
Filter with grep
使用grep筛选
orbit -p myprofile jira status list | grep -i "review"
undefinedorbit -p myprofile jira status list | grep -i "review"
undefinedListing Issue Types
列出问题类型
bash
orbit -p myprofile jira issuetype-listbash
orbit -p myprofile jira issuetype-listDeleting Issues
删除Issues
Delete issues with . Use to also delete all subtasks.
issue delete--cascadeImportant: There is no or flag. The command deletes immediately.
--confirm--forcebash
undefined使用命令删除Issues。使用标志可同时删除所有子任务。
issue delete--cascade重要提示:该命令没有或标志,执行后会立即删除。
--confirm--forcebash
undefinedDelete a single issue
删除单个Issue
orbit -p myprofile jira issue delete PROJ-123
orbit -p myprofile jira issue delete PROJ-123
Delete an issue and all its subtasks
删除Issue及其所有子任务
orbit -p myprofile jira issue delete PROJ-100 --cascade
**Deleting a hierarchy (parent → children → grandchildren):** Delete bottom-up to avoid orphan errors, or use `--cascade` at each level that has subtasks.
```bashorbit -p myprofile jira issue delete PROJ-100 --cascade
**删除层级结构(父级→子级→孙级)**:需从下往上删除以避免孤儿错误,或在每个有子任务的层级使用`--cascade`标志。
```bashExample: delete Story (with sub-tasks) → Epic → Capability
示例:删除Story(含子任务)→ Epic → Capability
orbit -p myprofile jira issue delete PROJ-50 --cascade # Story + sub-tasks
orbit -p myprofile jira issue delete PROJ-40 # Epic (now childless)
orbit -p myprofile jira issue delete PRT-200 # Capability (now childless)
**Tip:** `--cascade` only deletes Jira sub-tasks (child issues of type Sub-task). It does NOT delete Stories under an Epic or Epics under a Capability. For full hierarchy deletion, query children with JQL first, then delete bottom-up.
```bashorbit -p myprofile jira issue delete PROJ-50 --cascade # Story + 子任务
orbit -p myprofile jira issue delete PROJ-40 # Epic(已无子任务)
orbit -p myprofile jira issue delete PRT-200 # Capability(已无子任务)
**提示**:`--cascade`仅会删除Jira子任务(类型为Sub-task的子Issue),不会删除Epic下的Story或Capability下的Epic。如需删除完整层级结构,需先使用JQL查询子级,再从下往上删除。
```bashFind all children of an issue
查找某个Issue的所有子级
orbit -p myprofile jira issue list --jql '"Parent" = PROJ-40' -o json
undefinedorbit -p myprofile jira issue list --jql '"Parent" = PROJ-40' -o json
undefinedImportant Notes
重要说明
- Cloud vs Server — Use service type for Atlassian Cloud (uses API v3 with ADF for descriptions). Use
jira-cloudfor Server/Data Center (uses API v2 with wiki markup).jira-onprem - Description formatting — For Server instances, always use Jira wiki markup for values. For Cloud, orbit auto-converts plain text to ADF. See
--bodyfor wiki markup syntax.references/wiki-markup.md - Field management — ,
field create,field context-list, andfield option-listare Cloud-only features.field option-add - Screen management — Adding fields to screens makes them appear on issue create/edit forms. Use to group related fields into a dedicated tab.
tab-create - Epic type cannot use flag — Jira rejects it because Epic is not a sub-task type. Use the
--parent(Parent Link) instead.--field "customfield_27521=KEY" - 1Password integration — Credentials in config can use and are resolved at runtime. Run
op://vault/item/fieldonce to resolve and cache all secrets for 8 hours (single biometric prompt). Useorbit authto wipe the cache. Withoutorbit auth clear, secrets are still resolved on each command but may trigger repeated biometric prompts.orbit auth
- Cloud与Server版本差异 —— Atlassian Cloud版本使用服务类型(使用API v3,描述采用ADF格式)。Server/数据中心版本使用
jira-cloud服务类型(使用API v2,描述采用wiki markup格式)。jira-onprem - 描述格式 —— 对于Server实例,参数的值务必使用Jira wiki markup格式。对于Cloud版本,orbit会自动将纯文本转换为ADF格式。wiki markup语法说明请查看
--body。references/wiki-markup.md - 字段管理 —— 、
field create、field context-list和field option-list是仅Cloud版本支持的功能。field option-add - 屏幕管理 —— 向屏幕添加字段后,这些字段会显示在Issue的创建/编辑表单中。可使用命令将相关字段分组到专属标签页。
tab-create - Epic类型无法使用标志 —— Jira会拒绝该操作,因为Epic不属于子任务类型。请使用
--parent(父级链接)替代。--field "customfield_27521=KEY" - 1Password集成 —— 配置文件中的凭据可使用格式,运行时会自动解析。执行一次
op://vault/item/field命令即可解析并缓存所有密钥,有效期8小时(仅需一次生物识别验证)。使用orbit auth命令可清除缓存。若未执行orbit auth clear,每次命令执行时仍会解析密钥,但可能会重复触发生物识别验证。orbit auth