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

在此做个笔记

相关推荐
跟YY哥学Jira5 天前
2026 Atlassian 认证体系重大变革:全面拥抱云时代与 AI 战略
人工智能·经验分享·项目管理·atlassian·认证·jira
johnny2336 天前
开源Jira替代品:
jira
qq 180809517 天前
光伏逆变器系统架构图](https://fakeimg.pl/600x400/00ff00/000/?text=PV+Inverter+Block
jira
沟通qq 19226387 天前
基于CNN-GRU-SE注意力机制的数据分类预测模型:融合卷积神经网络、门控循环单元与SE注意...
issue
一叶轻舟随风行10 天前
kanass全面介绍(12) - 如何自定义事项类型,满足个性化需求
jira·禅道·开源项目管理工具
mylinke11 天前
NGO - XGBoost回归:新手友好的数据回归预测
jira
魔镜前的帅比11 天前
(开源项目)xsun_workflow_jira
java·jira
聊询QQ:6882388614 天前
新能源领域中应对复杂环境的正负序分离锁相环探究
jira
一叶轻舟随风行18 天前
kanass全面介绍(1) - 安装、配置
jira·禅道·开源项目管理工具
一叶轻舟随风行21 天前
多款项目管理工具纵评:Jira 、bugzilla、mantis 、Kanass
jira·禅道·开源项目管理工具