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"
        }
      }
    }
  ]
}

在此做个笔记

相关推荐
PM老周18 小时前
2026年 Jira 替代软件选型测评:支持项目管理与知识库管理的研发管理平台
项目管理·jira·项目管理工具·jira 替代方案
AC赳赳老秦2 天前
项目闭环管理:用 OpenClaw 对接 Jira / 禅道,实现需求 - 任务 - 进度 - 验收全流程自动化
运维·人工智能·python·自动化·devops·jira·openclaw
SL-staff4 天前
2026 企业项目管理工具选型:JIRA、飞书、JVS企业计划功能对比
项目管理·飞书·团队开发·jira·okr·jvs企业计划·决策流程
fzil00110 天前
GitHub 项目自动 Star + Issue 监控
人工智能·github·issue
夜珀22 天前
AtomGit上的Issue与Pull Request实战
issue
hillstream31 个月前
启用一个项目的RTM
jira
hillstream31 个月前
配置jira的创建问题screen的默认类型和顺序
jira
于慨1 个月前
Flutter Android gradle 8.14 file lock, incompatibility issue
android·flutter·issue
公众号:ITIL之家1 个月前
ITSM 工具选型指南 2026:ServiceNow、Jira、BMC 到底怎么选?
jira
xyzhan2 个月前
人工智能代理AI Agent如何自动化CRM、Jira、计费和Slack之间的工作流程
运维·人工智能·自动化·jira·ai agent