jira获取issue条目transitions id,以用来进行流转实用脚本

官方文档链接地址:

The Jira Cloud platform REST API

GET

Get transitions

Returns either all transitions or a transition that can be performed by the user on an issue, based on the issue's status.

Note, if a request is made for a transition that does not exist or cannot be performed on the issue, given its status, the response will return any empty transitions list.

This operation can be accessed anonymously.

Permissions required: A list or transition is returned only when the user has:

However, if the user does not have the Transition issues project permission the response will not list any transitions.

示例代码如下:

复制代码
//"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/transitions"
        HttpResponse<JsonNode> response = Unirest.get("https://jira.example.com/rest/api/2/issue/TEST-7/transitions")
                .basicAuth("USER", "TOKEN")
                .header("Accept", "application/json")
                .asJson();

        System.out.println(response.getBody());

返回结果如下:

复制代码
{
  "expand": "transitions",
  "transitions": [
    {
      "name": "未解决",
      "id": "91",
      "to": {
        "name": "重新打开",
        "self": "https://jira.example.com/rest/api/2/status/10359",
        "description": "问题未彻底修复",
        "iconUrl": "https://jira.example.com/images/icons/statuses/generic.png",
        "id": "10359",
        "statusCategory": {
          "colorName": "yellow",
          "name": "In Progress",
          "self": "https://jira.example.com/rest/api/2/statuscategory/4",
          "id": 4,
          "key": "indeterminate"
        }
      }
    },
    {
      "name": "验证通过",
      "id": "81",
      "to": {
        "name": "关闭",
        "self": "https://jira.example.com/rest/api/2/status/10127",
        "description": "",
        "iconUrl": "https://jira.example.com/images/icons/statuses/generic.png",
        "id": "10127",
        "statusCategory": {
          "colorName": "green",
          "name": "Done",
          "self": "https://jira.example.com/rest/api/2/statuscategory/3",
          "id": 3,
          "key": "done"
        }
      }
    }
  ]
}

在此做个笔记

相关推荐
7177773 天前
国产 Jira 替代方案:技术决策者选型指南(2026)
jira
7177779 天前
制造业 Jira 替代方案:技术决策者选型与迁移路径
jira
严肃小白兔10 天前
GitHub 个人仓库正式支持结构化 Issue:从标签管理到自动化任务工作流
自动化·github·issue
71777715 天前
国产 Jira 替代方案怎么选:从工具拆解到落地路径的决策框架
jira
8年车载测试24 天前
汽车五大域详解:动力、底盘、车身、座舱与智驾域
汽车·bug·jira·uds诊断·ecu刷写测试·canoe工具
程序员清风24 天前
从 Issue 到实施计划:让 AI 先理解再动手
人工智能·issue
xcLeigh1 个月前
GitHub Copilot Workspace:从 Issue 到 PR 的 AI 全流程开发体验
人工智能·ai·github·copilot·issue·isuse
7177771 个月前
2026 国产 Jira 替代方案排名:技术决策者选型指南与 Gitee 定位分析
gitee·jira
8年车载测试1 个月前
车载测试中如何通过 Jira 平台提交 Bug:操作步骤与关键要点
bug·jira·uds诊断·hil测试·uds自动化测试·ecu刷写测试·canoe工具
piikee1 个月前
DeepSeek Harness 开源贡献手记:从 Issue 到 Merge 的完整旅程
issue